I get "Error creating managed object for class: class org.jboss.weld.servlet.WeldListener" every time I run a test with Arquillian
<p>I'm using Eclipse Neon as IDE and I'm on a pc. I'm developing a web site with primefaces and I'd like to do some integration testing of my EJB and JPA with the DB.</p>

<p>The following is the code of a simple test that includes saving a user in db:</p>

<pre><code>package test.integration.services;

import eu.unimib.srt.entities.User;
import eu.unimib.srt.services.UserRepositoryServiceBean;
import eu.unimib.srt.services.UserServiceBean;
import eu.unimib.srt.utilities.UserInfo;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.junit.InSequence;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Test;
import org.junit.runner.RunWith;

import javax.ejb.EJB;
import javax.naming.NamingException;
import javax.persistence.criteria.CriteriaBuilder;

import static org.junit.Assert.*;


@RunWith(Arquillian.class)
public class UserRepositoryServiceBeanTest {
    private static final String NOME_1 = "NomeUtente";
    private static final String COGNOME_1 = "CognomeUtente";
    private static final String USERNAME_1 = "srtUserTEST";
    private static final String TELEFONO_1 = "023456789";
    private static final String PASSWORD1 = "IloveArquillian";
    private static final String COD_FISCALE_1 = "CDCFSC41E00W000W";
    private static final String EMAIL_1 = "nome.cognome@arquillian.org";
    private static UserInfo DBUSER_1 = null;
    static {
        DBUSER_1 = new UserInfo(NOME_1, COGNOME_1, USERNAME_1, TELEFONO_1, PASSWORD1, COD_FISCALE_1, EMAIL_1, null);
    }

    @Deployment
    public static JavaArchive createDeployment() {
        JavaArchive jar = ShrinkWrap.create(JavaArchive.class)
                .addAsResource("test-persistence.xml", "META-INF/persistence.xml")
                .addClass(UserRepositoryServiceBean.class)
                .addPackage(User.class.getPackage())
                .addClass(UserInfo.class)
                .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
        System.out.println(jar.toString(true));
        return jar;
    }

    @EJB
    private UserRepositoryServiceBean ursb;

    @Test
    @InSequence(1)
    public void addUserTest() throws NamingException {
        ursb.addUser(DBUSER_1, PASSWORD1);
    }

    @Test
    @InSequence(2)
    public void verifyBindTest() {
        boolean userFound = ursb.verifyBind(USERNAME_1,PASSWORD1);
        assertTrue(userFound);
    }

    @Test
    @InSequence(3)
    public void removeUserTest() throws NamingException {
        ursb.removeUser(USERNAME_1);
    }

}
</code></pre>

<p>The persistence.xml is the following:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;persistence version="2.1"
    xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"&gt;
    &lt;persistence-unit name="SRTPersistenceUnit"
        transaction-type="JTA"&gt;
        &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
        &lt;jta-data-source&gt;jdbc/SRT16DataSource&lt;/jta-data-source&gt;

        &lt;class&gt;eu.unimib.srt.entities.TestEntity&lt;/class&gt;
        &lt;class&gt;eu.unimib.srt.entities.Automobile&lt;/class&gt;
        &lt;class&gt;eu.unimib.srt.entities.Varco&lt;/class&gt;
        &lt;class&gt;eu.unimib.srt.entities.Sanzione&lt;/class&gt;
        &lt;class&gt;eu.unimib.srt.entities.Guidatore&lt;/class&gt;
        &lt;properties&gt;

            &lt;property name="eclipselink.ddl-generation" value="create-or-extend-tables" /&gt;
            &lt;property name="eclipselink.ddl-generation.output-mode"
                value="database" /&gt;
        &lt;/properties&gt;
    &lt;/persistence-unit&gt;
&lt;/persistence&gt;
</code></pre>

<p>The test-persistence.xml is the following:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;persistence version="2.1"
             xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"&gt;
    &lt;persistence-unit name="SRTPersistenceUnit"
                      transaction-type="JTA"&gt;
        &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
        &lt;jta-data-source&gt;jdbc/arquillian&lt;/jta-data-source&gt;
        &lt;properties&gt;
            &lt;property name="eclipselink.ddl-generation" value="drop-and-create-tables"/&gt;
            &lt;property name="eclipselink.logging.level.sql" value="FINE"/&gt;
            &lt;property name="eclipselink.logging.parameters" value="true"/&gt;
        &lt;/properties&gt;
    &lt;/persistence-unit&gt;
&lt;/persistence&gt;
</code></pre>

<p>I get the following exception:</p>

<pre><code>...
bla bla bla
...
org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:87)
        at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:201)
        at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:426)
        at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
        at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:218)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:166)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

    set 08, 2016 5:25:55 PM org.glassfish.api.ActionReport failure
    GRAVE: Exception while loading the app
    set 08, 2016 5:25:55 PM com.sun.enterprise.web.WebContainer unloadWebModule
    GRAVE: Undeployment failed for context /test
    set 08, 2016 5:25:55 PM org.glassfish.deployment.admin.DeployCommand execute
    GRAVE: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class: class org.jboss.weld.servlet.WeldListener
    PlainTextActionReporterFAILUREApplication test is not deployed on this target [server]JdbcRuntimeExtension,  getAllSystemRAResourcesAndPools = [GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource]
    set 08, 2016 5:26:06 PM com.sun.enterprise.v3.server.AppServerStartup stop
    INFORMAZIONI: Shutdown procedure finished
</code></pre>