6 Replies Latest reply on Jun 16, 2013 11:13 AM by peter müller

    arquillian with websphere 8.5 searching for example/tutorial

    peter müller Newbie

      Hi,

       

      after i have try to use openejb and arquillian without any success, i would like to ask if anyone can give me an example of using arquillian with websphere application server 8.5 as embedded.

       

      I have search and try a lot but i cant find any tutorials and if i try it my arquillian doesnt find any remote container

       

      Thanks.

       

      regrards,

       

      peter

        • 2. Re: arquillian with websphere 8.5 searching for example/tutorial
          peter müller Newbie

          Thanks for the information.

           

          I have try to setup a example, but if i run the example, it takes a time (i think 6 seconds) until i get an nullpointer exception in my TestMethode. It occurs because my  EJB is null.

           

          I found logs in my project (target/tranlog) but i cant read it, i dont know the encoding (it shows only unreadable symbols).

           

          In my normal mvn console i see no logging information, only BUILD FAILED.

           

          Here are my pom.xml:

           

          <?xml version="1.0" encoding="UTF-8"?>
          <project xmlns="http://maven.apache.org/POM/4.0.0"
              xsi:schemaLocation="
                  http://maven.apache.org/POM/4.0.0
                  http://maven.apache.org/xsd/maven-4.0.0.xsd"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
              <modelVersion>4.0.0</modelVersion>
              <groupId>org.arquillian.example</groupId>
              <artifactId>arquillian-tutorial</artifactId>
              <version>1.0.0-SNAPSHOT</version>
              <dependencies>
                  <dependency>
                      <groupId>org.jboss.spec</groupId>
                      <artifactId>jboss-javaee-6.0</artifactId>
                      <version>1.0.0.Final</version>
                      <type>pom</type>
                      <scope>provided</scope>
                  </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>
                      <version>1.0.3.Final</version>
                  </dependency>
          
                  <dependency>
                      <groupId>org.jboss.shrinkwrap.descriptors</groupId>
                      <artifactId>shrinkwrap-descriptors-impl</artifactId>
                      <version>1.1.0-beta-1</version>
                  </dependency>
                  <!-- <dependency> <groupId>org.apache.openejb</groupId> <artifactId>openejb-core</artifactId> 
                      <version>4.5.2</version> </dependency> -->
          
              </dependencies>
              <build>
          
                  <finalName>arquillian-tutorial</finalName>
                  <plugins>
                      <plugin>
                          <artifactId>maven-compiler-plugin</artifactId>
                          <version>2.3.2</version>
                          <configuration>
                              <source>1.6</source>
                              <target>1.6</target>
                               <skip>true</skip>
                              <systemProperties>
                                  <property>
                                      <name>java.util.logging.config.file</name>
                                      <value>${basedir}/src/test/resources/logging.properties</value>
                                  </property>
          
                              </systemProperties>
                          </configuration>
                      </plugin>
                  </plugins>
              </build>
              <profiles>
                  <profile>
                      <id>was-embedded-8</id>
                      <activation>
                          <activeByDefault>true</activeByDefault>
                      </activation>
                      <dependencies>
                          <dependency>
                              <groupId>org.jboss.arquillian.container</groupId>
                              <artifactId>arquillian-was-embedded-8</artifactId>
                              <version>1.0.0-SNAPSHOT</version>
                          </dependency>
                      </dependencies>
                  </profile>
              </profiles>
          
          </project>
          

           

          arquillian.xml

          <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
          <arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns="http://jboss.org/schema/arquillian"
          xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
          
          <engine>
          <property name="deploymentExportPath">target/</property>
          </engine>
          
          <container qualifier="websphere" default="true">
          <configuration>
          <property name="embeddedProperties">src/test/resources/was-embedded.properties</property>
          </configuration>
          </container>
          </arquillian>
          

           

          logging.properties:

          # Setup a standard ConsoleHandler in mode FINEST
          handlers= java.util.logging.ConsoleHandler
          java.util.logging.ConsoleHandler.level = FINEST
          java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
          
          # Configure WAS Container classes to FINEST; everything else to INFO
          .level= INFO
          org.jboss.arquillian.container.was.level = FINEST
          

           

          was-embedded.properties:

           

          com.ibm.websphere.tx.tranLogDirectory=target/tranlog
          

           

          Can you tell me the encoding of the log files or maybe configuration errors in my pom.xml? (the other files are 1 to 1 copies from the src/test/resources folder of the was embedded 8 repository)

          • 3. Re: arquillian with websphere 8.5 searching for example/tutorial
            Gerhard Poul Newbie

            Not sure what the problem is. If you have a tranlog it means the embedded websphere was able to start and you're not supposed to be able to read it with a text editor. It's a transaction log. Can you confirm whether the unit tests work with WAS 8.5 embedded on your system?

            • 4. Re: arquillian with websphere 8.5 searching for example/tutorial
              peter müller Newbie

              Hi,

               

              Thanks for the answer.

               

              I have execute the example with "mvn test":

               

               

              [INFO] Scanning for projects...
              [INFO] ------------------------------------------------------------------------
              [INFO] Reactor Build Order:
              [INFO] 
              [INFO] Arquillian Container Parent WebSphere AS
              [INFO] Arquillian Container WebSphere AS Embedded 8.x
              [INFO]                                                                         
              [INFO] ------------------------------------------------------------------------
              [INFO] Building Arquillian Container Parent WebSphere AS 1.0.0-SNAPSHOT
              [INFO] ------------------------------------------------------------------------
              [INFO] 
              [INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-java-version) @ arquillian-parent-was ---
              [INFO] 
              [INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven-version) @ arquillian-parent-was ---
              [INFO]                                                                         
              [INFO] ------------------------------------------------------------------------
              [INFO] Building Arquillian Container WebSphere AS Embedded 8.x 1.0.0-SNAPSHOT
              [INFO] ------------------------------------------------------------------------
              [INFO] 
              [INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-java-version) @ arquillian-was-embedded-8 ---
              [INFO] 
              [INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven-version) @ arquillian-was-embedded-8 ---
              [INFO] 
              [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ arquillian-was-embedded-8 ---
              [debug] execute contextualize
              [INFO] Using 'UTF-8' encoding to copy filtered resources.
              [INFO] Copying 1 resource
              [INFO] 
              [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ arquillian-was-embedded-8 ---
              [INFO] Nothing to compile - all classes are up to date
              [INFO] 
              [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ arquillian-was-embedded-8 ---
              [debug] execute contextualize
              [INFO] Using 'UTF-8' encoding to copy filtered resources.
              [INFO] Copying 3 resources
              [INFO] 
              [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ arquillian-was-embedded-8 ---
              [INFO] Nothing to compile - all classes are up to date
              [INFO] 
              [INFO] --- maven-surefire-plugin:2.10:test (default-test) @ arquillian-was-embedded-8 ---
              [INFO] Surefire report directory: D:\Users\Haunted\Desktop\Neuer Ordner\arquillian-container-was\was-embedded-8\target\surefire-reports
              
              -------------------------------------------------------
               T E S T S
              -------------------------------------------------------
              Running org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedIntegrationClientTestCase
              12.06.2013 20:37:41 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer setup
              FEINER: ENTRY
              12.06.2013 20:37:41 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer setup
              FEINER: RETURN
              12.06.2013 20:37:41 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer start
              FEINER: ENTRY
              12.06.2013 20:37:41 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer start
              FEINER: RETURN
              12.06.2013 20:37:41 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: ENTRY
              12.06.2013 20:37:41 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: RETURN
              12.06.2013 20:37:41 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer deploy
              FEINER: ENTRY
              12.06.2013 20:37:41 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer deploy
              FEINER: Archive provided to deploy method: test.jar:
              /org/
              /org/jboss/
              /org/jboss/arquillian/
              /org/jboss/arquillian/container/
              /org/jboss/arquillian/container/was/
              /org/jboss/arquillian/container/was/embedded_8/
              /org/jboss/arquillian/container/was/embedded_8/ejb/
              /org/jboss/arquillian/container/was/embedded_8/ejb/MyEjb.class
              /org/jboss/arquillian/container/was/embedded_8/WebSphereEmbeddedIntegrationClientTestCase.class
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer deploy
              FEINER: RETURN
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: ENTRY
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: RETURN
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: ENTRY
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: RETURN
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: ENTRY
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: RETURN
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: ENTRY
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: RETURN
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: ENTRY
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: RETURN
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: ENTRY
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: RETURN
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: ENTRY
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
              FEINER: RETURN
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer undeploy
              FEINER: ENTRY
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer undeploy
              FEINER: RETURN
              Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.836 sec
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer stop
              FEINER: ENTRY
              12.06.2013 20:37:45 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer stop
              FEINER: RETURN
              
              Results :
              
              Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
              
              [INFO] ------------------------------------------------------------------------
              [INFO] Reactor Summary:
              [INFO] 
              [INFO] Arquillian Container Parent WebSphere AS .......... SUCCESS [0.792s]
              [INFO] Arquillian Container WebSphere AS Embedded 8.x .... SUCCESS [7.093s]
              [INFO] ------------------------------------------------------------------------
              [INFO] BUILD SUCCESS
              [INFO] ------------------------------------------------------------------------
              [INFO] Total time: 8.432s
              [INFO] Finished at: Wed Jun 12 20:37:45 CEST 2013
              [INFO] Final Memory: 5M/122M
              [INFO] ------------------------------------------------------------------------
              

               

               

              The log seams ok for me, but i have to remove the "<skip>true</skip>" entry in the "maven-surefire-plugin" plugin to enable the tests.

               

              Regards

              • 5. Re: arquillian with websphere 8.5 searching for example/tutorial
                Gerhard Poul Newbie

                Please look at https://github.com/arquillian/arquillian-container-was/blob/master/was-embedded-8/src/test/java/org/jboss/arquillian/container/was/embedded_8/WebSphereEmbeddedIntegrationClientTestCase.java#L48 to see what the test uses to successfully get the EJB injected. If you use any other mechanism you might want to try this one and see whether that works for you. Given that it seems to work for the test case it should work for your code also.

                • 6. Re: arquillian with websphere 8.5 searching for example/tutorial
                  peter müller Newbie

                  Hi,

                   

                  Thanks for the information.

                   

                  I have try to add JPA Entities to the example.

                   

                  I have only add a 3 entity classes (1x @Entity and 2x Mappedsupperclass).

                   

                  If i deploy the archive now, i get an error:

                   

                   

                  -------------------------------------------------------------------------------
                  Test set: org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedIntegrationClientTestCase
                  -------------------------------------------------------------------------------
                  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.851 sec <<< FAILURE!
                  shouldBeAbleToInjectEJBAsInstanceVariable(org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedIntegrationClientTestCase)  Time elapsed: 0.363 sec  <<< ERROR!
                  javax.ejb.EJBException: See nested exception; nested exception is: java.lang.NullPointerException
                      at com.ibm.ejs.container.util.ExceptionUtil.EJBException(ExceptionUtil.java:466)
                      at com.ibm.ejs.container.util.ExceptionUtil.EJBException(ExceptionUtil.java:355)
                      at com.ibm.ejs.container.BusinessExceptionMappingStrategy.mapException(BusinessExceptionMappingStrategy.java:391)
                      at com.ibm.ejs.container.BusinessExceptionMappingStrategy.setUncheckedException(BusinessExceptionMappingStrategy.java:553)
                      at com.ibm.ejs.container.EJSDeployedSupport.setUncheckedLocalException(EJSDeployedSupport.java:516)
                      at org.jboss.arquillian.container.was.embedded_8.ejb.EJSLocalNSLMyEjb_601ec584.getName(EJSLocalNSLMyEjb_601ec584.java)
                      at org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedIntegrationClientTestCase.shouldBeAbleToInjectEJBAsInstanceVariable(WebSphereEmbeddedIntegrationClientTestCase.java:61)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
                      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
                      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
                      at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:270)
                      at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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.EventImpl.fire(EventImpl.java:67)
                      at org.jboss.arquillian.container.test.impl.client.protocol.local.LocalContainerMethodExecutor.invoke(LocalContainerMethodExecutor.java:50)
                      at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:120)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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.EventImpl.fire(EventImpl.java:67)
                      at org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
                      at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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.createTestContext(TestContextHandler.java:89)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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.createClassContext(TestContextHandler.java:75)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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:135)
                      at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111)
                      at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:263)
                      at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:226)
                      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$5.evaluate(Arquillian.java:240)
                      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
                      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
                      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
                      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
                      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
                      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
                      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
                      at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185)
                      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:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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.NullPointerException
                      at org.jboss.arquillian.container.was.embedded_8.ejb.MyEjb.getName(MyEjb.java:41)
                      ... 102 more
                  

                   

                  Maven output:

                   

                   

                  SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
                  SLF4J: Defaulting to no-operation (NOP) logger implementation
                  SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
                  [INFO] Scanning for projects...
                  [INFO]                                                                         
                  [INFO] ------------------------------------------------------------------------
                  [INFO] Building Arquillian Container WebSphere AS Embedded 8.x 1.0.0-SNAPSHOT
                  [INFO] ------------------------------------------------------------------------
                  [INFO] 
                  [INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-java-version) @ arquillian-was-embedded-8 ---
                  [INFO] 
                  [INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven-version) @ arquillian-was-embedded-8 ---
                  [INFO] 
                  [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ arquillian-was-embedded-8 ---
                  [debug] execute contextualize
                  [INFO] Using 'UTF-8' encoding to copy filtered resources.
                  [INFO] Copying 2 resources
                  [INFO] 
                  [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ arquillian-was-embedded-8 ---
                  [INFO] Compiling 1 source file to D:\Users\Haunted\Desktop\Neuer Ordner\arquillian-container-was\was-embedded-8\target\classes
                  [INFO] 
                  [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ arquillian-was-embedded-8 ---
                  [debug] execute contextualize
                  [INFO] Using 'UTF-8' encoding to copy filtered resources.
                  [INFO] Copying 4 resources
                  [INFO] 
                  [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ arquillian-was-embedded-8 ---
                  [INFO] Nothing to compile - all classes are up to date
                  [INFO] 
                  [INFO] --- maven-surefire-plugin:2.10:test (default-test) @ arquillian-was-embedded-8 ---
                  [INFO] Surefire report directory: D:\Users\Haunted\Desktop\Neuer Ordner\arquillian-container-was\was-embedded-8\target\surefire-reports
                  
                  -------------------------------------------------------
                   T E S T S
                  -------------------------------------------------------
                  Running org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedIntegrationClientTestCase
                  16.06.2013 17:06:47 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer setup
                  FEINER: ENTRY
                  16.06.2013 17:06:47 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer setup
                  FEINER: RETURN
                  16.06.2013 17:06:47 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer start
                  FEINER: ENTRY
                  16.06.2013 17:06:47 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer start
                  FEINER: RETURN
                  16.06.2013 17:06:47 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: ENTRY
                  16.06.2013 17:06:47 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: RETURN
                  16.06.2013 17:06:47 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer deploy
                  FEINER: ENTRY
                  16.06.2013 17:06:47 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer deploy
                  FEINER: Archive provided to deploy method: test.jar:
                  /META-INF/
                  /META-INF/persistence.xml
                  /entity/
                  /entity/Bank.class
                  /entity/BaseEntity.class
                  /entity/DeletableEntity.class
                  /org/
                  /org/jboss/
                  /org/jboss/arquillian/
                  /org/jboss/arquillian/container/
                  /org/jboss/arquillian/container/was/
                  /org/jboss/arquillian/container/was/embedded_8/
                  /org/jboss/arquillian/container/was/embedded_8/ejb/
                  /org/jboss/arquillian/container/was/embedded_8/ejb/MyEjb.class
                  /org/jboss/arquillian/container/was/embedded_8/WebSphereEmbeddedIntegrationClientTestCase.class
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer deploy
                  FEINER: RETURN
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: ENTRY
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: RETURN
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: ENTRY
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: RETURN
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: ENTRY
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: RETURN
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: ENTRY
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: RETURN
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: ENTRY
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: RETURN
                  CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "getName" on bean "BeanId(embeddable#test.jar#MyEjb, null)". Exception data: java.lang.NullPointerException
                      at org.jboss.arquillian.container.was.embedded_8.ejb.MyEjb.getName(MyEjb.java:41)
                      at org.jboss.arquillian.container.was.embedded_8.ejb.EJSLocalNSLMyEjb_601ec584.getName(EJSLocalNSLMyEjb_601ec584.java)
                      at org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedIntegrationClientTestCase.shouldBeAbleToInjectEJBAsInstanceVariable(WebSphereEmbeddedIntegrationClientTestCase.java:61)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
                      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
                      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
                      at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:270)
                      at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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.EventImpl.fire(EventImpl.java:67)
                      at org.jboss.arquillian.container.test.impl.client.protocol.local.LocalContainerMethodExecutor.invoke(LocalContainerMethodExecutor.java:50)
                      at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:120)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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.EventImpl.fire(EventImpl.java:67)
                      at org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
                      at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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.createTestContext(TestContextHandler.java:89)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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.createClassContext(TestContextHandler.java:75)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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:135)
                      at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111)
                      at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:263)
                      at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:226)
                      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$5.evaluate(Arquillian.java:240)
                      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
                      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
                      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
                      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
                      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
                      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
                      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
                      at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185)
                      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:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      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)
                  
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: ENTRY
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: RETURN
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: ENTRY
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer getDefaultProtocol
                  FEINER: RETURN
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer undeploy
                  FEINER: ENTRY
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer undeploy
                  FEINER: RETURN
                  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.851 sec <<< FAILURE!
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer stop
                  FEINER: ENTRY
                  16.06.2013 17:06:51 org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer stop
                  FEINER: RETURN
                  
                  Results :
                  
                  Tests in error: 
                    shouldBeAbleToInjectEJBAsInstanceVariable(org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedIntegrationClientTestCase): See nested exception; nested exception is: java.lang.NullPointerException
                  
                  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
                  
                  [INFO] ------------------------------------------------------------------------
                  [INFO] BUILD FAILURE
                  [INFO] ------------------------------------------------------------------------
                  [INFO] Total time: 10.447s
                  [INFO] Finished at: Sun Jun 16 17:06:51 CEST 2013
                  [INFO] Final Memory: 10M/126M
                  [INFO] ------------------------------------------------------------------------
                  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project arquillian-was-embedded-8: There are test failures.
                  [ERROR] 
                  [ERROR] Please refer to D:\Users\Haunted\Desktop\Neuer Ordner\arquillian-container-was\was-embedded-8\target\surefire-reports for the individual test results.
                  [ERROR] -> [Help 1]
                  [ERROR] 
                  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
                  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
                  [ERROR] 
                  [ERROR] For more information about the errors and possible solutions, please read the following articles:
                  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
                  

                   

                  Is there any tutorial descripe how to setup this with jpa support ? or know someone anything about this failure ?

                   

                  Thanks.

                   

                  Regards