13 Replies Latest reply on Mar 18, 2013 7:06 PM by Bartosz Majsak

    problem with datasource with glassfish+arquillian+ejb

    bruneltouopi Newbie

      Hi

      Excuses me if my english is very poor .I want to test my Dao and uses Glassfish;mysql and arquillian

       

      but after all my configuration i have some times this error

       

      Grave: Invalid resource : jdbc/fiscal__pm
      java.lang.RuntimeException: Invalid resource : jdbc/fiscal__pm
                at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:540)
                at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:469)
                at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63)
                at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71)
                at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
                at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:155)
                at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
                at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
                at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
                at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
                at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
                at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
                at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
                at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:129)
                at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:105)
                at org.jboss.arquillian.container.glassfish.embedded_3_1.GlassFishContainer.deploy(GlassFishContainer.java:190)
                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)
                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)
                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)
                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:601)
                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:601)
                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:601)
                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:601)
                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)
                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)
                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)
                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)
                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:601)
                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:601)
                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:601)
                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:601)
                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
                at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)
                at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)
                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
                at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)
                at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)
                at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
                at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
                at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:601)
                at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
                at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
                at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
                at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
                at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
      Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource : jdbc/fiscal__pm
                at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl$MyDataSource.validateResource(ConnectorResourceAdminServiceImpl.java:274)
                at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl$MyDataSource.setResourceInfo(ConnectorResourceAdminServiceImpl.java:255)
                at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookupDataSourceInDAS(ConnectorResourceAdminServiceImpl.java:245)
                at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:538)
                ... 116 more
      
      
      

       

      this is my POM.xml

       

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
          <modelVersion>4.0.0</modelVersion>
      
      
          <groupId>dgi</groupId>
          <artifactId>ControleFiscal</artifactId>
          <version>1.0</version>
          <packaging>war</packaging>
      
      
          <name>ControleFiscal</name>
      
          <properties>
              <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
              <org.hibernate.version>4.1.0.Final</org.hibernate.version>
          </properties>
      
          <dependencyManagement>
              <dependencies>
                  <dependency>
                      <groupId>org.jboss.arquillian</groupId>
                      <artifactId>arquillian-bom</artifactId>
                      <version>1.0.0.Final</version>
                      <scope>import</scope>
                      <type>pom</type>
                  </dependency>
              </dependencies>
          </dependencyManagement>
      
      
          <dependencies>
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-entitymanager</artifactId>
                  <version>${org.hibernate.version}</version>
                  <exclusions>
                      <exclusion>
                          <artifactId>commons-collections</artifactId>
                          <groupId>commons-collections</groupId>
                      </exclusion>
                  </exclusions>
              </dependency>
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-validator</artifactId>
                  <version>${org.hibernate.version}</version>
              </dependency>
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-c3p0</artifactId>
                  <version>${org.hibernate.version}</version>
              </dependency>
      
      
      
      
              <!-- Java EE 6 API -->
              <dependency>
                  <groupId>commons-collections</groupId>
                  <artifactId>commons-collections</artifactId>
                  <version>3.2</version>
              </dependency>
      
              <!-- Testing -->
              <dependency>
                  <groupId>junit</groupId>
                  <artifactId>junit</artifactId>
                  <version>4.8.1</version>
                  <scope>test</scope>
              </dependency>
              <!-- Mysql JDBC Connector -->
              <dependency>
                  <groupId>mysql</groupId>
                  <artifactId>mysql-connector-java</artifactId>
                  <version>5.1.6</version>
                  <scope>test</scope>
              </dependency>
              <!--Glassfish Embedded--> 
              <!--        <dependency>
                  <groupId>org.glassfish.extras</groupId>
                  <artifactId>glassfish-embedded-all</artifactId>
                  <version>3.1.1</version>
                  <scope>test</scope>
              </dependency>-->
              <dependency>
                  <groupId>org.jboss.arquillian.junit</groupId>
                  <artifactId>arquillian-junit-container</artifactId>
                  <scope>test</scope>
              </dependency>
      
      
          </dependencies>
      
      
      
      
          <build>
              <finalName>controlefiscal</finalName>
              <plugins>
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-compiler-plugin</artifactId>
                      <version>2.3.2</version>
                      <configuration>
                          <source>1.6</source>
                          <target>1.6</target>
      
                      </configuration>
                  </plugin>
      
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-dependency-plugin</artifactId>
                      <version>2.1</version>
      
                  </plugin>
              </plugins>
          </build>
          <!--les profiles des containers embarques arquillian-->
          <profiles>
              <profile>
                  <id>arquillian-glassfish-embedded</id>
                  <activation>
                      <activeByDefault>true</activeByDefault>
                  </activation>
                  <dependencies>
      
                      <dependency>
                          <groupId>org.jboss.arquillian.container</groupId>
                          <artifactId>arquillian-glassfish-embedded-3.1</artifactId>
                          <version>1.0.0.CR3</version>
                          <scope>test</scope>
                      </dependency>
                      <dependency>
                          <groupId>org.glassfish.main.extras</groupId>
                          <artifactId>glassfish-embedded-all</artifactId>
                          <version>3.1.2</version>
                          <scope>provided</scope>
                      </dependency>
                  </dependencies>
              </profile>
      
          </profiles>
      
      </project>
      
      

       

      my persistence.xml

       

      <?xml version="1.0" encoding="UTF-8"?>
      <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
        <persistence-unit name="fiscalPU" transaction-type="JTA">
          <provider>org.hibernate.ejb.HibernatePersistence</provider>
          <jta-data-source>jdbc/fiscal</jta-data-source>
          <exclude-unlisted-classes>false</exclude-unlisted-classes>
          <properties>
            <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
          </properties>
        </persistence-unit>
      </persistence>
      
      

       

      my arquillian.xml in /test/java/resources

       

      <arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian-1.0.xsd">
          <engine>
              <property name="deploymentExportPath">target/arquillian</property>
          </engine>
      
          <container default="true" qualifier="glassfish">
              <configuration>
                  <property name="sunResourcesXml">src/main/setup/glassfish-resources.xml</property> 
              </configuration>
          </container>
      </arquillian>
      
      

       

      and my glassfish-resources.xml

       

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">
      <resources>
          <jdbc-connection-pool
              datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" 
              name="fiscalPool" 
              res-type="javax.sql.DataSource">
              <property name="serverName" value="localhost"/>
              <property name="portNumber" value="3306"/>
              <property name="databaseName" value="fiscalbd"/>
              <property name="User" value="fabrice"/>
              <property name="Password" value="xxxxxxx"/>
              <property name="URL" value="jdbc:mysql://localhost:3306/fiscalbd"/>
              <property name="driverClass" value="com.mysql.jdbc.Driver"/>
          </jdbc-connection-pool>
          <jdbc-resource enabled="true" jndi-name="jdbc/fiscal" object-type="user" pool-name="fiscalPool"/>
      </resources>
      
      

       

      I don't understand why it don't work

       

      Regards

        • 1. Re: problem with datasource with glassfish+arquillian+ejb
          bruneltouopi Newbie

          Now I decides to follow example of arquillian showcases so now my configuration is:

          • arquillian.xml and arquillian.launch in /src/test/resources
          • glassfish-resources.xml in /src/test/resources/resources-glassfish-embedded
          • test-persistence.xml in  /src/test/resources/META-INF

           

          this is error stracktrace

           

           

          ava.lang.RuntimeException: Could not create a new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor see cause.
                    at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:170)
                    at org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)
                    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:93)
                    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
                    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
                    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:601)
                    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
                    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
                    at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
                    at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
                    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
          Caused by: java.lang.reflect.InvocationTargetException
                    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
                    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
                    at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:166)
                    ... 14 more
          Caused by: java.lang.IllegalArgumentException: No container or group found that match given qualifier: glassfish-embedded
                    at org.jboss.arquillian.container.impl.client.container.ContainerRegistryCreator.createRegistry(ContainerRegistryCreator.java:116)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:601)
                    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                    at org.jboss.arquillian.core.impl.ManagerImpl.bindAndFire(ManagerImpl.java:236)
                    at org.jboss.arquillian.core.impl.InstanceImpl.set(InstanceImpl.java:74)
                    at org.jboss.arquillian.config.impl.extension.ConfigurationRegistrar.loadConfiguration(ConfigurationRegistrar.java:68)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:601)
                    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                    at org.jboss.arquillian.core.impl.ManagerImpl.start(ManagerImpl.java:261)
                    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.<init>(EventTestRunnerAdaptor.java:56)
                    ... 19 more
          Caused by: java.lang.reflect.InvocationTargetException
                    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
                    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
                    at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:166)
                    ... 14 more
          Caused by: java.lang.IllegalArgumentException: No container or group found that match given qualifier: glassfish-embedded
                    at org.jboss.arquillian.container.impl.client.container.ContainerRegistryCreator.createRegistry(ContainerRegistryCreator.java:116)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:601)
                    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                    at org.jboss.arquillian.core.impl.ManagerImpl.bindAndFire(ManagerImpl.java:236)
                    at org.jboss.arquillian.core.impl.InstanceImpl.set(InstanceImpl.java:74)
                    at org.jboss.arquillian.config.impl.extension.ConfigurationRegistrar.loadConfiguration(ConfigurationRegistrar.java:68)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:601)
                    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
                    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                    at org.jboss.arquillian.core.impl.ManagerImpl.start(ManagerImpl.java:261)
                    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.<init>(EventTestRunnerAdaptor.java:56)
                    ... 19 more
          
          

           

          POM.xml

           

           

          <project>
              
              <dependencyManagement>
                  <dependencies>
                      <dependency>
                          <groupId>org.jboss.arquillian</groupId>
                          <artifactId>arquillian-bom</artifactId>
                          <version>1.0.0.Final</version>
                          <scope>import</scope>
                          <type>pom</type>
                      </dependency>
                  </dependencies>
              </dependencyManagement>
          
          
          
              <dependencies>
                  <dependency>
                      <groupId>org.hibernate</groupId>
                      <artifactId>hibernate-jpamodelgen</artifactId>
                      <version>1.1.1.Final</version>
                      <scope>provided</scope>
                      <!-- Excluded because it's provided by the Java EE 6 dependencies -->
                      <exclusions>
                          <exclusion>
                              <groupId>org.hibernate.javax.persistence</groupId>
                              <artifactId>hibernate-jpa-2.0-api</artifactId>
                          </exclusion>
                      </exclusions>
                  </dependency>
                  <dependency>
                      <groupId>junit</groupId>
                      <artifactId>junit</artifactId>
                      <version>4.8.1</version>
                      <scope>test</scope>
                  </dependency>
                  <dependency>
                      <groupId>org.jboss.arquillian.junit</groupId>
                      <artifactId>arquillian-junit-container</artifactId>
                      <scope>test</scope>
                  </dependency>
                  
                    <dependency>
                <groupId>org.jboss.arquillian.protocol</groupId>
                <artifactId>arquillian-protocol-servlet</artifactId>
              </dependency>
              
                  <dependency>
                      <groupId>org.h2database</groupId>
                      <artifactId>h2database</artifactId>
                      <version>1.0.20061217</version>
                      <scope>test</scope>
                      <type>pom</type>
                  </dependency>
              </dependencies>
          
              <!--les profiles des containers embarques arquillian-->
              <profiles>
                  <profile>
                      <id>arquillian-glassfish-embedded</id>
                      <activation>
                          <activeByDefault>true</activeByDefault>
                      </activation>
                      <dependencies>
                     
                          <dependency>
                              <groupId>org.jboss.arquillian.container</groupId>
                              <artifactId>arquillian-glassfish-embedded-3.1</artifactId>
                              <version>1.0.0.CR3</version>
                              <scope>test</scope>
                          </dependency>
                          <dependency>
                              <groupId>org.glassfish.main.extras</groupId>
                              <artifactId>glassfish-embedded-all</artifactId>
                              <version>3.1.2</version>
                              <scope>provided</scope>
                          </dependency>
                      </dependencies>
                      <build>
                          <plugins>
                              <plugin>
                                  <artifactId>maven-surefire-plugin</artifactId>
                                  <configuration>
                                      <systemProperties>
                                          <arquillian.launch>glassfish-embedded</arquillian.launch>
                                      </systemProperties>
                                  </configuration>
                              </plugin>
                          </plugins>
                          <testResources>
                              <testResource>
                                  <directory>src/test/resources</directory>
                              </testResource>
                              <testResource>
                                  <directory>src/test/resources-glassfish-embedded</directory>
                              </testResource>
                          </testResources>
                      </build>
                  </profile>
                  
              </profiles>
             
          </project>
          
          

           

          glassfish-resources.xml

           

           

          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE resources PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Resource Definitions //EN"
              "http://www.sun.com/software/appserver/dtds/sun-resources_1_4.dtd">
          <resources>
               <jdbc-resource pool-name="ArquillianEmbeddedH2Pool"
                  jndi-name="jdbc/arquillian"/>
              <jdbc-connection-pool name="ArquillianEmbeddedH2Pool"
                  res-type="javax.sql.DataSource"
                  datasource-classname="org.h2.jdbcx.JdbcDataSource">
                  <property name="user" value="sa"/>
                  <property name="password" value=""/>
                  <property name="url" value="jdbc:h2:file:target/databases/h2/db"/>
              </jdbc-connection-pool>
             
          </resources>
          
          

           

          arquillian.xml

           

          <?xml version="1.0" encoding="UTF-8"?>
          <arquillian xmlns="http://jboss.org/schema/arquillian"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
              
          <!--    <engine>
                  <property name="deploymentExportPath">target/arquillian</property>
              </engine>-->
          
           <defaultProtocol type="Servlet 3.0"/>
          
              <container qualifier="glassfish-embedded">
                  <configuration>
                      <property name="bindHttpPort">7070</property>
                      <property name="sunResourcesXml">src/test/resources-glassfish-embedded/glassfish-resources.xml</property> 
                  </configuration>
              </container>
          </arquillian>
          
          

           

          arquillian.launch

           

          #glassfish-embedded
          

           

          test-persistence.xml

           

           

          <?xml version="1.0" encoding="UTF-8"?>
          <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
            <persistence-unit name="fiscalPU" transaction-type="JTA">
              <provider>org.hibernate.ejb.HibernatePersistence</provider>
              <jta-data-source>jdbc/arquillian</jta-data-source>
              <properties>
                <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
              <property name="hibernate.show_sql" value="true"/>
              <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
              </properties>
            </persistence-unit>
          </persistence>
          
          

           

           

          Please help me I want to Test with arquillian and i am very interrest.I block with JPA.

          • 2. Re: problem with datasource with glassfish+arquillian+ejb
            Bartosz Majsak Master

            This configuration works for me

             

            <container qualifier="glassfish-embedded" default="true">

                <configuration>

                  <property name="resourcesXml">path/to/glassfish-resources.xml</property>

                  <property name="bindHttpPort">9999</property>

                </configuration>

            </container>

            1 of 1 people found this helpful
            • 3. Re: problem with datasource with glassfish+arquillian+ejb
              bruneltouopi Newbie

              I put it now.i have same error.

              Please inspect my code because i don't know where i do the bad configuration

              • 4. Re: problem with datasource with glassfish+arquillian+ejb
                Bartosz Majsak Master

                If you run with default you don't need arquillian.launch. If you remove it does it behave the same? Another thing is that you might want to update your Arquillian Core to 1.0.3.Final

                • 5. Re: problem with datasource with glassfish+arquillian+ejb
                  bruneltouopi Newbie

                  ok now it launch my datasource but i have this error

                   

                   

                  Grave: java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence

                  java.lang.RuntimeException: java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence

                            at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:180)

                            at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)

                            at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)

                            at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)

                            at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)

                            at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)

                            at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)

                            at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)

                            at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)

                            at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)

                            at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)

                            at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)

                            at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)

                            at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)

                            at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)

                            at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)

                            at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:129)

                            at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:105)

                            at org.jboss.arquillian.container.glassfish.embedded_3_1.GlassFishContainer.deploy(GlassFishContainer.java:202)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                            at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                            at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                            at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                            at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

                            at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

                            at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                            at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

                            at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

                            at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

                            at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                            at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                            at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                            at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

                            at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

                            at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)

                            at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)

                            at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)

                            at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)

                            at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)

                            at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

                            at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)

                            at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)

                            at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)

                            at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)

                            at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)

                            at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)

                            at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)

                            at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)

                  Caused by: java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence

                            at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509)

                            at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)

                            at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:174)

                            ... 111 more

                   

                   

                  mars 18, 2013 10:43:19 PM org.glassfish.deployment.admin.DeployCommand execute

                  Grave: Exception while preparing the app : java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence

                  java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence

                            at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509)

                            at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)

                            at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:174)

                            at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)

                            at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)

                            at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)

                            at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)

                            at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)

                            at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)

                            at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)

                            at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)

                            at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)

                            at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)

                            at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)

                            at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)

                            at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)

                            at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)

                            at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)

                            at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:129)

                            at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:105)

                            at org.jboss.arquillian.container.glassfish.embedded_3_1.GlassFishContainer.deploy(GlassFishContainer.java:202)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                            at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                            at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                            at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                            at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

                            at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

                            at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)

                            at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                            at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

                            at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

                            at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

                            at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                            at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                            at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                            at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                            at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

                            at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

                            at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)

                            at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)

                            at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)

                            at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)

                            at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)

                            at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

                            at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)

                            at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)

                            at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)

                            at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                            at java.lang.reflect.Method.invoke(Method.java:601)

                            at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)

                            at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)

                            at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)

                            at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)

                            at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)

                  • 6. Re: problem with datasource with glassfish+arquillian+ejb
                    Bartosz Majsak Master

                    Glassfish comes with EclipseLink as default JPA provider, therefore the problem you are facing - Hibernate is not present on the classpath. Please adjust your persistence.xml, to something similar

                    <?xml version="1.0" encoding="UTF-8"?>

                    <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"

                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

                    <persistence-unit name="puName">

                    <jta-data-source>jdbc/arquillian</jta-data-source>

                    <properties>

                    <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>

                    <property name="eclipselink.logging.level" value="INFO"/>

                    </properties>

                    </persistence-unit>

                    </persistence>

                     

                    You can actually skip the <provider> part and let container use the default

                    1 of 1 people found this helpful
                    • 7. Re: problem with datasource with glassfish+arquillian+ejb
                      bruneltouopi Newbie

                      Thanks for your help.but now i have a error with classpath of h2

                       

                       

                      mars 18, 2013 11:05:02 PM org.eclipse.persistence.session.file:/C:/Users/fabrice/AppData/Local/Temp/gfembed4586294607710154690tmp/applications/test/WEB-INF/lib/test.jar_fiscalPU
                      Infos: EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
                      mars 18, 2013 11:05:02 PM com.sun.gjc.common.DataSourceObjectBuilder getDataSourceObject
                      Grave: jdbc.exc_cnfe_ds
                      java.lang.ClassNotFoundException: org.h2.jdbcx.JdbcDataSource
                                at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
                                at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
                                at java.security.AccessController.doPrivileged(Native Method)
                                at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
                                at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
                                at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
                                at java.lang.Class.forName0(Native Method)
                                at java.lang.Class.forName(Class.java:264)
                                at com.sun.gjc.common.DataSourceObjectBuilder.getDataSourceObject(DataSourceObjectBuilder.java:285)
                                at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:114)
                                at com.sun.gjc.spi.ManagedConnectionFactory.getDataSource(ManagedConnectionFactory.java:1307)
                                at com.sun.gjc.spi.DSManagedConnectionFactory.getDataSource(DSManagedConnectionFactory.java:163)
                                at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:102)
                                at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:87)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:907)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1189)
                                at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:98)
                                at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:282)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1512)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:944)
                                at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:230)
                                at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:511)
                                at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
                                at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:245)
                                at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:170)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:338)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:301)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:190)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:160)
                                at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:113)
                                at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123)
                                at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
                                at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
                                at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
                                at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211)
                                at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
                                at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
                                at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
                                at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
                                at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
                                at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
                                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
                                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
                                at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
                                at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:129)
                                at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:105)
                                at org.jboss.arquillian.container.glassfish.embedded_3_1.GlassFishContainer.deploy(GlassFishContainer.java:202)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                                at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                                at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                                at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                                at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)
                                at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)
                                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
                                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
                                at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)
                                at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
                                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)
                                at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
                                at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
                                at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
                                at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
                                at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
                                at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
                                at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
                      
                      
                      mars 18, 2013 11:05:02 PM com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator createResource
                      Avertissement: RAR5038:Unexpected exception while creating resource for pool ArquillianEmbeddedH2Pool. Exception : javax.resource.ResourceException: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                      mars 18, 2013 11:05:02 PM com.sun.enterprise.connectors.ConnectionManagerImpl internalGetConnection
                      Avertissement: RAR5117 : Failed to obtain/create connection from connection pool [ ArquillianEmbeddedH2Pool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                      mars 18, 2013 11:05:02 PM com.sun.gjc.spi.base.DataSource logNonTransientException
                      Avertissement: jdbc.exc_get_conn
                      mars 18, 2013 11:05:02 PM org.eclipse.persistence.session.file:/C:/Users/fabrice/AppData/Local/Temp/gfembed4586294607710154690tmp/applications/test/WEB-INF/lib/test.jar_fiscalPU.ejb
                      Grave: 
                      Local Exception Stack: 
                      Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
                      Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                      Error Code: 0
                                at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
                                at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135)
                                at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
                                at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
                                at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
                                at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211)
                                at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
                                at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
                                at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
                                at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
                                at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
                                at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
                                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
                                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
                                at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
                                at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:129)
                                at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:105)
                                at org.jboss.arquillian.container.glassfish.embedded_3_1.GlassFishContainer.deploy(GlassFishContainer.java:202)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                                at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                                at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                                at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                                at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)
                                at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)
                                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
                                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
                                at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)
                                at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
                                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)
                                at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
                                at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
                                at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
                                at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
                                at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
                                at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
                                at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
                      Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:120)
                                at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123)
                                ... 120 more
                      Caused by: javax.resource.spi.ResourceAllocationException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:307)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:190)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:160)
                                at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:113)
                                ... 121 more
                      Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:103)
                                at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:282)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1512)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:944)
                                at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:230)
                                at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:511)
                                at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
                                at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:245)
                                at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:170)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:338)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:301)
                                ... 125 more
                      Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:924)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1189)
                                at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:98)
                                ... 135 more
                      Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:110)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:907)
                                ... 137 more
                      Caused by: javax.resource.ResourceException: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.gjc.common.DataSourceObjectBuilder.getDataSourceObject(DataSourceObjectBuilder.java:292)
                                at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:114)
                                at com.sun.gjc.spi.ManagedConnectionFactory.getDataSource(ManagedConnectionFactory.java:1307)
                                at com.sun.gjc.spi.DSManagedConnectionFactory.getDataSource(DSManagedConnectionFactory.java:163)
                                at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:102)
                                at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:87)
                                ... 138 more
                      
                      
                      mars 18, 2013 11:05:02 PM org.glassfish.api.ActionReport failure
                      Grave: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
                      mars 18, 2013 11:05:02 PM org.glassfish.api.ActionReport failure
                      Grave: Exception while preparing the app
                      mars 18, 2013 11:05:02 PM com.sun.enterprise.v3.server.ApplicationLifecycle deploy
                      Grave: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
                      Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                      Error Code: 0
                      javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
                      Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                      Error Code: 0
                                at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:517)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
                                at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211)
                                at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
                                at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
                                at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
                                at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
                                at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
                                at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
                                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
                                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
                                at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
                                at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:129)
                                at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:105)
                                at org.jboss.arquillian.container.glassfish.embedded_3_1.GlassFishContainer.deploy(GlassFishContainer.java:202)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                                at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                                at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                                at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                                at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)
                                at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)
                                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
                                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
                                at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)
                                at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
                                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)
                                at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
                                at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
                                at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
                                at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
                                at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
                                at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
                                at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
                      Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
                      Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                      Error Code: 0
                                at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
                                at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135)
                                at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
                                at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
                                at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
                                ... 116 more
                      Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:120)
                                at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123)
                                ... 120 more
                      Caused by: javax.resource.spi.ResourceAllocationException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:307)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:190)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:160)
                                at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:113)
                                ... 121 more
                      Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:103)
                                at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:282)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1512)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:944)
                                at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:230)
                                at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:511)
                                at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
                                at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:245)
                                at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:170)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:338)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:301)
                                ... 125 more
                      Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:924)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1189)
                                at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:98)
                                ... 135 more
                      Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:110)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:907)
                                ... 137 more
                      Caused by: javax.resource.ResourceException: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.gjc.common.DataSourceObjectBuilder.getDataSourceObject(DataSourceObjectBuilder.java:292)
                                at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:114)
                                at com.sun.gjc.spi.ManagedConnectionFactory.getDataSource(ManagedConnectionFactory.java:1307)
                                at com.sun.gjc.spi.DSManagedConnectionFactory.getDataSource(DSManagedConnectionFactory.java:163)
                                at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:102)
                                at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:87)
                                ... 138 more
                      
                      
                      mars 18, 2013 11:05:02 PM org.glassfish.deployment.admin.DeployCommand execute
                      Grave: Exception while preparing the app : Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
                      Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                      Error Code: 0
                      Local Exception Stack: 
                      Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
                      Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                      Error Code: 0
                                at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
                                at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135)
                                at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
                                at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
                                at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
                                at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
                                at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:211)
                                at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:120)
                                at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224)
                                at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495)
                                at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233)
                                at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
                                at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
                                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
                                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
                                at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
                                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
                                at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:129)
                                at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:105)
                                at org.jboss.arquillian.container.glassfish.embedded_3_1.GlassFishContainer.deploy(GlassFishContainer.java:202)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                                at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)
                                at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                                at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                                at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
                                at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)
                                at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)
                                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
                                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
                                at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)
                                at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
                                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)
                                at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
                                at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
                                at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                at java.lang.reflect.Method.invoke(Method.java:601)
                                at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
                                at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
                                at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
                                at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
                                at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
                      Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:120)
                                at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123)
                                ... 120 more
                      Caused by: javax.resource.spi.ResourceAllocationException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:307)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:190)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:160)
                                at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:113)
                                ... 121 more
                      Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:103)
                                at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:282)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1512)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:944)
                                at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:230)
                                at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:511)
                                at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
                                at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:245)
                                at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:170)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:338)
                                at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:301)
                                ... 125 more
                      Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:924)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1189)
                                at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:98)
                                ... 135 more
                      Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:110)
                                at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:907)
                                ... 137 more
                      Caused by: javax.resource.ResourceException: Class name is wrong or classpath is not set for : org.h2.jdbcx.JdbcDataSource
                                at com.sun.gjc.common.DataSourceObjectBuilder.getDataSourceObject(DataSourceObjectBuilder.java:292)
                                at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:114)
                                at com.sun.gjc.spi.ManagedConnectionFactory.getDataSource(ManagedConnectionFactory.java:1307)
                                at com.sun.gjc.spi.DSManagedConnectionFactory.getDataSource(DSManagedConnectionFactory.java:163)
                                at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:102)
                                at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:87)
                                ... 138 more
                      
                      
                      • 8. Re: problem with datasource with glassfish+arquillian+ejb
                        Bartosz Majsak Master

                        Which means that you need to include h2 driver on the classpath (there is no jar probably) or you point to the wrong class, as logs are suggesting

                        • 9. Re: problem with datasource with glassfish+arquillian+ejb
                          bruneltouopi Newbie

                          It okay I remove

                           

                            <dependency>

                                      <groupId>org.h2database</groupId>

                                      <artifactId>h2database</artifactId>

                                      <version>1.0.20061217</version>

                                      <scope>test</scope>

                                      <type>pom</type>

                                  </dependency>

                           

                          and i put this

                           

                          <dependency>

                                      <groupId>org.h2database</groupId>

                                      <artifactId>h2database</artifactId>

                                      <version>1.3.171</version>

                                      <scope>test</scope>

                                  </dependency>


                          • 10. Re: problem with datasource with glassfish+arquillian+ejb
                            Bartosz Majsak Master

                            you can also remove gf 3.1.1 as it's also defined for the profile (but with diff version)

                            • 12. Re: problem with datasource with glassfish+arquillian+ejb
                              Bartosz Majsak Master

                              in the original pom you posted, you have two versions of glassfish embedded (duplicated dependency)

                              • 13. Re: problem with datasource with glassfish+arquillian+ejb
                                Bartosz Majsak Master

                                ah, right, one is commented out. forget about it then