1 2 Previous Next 17 Replies Latest reply: Aug 31, 2011 6:17 PM by Ben Kirby RSS

    Test EAR deploys on AS7, but test config can't be found

    Ben Kirby Newbie

      Hi,

       

      We've been successfully writing Arquillian tsts for AS6 for a few weeks now, however we've just switched to AS7. I've made what I think are the necessary changes, but now we have some tests consistently running, and others not.

       

      To clarify, all are deploying, but some don't seem to bundle the tests to run correctly - once deployed, no tests are found. Here's an example test that does this:

       

      package uk.co.magus.jam.harvest.service;
      
      import static org.junit.Assert.assertNotNull;
      
      import java.io.FileNotFoundException;
      
      import javax.inject.Inject;
      
      import org.jboss.arquillian.container.test.api.Deployment;
      import org.jboss.arquillian.junit.Arquillian;
      import org.jboss.shrinkwrap.api.Archive;
      import org.jboss.shrinkwrap.api.ShrinkWrap;
      import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
      import org.jboss.shrinkwrap.api.spec.JavaArchive;
      import org.junit.Test;
      import org.junit.runner.RunWith;
      
      import uk.co.magus.jam.core.testutil.MavenArtifactResolver;
      
      
      @RunWith(Arquillian.class)
      public class TestNewService {
      
          protected final static String[] libraries = new String[] {
              "org.jboss.seam.persistence:seam-persistence:3.0.0.Final",
              "org.jboss.seam.solder:seam-solder:3.0.0.Final"
          };
      
          @Inject private MyLittleService service;
      
          @Deployment
          public static Archive<?> createDeployment() throws FileNotFoundException {
      
              EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "main-test.ear");
      
              JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "inner-jar.jar")
              .addClass(TestNewService.class)
              .addClass(MyLittleService.class);
              System.out.println( jar.toString(true) );
      
              ear.addAsModule(jar);
      
              ear.addAsModule(MavenArtifactResolver.resolve("org.jboss.seam.persistence:seam-persistence:3.0.0.Final"));
              ear.addAsModule(MavenArtifactResolver.resolve("org.jboss.seam.solder:seam-solder:3.0.0.Final"));
              ear.addAsLibraries(MavenArtifactResolver.resolve(libraries));
      
              System.out.println( ear.toString(true) );
      
              return ear;
          }
      
          @Test
          public void testServiceCreation() {
              assertNotNull(service);
          }
      }
      

       

      It's got the @RunWith and an @Test. The inner-jar that is created has the test class in it. It deploys, and tries to find the tests:

       

      
      09:00:17,142 INFO  [org.jboss.as.server.deployment] (pool-1-thread-29) Content added at location C:\jboss-as-7.1.0.Alpha1-SNAPSHOT\standalone\data\content\36\a80967f42386ccd1fb2c6e59710df30e9f6073\content
      09:00:17,143 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-17) Starting deployment of "arquillian-service"
      09:00:17,193 INFO  [org.jboss.as.jpa] (MSC service thread 1-7) added javax.persistence.api dependency to arquillian-service
      09:00:17,199 DEBUG [org.jboss.as.arquillian] (MSC service thread 1-6) Starting Arquillian Test Runner
      09:00:17,199 INFO  [org.jboss.as.osgi] (MSC service thread 1-13) Register module: Module "deployment.arquillian-service:main" from Service Module Loader
      09:00:17,226 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-13) Install bundle: arquillian-service:0.0.0
      09:00:17,233 INFO  [org.jboss.as.server.controller] (pool-1-thread-29) Deployed "arquillian-service"
      09:00:17,448 INFO  [org.jboss.as.server.deployment] (pool-1-thread-29) Content added at location C:\jboss-as-7.1.0.Alpha1-SNAPSHOT\standalone\data\content\c6\5ce035b3df5b2f8e0878d5330827d171a104b7\content
      09:00:17,450 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-21) Starting deployment of "main-test.ear"
      09:00:17,545 INFO  [org.jboss.as.jpa] (MSC service thread 1-22) added javax.persistence.api dependency to main-test.ear
      09:00:17,548 INFO  [org.jboss.weld] (MSC service thread 1-16) Processing CDI deployment: main-test.ear
      09:00:17,584 INFO  [org.jboss.weld] (MSC service thread 1-11) Starting Services for CDI deployment: main-test.ear
      09:00:17,587 INFO  [org.jboss.weld] (MSC service thread 1-17) Starting weld service
      09:00:17,616 INFO  [org.jboss.seam.solder.Version] (MSC service thread 1-17) Seam Solder null (build id: null)
      09:00:17,626 INFO  [org.jboss.seam.solder.core.CoreExtension] (MSC service thread 1-17) Preventing class org.jboss.seam.transaction.UTTransaction from being installed as bean due to @Veto annotation
      09:00:17,639 INFO  [org.jboss.seam.solder.core.CoreExtension] (MSC service thread 1-17) Preventing class org.jboss.seam.transaction.SeSynchronizations from being installed as bean due to @Veto annotation
      09:00:17,644 INFO  [org.jboss.seam.solder.core.CoreExtension] (MSC service thread 1-17) Preventing class org.jboss.seam.transaction.CMTTransaction from being installed as bean due to @Veto annotation
      09:00:17,646 INFO  [org.jboss.seam.solder.core.CoreExtension] (MSC service thread 1-17) Preventing class org.jboss.seam.transaction.EntityTransaction from being installed as bean due to @Veto annotation
      09:00:17,654 INFO  [org.jboss.seam.solder.core.CoreExtension] (MSC service thread 1-17) Preventing class org.jboss.seam.persistence.hibernate.HibernateManagedSessionExtensionImpl from being installed as bean due to @Veto annotation
      09:00:17,654 INFO  [org.jboss.seam.solder.core.CoreExtension] (MSC service thread 1-17) Preventing class org.jboss.seam.transaction.NoTransaction from being installed as bean due to @Veto annotation
      09:00:17,763 INFO  [org.jboss.seam.solder.core.CoreExtension] (MSC service thread 1-17) Preventing class org.jboss.seam.solder.core.VersionLoggerUtil from being installed as bean due to @Veto annotation
      09:00:17,815 INFO  [org.jboss.seam.solder.core.CoreExtension] (MSC service thread 1-17) Preventing class org.jboss.seam.solder.resourceLoader.ResourceProvider from being installed as bean due to @Veto annotation
      09:00:17,944 INFO  [org.jboss.as.server.controller] (pool-1-thread-29) Deployed "main-test.ear"
      09:00:17,982 DEBUG [org.jboss.as.arquillian] (RMI TCP Connection(57)-127.0.0.1) Getting Arquillian config for: uk.co.magus.jam.harvest.service.TestNewService
      09:00:17,982 DEBUG [org.jboss.as.arquillian] (RMI TCP Connection(57)-127.0.0.1) Waiting on Arquillian config for: uk.co.magus.jam.harvest.service.TestNewService
      09:00:47,985 DEBUG [org.jboss.as.arquillian] (RMI TCP Connection(57)-127.0.0.1) Getting Arquillian config for: uk.co.magus.jam.harvest.service.TestNewService
      09:00:53,632 INFO  [org.jboss.weld] (MSC service thread 1-13) Stopping weld service
      09:00:53,659 INFO  [org.jboss.as.server.controller] (pool-1-thread-29) Undeployed "main-test.ear"
      09:00:53,667 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-9) Stopped deployment main-test.ear in 35ms
      
      

       

       

      However it can't find them. I've debugged this section, and it's fair enough - in ArquillianService, the deployedTests set is empty. The logging and subsequent error when attempting to run the test is:

       

      -------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      Running uk.co.magus.jam.harvest.service.TestNewService
      log4j: Threshold ="null".
      log4j: Retreiving an instance of org.apache.log4j.Logger.
      log4j: Setting [uk.co.magus] additivity to [true].
      log4j: Level value for uk.co.magus is  [DEBUG].
      log4j: uk.co.magus level set to DEBUG
      log4j: Class name: [org.apache.log4j.ConsoleAppender]
      log4j: Setting property [target] to [System.out].
      log4j: Setting property [threshold] to [ALL].
      log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
      log4j: Setting property [conversionPattern] to [%d{ABSOLUTE} %-5p [%c{1}] %m%n].
      log4j: Adding appender named [CONSOLE] to category [root].
      24-Aug-2011 10:00:15 org.jboss.arquillian.container.impl.client.container.ContainerRegistryCreator getActivatedConfiguration
      INFO: Could not read active container configuration: null
      10:00:15,678 DEBUG [MBeanServerConnectionProvider] Connecting JMXConnector to: service:jmx:rmi:///jndi/rmi://127.0.0.1:1090/jmxrmi
      inner-jar.jar:
      /uk/
      /uk/co/
      /uk/co/magus/
      /uk/co/magus/jam/
      /uk/co/magus/jam/harvest/
      /uk/co/magus/jam/harvest/service/
      /uk/co/magus/jam/harvest/service/MyLittleService.class
      /uk/co/magus/jam/harvest/service/TestNewService.class
      main-test.ear:
      /lib/
      /lib/seam-persistence-3.0.0.Final.jar
      /lib/seam-solder-3.0.0.Final.jar
      /seam-persistence-3.0.0.Final.jar
      /inner-jar.jar
      /seam-solder-3.0.0.Final.jar
      10:00:16,276 DEBUG [DelegatingApplicationArchiveProcessor] Process archive 'main-test.ear' with: org.jboss.as.arquillian.container.ModuleApplicationArchiveProcessor@2e257f1b
      10:00:16,277 DEBUG [ModuleApplicationArchiveProcessor] Add dependencies: org.jboss.modules,deployment.arquillian-service,org.jboss.msc
      10:00:16,279 DEBUG [DelegatingApplicationArchiveProcessor] Manifest for main-test.ear:
      Manifest-Version: 1.0
      Dependencies: org.jboss.modules,deployment.arquillian-service,org.jbos
       s.msc
      
      
      10:00:16,280 DEBUG [JMXProtocolPackager] Generating: arquillian-service
      10:00:16,291 DEBUG [JMXProtocolPackager] Merging archive: arquillian-testenricher-cdi.jar: 13 assets
      10:00:16,291 DEBUG [JMXProtocolPackager] Merging archive: arquillian-testenricher-osgi.jar: 9 assets
      10:00:16,292 DEBUG [JMXProtocolPackager] Merging archive: arquillian-testenricher-ejb.jar: 8 assets
      10:00:16,293 DEBUG [JMXProtocolPackager] Merging archive: arquillian-junit.jar: 252 assets
      10:00:16,297 DEBUG [JMXProtocolPackager] Merging archive: arquillian-testenricher-resource.jar: 8 assets
      10:00:16,298 DEBUG [JMXProtocolPackager] Merging archive: arquillian-testenricher-msc.jar: 7 assets
      10:00:16,300 DEBUG [JMXProtocolPackager] Merging archive: arquillian-core.jar: 578 assets
      10:00:16,310 DEBUG [JMXProtocolPackager] Merging archive: arquillian-testenricher-initialcontext.jar: 3 assets
      10:00:16,313 DEBUG [JMXProtocolPackager] Loadable extensions: [org.jboss.arquillian.testenricher.ejb.container.EJBEnricherRemoteExtension, org.jboss.arquillian.testenricher.cdi.container.CDIEnricherRemoteExtension, org.jboss.arquillian
      .testenricher.initialcontext.container.InitialContextRemoteExtension, org.jboss.arquillian.testenricher.resource.container.ResourceEnricherRemoteExtension, org.jboss.as.arquillian.service.JMXProtocolEndpointExtension, org.jboss.arquill
      ian.container.test.impl.ContainerTestRemoteExtension, org.jboss.arquillian.testenricher.msc.MSCEnricherRemoteExtension, org.jboss.arquillian.testenricher.osgi.OSGiEnricherRemoteExtension]
      10:00:16,385 INFO  [remoting] JBoss Remoting version 3.2.0.Beta2
      10:00:16,393 INFO  [xnio] XNIO Version 3.0.0.Beta3
      10:00:16,407 INFO  [nio] XNIO NIO Implementation Version 3.0.0.Beta3
      10:00:16,424 DEBUG [channel-thread] Started channel thread 'XNIO NIO Read 1', selector sun.nio.ch.WindowsSelectorImpl@44aea710
      10:00:16,425 DEBUG [channel-thread] Started channel thread 'XNIO NIO Write 1', selector sun.nio.ch.WindowsSelectorImpl@2d397e5c
      10:00:16,519 INFO  [ArquillianServiceDeployer] Found already deployed arquillian service: "arquillian-service"
      10:00:16,520 INFO  [ArquillianServiceDeployer] Undeploying arquillian service  with: {
          "operation" => "composite",
          "address" => [],
          "steps" => [
              {
                  "operation" => "undeploy",
                  "address" => ("deployment" => "arquillian-service")
              },
              {
                  "operation" => "remove",
                  "address" => ("deployment" => "arquillian-service")
              }
          ]
      }
      10:00:16,523 DEBUG [channel-thread] Started channel thread 'XNIO NIO Read 2', selector sun.nio.ch.WindowsSelectorImpl@242da5a6
      10:00:16,523 DEBUG [channel-thread] Started channel thread 'XNIO NIO Write 2', selector sun.nio.ch.WindowsSelectorImpl@3488b1e6
      10:00:16,568 INFO  [ArquillianServiceDeployer] Deploy arquillian service: arquillian-service: 903 assets
      10:00:16,587 DEBUG [channel-thread] Started channel thread 'XNIO NIO Read 3', selector sun.nio.ch.WindowsSelectorImpl@106df95
      10:00:16,588 DEBUG [channel-thread] Started channel thread 'XNIO NIO Write 3', selector sun.nio.ch.WindowsSelectorImpl@317b1d64
      10:00:17,240 DEBUG [channel-thread] Started channel thread 'XNIO NIO Read 4', selector sun.nio.ch.WindowsSelectorImpl@694b081b
      10:00:17,240 DEBUG [channel-thread] Started channel thread 'XNIO NIO Write 4', selector sun.nio.ch.WindowsSelectorImpl@6335605a
      10:00:17,956 DEBUG [OSGiTestEnricher] System bundle context not available
      10:00:17,981 DEBUG [JMXMethodExecutor] Invoke REMOTE: uk.co.magus.jam.harvest.service.TestNewService.testServiceCreation
      10:00:53,600 DEBUG [JMXMethodExecutor] Result: TestResult[status=FAILED,time=0ms]
      10:00:53,602 ERROR [JMXMethodExecutor] Failed: uk.co.magus.jam.harvest.service.TestNewService.testServiceCreation
      java.lang.IllegalStateException: Cannot obtain Arquillian config for: uk.co.magus.jam.harvest.service.TestNewService
              at org.jboss.as.arquillian.service.ArquillianService.getArquillianConfig(ArquillianService.java:180)
              at org.jboss.as.arquillian.service.ArquillianService.getArquillianConfig(ArquillianService.java:190)
              at org.jboss.as.arquillian.service.ArquillianService.access$300(ArquillianService.java:66)
              at org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethodRemote(ArquillianService.java:201)
              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 com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)
              at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)
              at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
              at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
              at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
              at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
              at org.jboss.as.jmx.tcl.TcclMBeanServer.invoke(TcclMBeanServer.java:214)
              at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
              at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
              at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
              at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1359)
              at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
              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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
              at sun.rmi.transport.Transport$1.run(Transport.java:159)
              at java.security.AccessController.doPrivileged(Native Method)
              at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
              at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
              at java.lang.Thread.run(Thread.java:619)
      10:00:53,623 DEBUG [channel-thread] Started channel thread 'XNIO NIO Read 5', selector sun.nio.ch.WindowsSelectorImpl@1ad5cabc
      10:00:53,624 DEBUG [channel-thread] Started channel thread 'XNIO NIO Write 5', selector sun.nio.ch.WindowsSelectorImpl@5bf2af1c
      10:00:53,669 ERROR [remote] JBREM00200: Remote connection failed: java.io.IOException: Message data for non-existent channel
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 38.311 sec <<< FAILURE!
      
      Results :
      
      Tests in error:
        testServiceCreation(uk.co.magus.jam.harvest.service.TestNewService): Cannot obtain Arquillian config for: uk.co.magus.jam.harvest.service.TestNewService
      

       

       

      However a different test with the same pom/jboss-as7 profile configuration DOES run.

       

      Does anyone have any idea about what could be causing the deployedTests in the service to be empty?

       

      The packaging of the EAR is printed in the logging above, but, again, I believe this has worked for other tests. Am I missing some new AS7 config? I'm using version 7.1.0.Alpha1-SNAPSHOT from 18/08/11.

        • 1. Re: Test EAR deploys on AS7, but test config can't be found
          Aslak Knutsen Master

          I think this could be a issue with EARs in general combined with the Arquillian Service in AS7. Could you file a issue https://issues.jboss.org/browse/AS7 and add it to the TestSuite component ?

           

          As a workaround you can add a dependency to org.jboss.arquillian.protocol:arquillian-protocol-servlet

           

          and add this to your arq.xml

           

          <arquillian>

             <defaultProtocol type="Servlet 3.0" />

          </arquillian>

           

          That will override the default JMX / Service based Protocol used by the AS7 Contianer and use the same protoclol used by JBoss AS 6.

          • 2. Re: Test EAR deploys on AS7, but test config can't be found
            Ben Kirby Newbie

            Thanks a lot for the quick reply, Aslak, and for the advice. Unfortunately I'm now getting an IllegalArgumentException...

             

            java.lang.IllegalArgumentException: No org.jboss.arquillian.container.spi.client.protocol.metadata.HTTPContext found in org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaData. Servlet protocol can not be used
                at org.jboss.arquillian.protocol.servlet.ServletUtil.determineBaseURI(ServletUtil.java:75)
                at org.jboss.arquillian.protocol.servlet.BaseServletProtocol.getExecutor(BaseServletProtocol.java:58)
                at org.jboss.arquillian.protocol.servlet.BaseServletProtocol.getExecutor(BaseServletProtocol.java:32)
                at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.getContainerMethodExecutor(RemoteTestExecuter.java:136)
                at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:119)
                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: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.execution.ClientTestExecuter.execute(ClientTestExecuter.java:68)
                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:130)
                at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:117)
                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:82)
                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:68)
                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:54)
                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:134)
                at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111)
                at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:239)
                at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:202)
                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:290)
                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:45)
                at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:216)
                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:161)
                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:290)
                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:45)
                at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:175)
                at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:123)
                at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
                at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
                at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
                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.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
                at $Proxy0.invoke(Unknown Source)
                at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
                at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
                at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
            

             

             

            I've added

             

            <dependency>
                        <groupId>org.jboss.arquillian.protocol</groupId>
                        <artifactId>arquillian-protocol-servlet</artifactId>
                        <version>${arquillian.version}</version>
                        <scope>provided</scope>
            </dependency>
            

             

            to the pom that runs the test (version is 1.0.0.CR1), and my arquillian.xml now looks like

             

            <?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">
            
               <!-- Example configuration for a remote JBoss AS 7 instance -->
               <defaultProtocol type="Servlet 3.0" />
               <container qualifier="jboss" default="true">
                   <protocol type="jmx-as7">
                      <property name="executionType">REMOTE</property>
                   </protocol>
                </container></arquillian>
            

             

             

            Is this correct? Apologies if I've misconstrued your advice.

             

             

             

             

            • 3. Re: Test EAR deploys on AS7, but test config can't be found
              Aslak Knutsen Master

              Your running a bit old AS7 SNAPSHOT. Upgrade to 7.0.1.Final or latest AS7 SNAPSHOT

               

              Configuration looks correct.

               

              Just as a note, with a AS7 > 7.0.1.Final the <protocol type="jmx-as7"> executionType=REMOTE configuration part is not needed.

               

              > 7.0.1.Final runs on Arquillian 1.0.0.CR4

              • 4. Re: Test EAR deploys on AS7, but test config can't be found
                Ben Kirby Newbie

                Ah, great, thanks. Things are moving quickly!

                 

                I'll give it a go.

                • 5. Re: Test EAR deploys on AS7, but test config can't be found
                  Ben Kirby Newbie

                  Hi again Aslak. I've tried using this morning's 7.1.0.Alpha1-SNAPSHOT and 7.0.1.Final, and the test archive now fails to deploy on both with the different error:

                   

                  Caused by: java.lang.Exception: {"Services with missing/unavailable dependencies" => [
                       "jboss.deployment.subunit.\"main-test.ear\".\"test.war\".CONFIGURE_MODULE missing [ jboss.module.information.service.\"deployment.arquillian-service\".main ]",
                      "jboss.deployment.unit.\"main-test.ear\".CONFIGURE_MODULE missing [ jboss.module.information.service.\"deployment.arquillian-service\".main ]"
                  ]}
                  

                   

                   

                  Full trace below.

                   

                  Now I'm using the Servlet 3.0 protocol as a workaround, this seems to match AS7-1361. Is marked fixed though? Anything I can add to modules dir or a MANIFEST.MF I can chuck into the test archive(s) as a workaround?

                   

                  Full trace:

                   

                  org.jboss.arquillian.container.spi.client.container.DeploymentException: Could not deploy to container
                      at org.jboss.as.arquillian.container.ArchiveDeployer.deploy(ArchiveDeployer.java:58)
                      at org.jboss.as.arquillian.container.CommonDeployableContainer.deploy(CommonDeployableContainer.java:111)
                      at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:148)
                      at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:115)
                      at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:258)
                      at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:114)
                      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.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)
                      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.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.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.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: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: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:86)
                      at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:79)
                      at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:250)
                      at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:226)
                      at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:78)
                      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: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:97)
                      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.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:68)
                      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:54)
                      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: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:158)
                      at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:290)
                      at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:45)
                      at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:175)
                      at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
                      at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:123)
                      at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
                      at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
                      at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
                      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.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
                      at $Proxy0.invoke(Unknown Source)
                      at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
                      at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
                      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
                  Caused by: java.lang.Exception: {"Services with missing/unavailable dependencies" => [
                      "jboss.deployment.subunit.\"main-test.ear\".\"test.war\".CONFIGURE_MODULE missing [ jboss.module.information.service.\"deployment.arquillian-service\".main ]",
                      "jboss.deployment.unit.\"main-test.ear\".CONFIGURE_MODULE missing [ jboss.module.information.service.\"deployment.arquillian-service\".main ]"
                  ]}
                      at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getActionResult(ServerDeploymentPlanResultFuture.java:99)
                      at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getResultFromNode(ServerDeploymentPlanResultFuture.java:88)
                      at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.get(ServerDeploymentPlanResultFuture.java:70)
                      at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.get(ServerDeploymentPlanResultFuture.java:42)
                      at org.jboss.as.arquillian.container.ArchiveDeployer.executeDeploymentPlan(ArchiveDeployer.java:75)
                      at org.jboss.as.arquillian.container.ArchiveDeployer.deploy(ArchiveDeployer.java:56)
                      ... 94 more
                  

                   

                  • 6. Re: Test EAR deploys on AS7, but test config can't be found
                    Aslak Knutsen Master

                    That should have been fixed. What does your dependency tree look like?

                     

                    I'm abit sporadic online over the next days, but I'll try to keep an eye out for this one

                    • 7. Re: Test EAR deploys on AS7, but test config can't be found
                      Ben Kirby Newbie

                      No problem Aslak - thanks. Really appreciate your help.

                       

                      Dependency tree for the test module:

                       

                       

                      [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ jam-testsuite-service-harvest ---
                      [INFO] uk.co.magus.jam:jam-testsuite-service-harvest:jar:2011.1.2-SNAPSHOT
                      [INFO] +- org.jboss.seam.persistence:seam-persistence:jar:3.0.0.Final:compile
                      [INFO] +- org.jboss.seam.solder:seam-solder:jar:3.0.0.Final:compile
                      [INFO] +- uk.co.magus.jam:jam-testsuite-core:jar:2011.1.2-SNAPSHOT:compile
                      [INFO] +- org.jboss.arquillian.protocol:arquillian-protocol-servlet:jar:1.0.0.CR4:provided
                      [INFO] |  +- org.jboss.arquillian.container:arquillian-container-spi:jar:1.0.0.CR4:provided
                      [INFO] |  |  +- org.jboss.arquillian.core:arquillian-core-spi:jar:1.0.0.CR4:provided
                      [INFO] |  |  +- org.jboss.arquillian.config:arquillian-config-api:jar:1.0.0.CR4:provided
                      [INFO] |  |  +- org.jboss.arquillian.config:arquillian-config-impl-base:jar:1.0.0.CR4:provided
                      [INFO] |  |  |  \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-spi:jar:1.1.0-alpha-2:provided
                      [INFO] |  |  +- org.jboss.shrinkwrap:shrinkwrap-api:jar:1.0.0-beta-5:provided
                      [INFO] |  |  \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api:jar:1.1.0-alpha-2:provided
                      [INFO] |  \- org.jboss.arquillian.container:arquillian-container-test-spi:jar:1.0.0.CR4:provided
                      [INFO] +- javax.enterprise:cdi-api:jar:1.0:provided
                      [INFO] |  +- org.jboss.interceptor:jboss-interceptor-api:jar:1.1:provided
                      [INFO] |  +- javax.annotation:jsr250-api:jar:1.0:provided
                      [INFO] |  \- javax.inject:javax.inject:jar:1:provided
                      [INFO] +- org.jboss.ejb3:jboss-ejb3-api:jar:3.1.0:provided
                      [INFO] |  +- jboss.jbossws:jboss-jaxrpc:jar:2.0.3.GA:provided
                      [INFO] |  \- org.jboss.javaee:jboss-transaction-api:jar:1.0.1.CR2:provided
                      [INFO] +- org.hibernate:hibernate-entitymanager:jar:4.0.0.Alpha2:provided
                      [INFO] |  +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:provided
                      [INFO] |  +- dom4j:dom4j:jar:1.6.1:provided
                      [INFO] |  |  \- xml-apis:xml-apis:jar:1.0.b2:provided
                      [INFO] |  +- org.hibernate:hibernate-core:jar:3.6.0.Final:provided (version managed from 4.0.0.Alpha2)
                      [INFO] |  |  +- antlr:antlr:jar:2.7.6:provided
                      [INFO] |  |  +- commons-collections:commons-collections:jar:3.1:provided
                      [INFO] |  |  \- org.slf4j:slf4j-api:jar:1.6.1:provided
                      [INFO] |  +- javassist:javassist:jar:3.12.0.GA:provided
                      [INFO] |  +- javax.transaction:jta:jar:1.1:provided
                      [INFO] |  \- org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:provided
                      [INFO] +- uk.co.magus.jam:core-jar:jar:2011.1.2-SNAPSHOT:compile
                      [INFO] |  +- uk.co.magus.jam:store-core:jar:2011.1.2-SNAPSHOT:compile
                      [INFO] |  +- org.jboss.as:jboss-as-jmx:jar:7.0.0.Final:compile
                      [INFO] |  |  +- org.jboss:jboss-common-core:jar:2.2.17.GA:compile
                      [INFO] |  |  +- org.jboss.msc:jboss-msc:jar:1.0.0.GA:compile
                      [INFO] |  |  +- org.jboss.as:jboss-as-server:jar:7.0.0.Final:compile
                      [INFO] |  |  |  +- org.jboss.as:jboss-as-controller:jar:7.0.0.Final:compile
                      [INFO] |  |  |  |  +- org.jboss.logging:jboss-logging:jar:3.0.0.GA:compile
                      [INFO] |  |  |  |  +- org.jboss.as:jboss-as-controller-client:jar:7.0.0.Final:compile
                      [INFO] |  |  |  |  \- org.jboss:staxmapper:jar:1.0.0.Final:compile
                      [INFO] |  |  |  +- org.jboss.as:jboss-as-domain-http-api:jar:7.0.0.Final:compile
                      [INFO] |  |  |  |  +- org.jboss.as:jboss-as-domain-management:jar:7.0.0.Final:compile
                      [INFO] |  |  |  |  +- org.jboss.com.sun.httpserver:httpserver:jar:1.0.0.Beta1:compile
                      [INFO] |  |  |  |  \- org.jboss.as:jboss-as-console:jar:resources:1.0.0.Beta13:compile
                      [INFO] |  |  |  +- org.jboss.as:jboss-as-deployment-repository:jar:7.0.0.Final:compile
                      [INFO] |  |  |  +- org.jboss.as:jboss-as-embedded:jar:7.0.0.Final:compile
                      [INFO] |  |  |  +- org.jboss.as:jboss-as-process-controller:jar:7.0.0.Final:compile
                      [INFO] |  |  |  |  +- org.jboss.as:jboss-as-protocol:jar:7.0.0.Final:compile
                      [INFO] |  |  |  |  |  \- org.jboss.xnio:xnio-nio:jar:3.0.0.Beta3:compile
                      [INFO] |  |  |  |  \- system:jdk-tools:jar:jdk:system
                      [INFO] |  |  |  +- org.jboss.as:jboss-as-remoting:jar:7.0.0.Final:compile
                      [INFO] |  |  |  |  +- org.jboss.as:jboss-as-network:jar:7.0.0.Final:compile
                      [INFO] |  |  |  |  +- org.jboss.xnio:xnio-api:jar:3.0.0.Beta3:compile
                      [INFO] |  |  |  |  \- org.jboss.as:jboss-as-threads:jar:7.0.0.Final:compile
                      [INFO] |  |  |  +- org.jboss:jandex:jar:1.0.0.Final:compile
                      [INFO] |  |  |  +- org.jboss:jboss-dmr:jar:1.0.0.Final:compile
                      [INFO] |  |  |  +- org.jboss.invocation:jboss-invocation:jar:1.0.0.Final:compile
                      [INFO] |  |  |  +- org.jboss.logmanager:jboss-logmanager:jar:1.2.0.CR4:compile
                      [INFO] |  |  |  +- org.jboss.logmanager:jboss-logmanager-log4j:jar:1.0.0.GA:compile
                      [INFO] |  |  |  +- org.jboss.marshalling:jboss-marshalling:jar:1.3.0.GA:compile
                      [INFO] |  |  |  +- org.jboss.modules:jboss-modules:jar:1.0.1.GA:compile
                      [INFO] |  |  |  +- org.jboss.remoting3:jboss-remoting:jar:3.2.0.Beta2:compile
                      [INFO] |  |  |  +- org.jboss.sasl:jboss-sasl:jar:1.0.0.Beta1:compile
                      [INFO] |  |  |  +- org.jboss.stdio:jboss-stdio:jar:1.0.0.GA:compile
                      [INFO] |  |  |  +- org.jboss.threads:jboss-threads:jar:2.0.0.GA:compile
                      [INFO] |  |  |  \- org.jboss:jboss-vfs:jar:3.0.1.GA:compile
                      [INFO] |  |  \- org.jboss.as:jboss-as-build-config:jar:7.0.0.Final:compile
                      [INFO] |  +- javax.mail:javax.mail-api:jar:1.4.4:compile
                      [INFO] |  |  \- javax.activation:activation:jar:1.1:compile
                      [INFO] |  +- javax.jms:jms-api:jar:1.1-rev-1:compile
                      [INFO] |  +- commons-math:commons-math:jar:1.1:provided (scope managed from compile)
                      [INFO] |  |  +- commons-logging:commons-logging:jar:1.0.3:provided
                      [INFO] |  |  \- commons-discovery:commons-discovery:jar:0.2:provided
                      [INFO] |  +- gifDecoder:gifDecoder:jar:1.0:compile
                      [INFO] |  \- lingpipe:lingpipe:jar:3.0.0:compile
                      [INFO] +- junit:junit:jar:4.8.1:test
                      [INFO] +- junit:junit-dep:jar:4.8:test
                      [INFO] |  \- org.hamcrest:hamcrest-core:jar:1.1:test
                      [INFO] +- org.jboss.arquillian.junit:arquillian-junit-container:jar:1.0.0.CR4:test
                      [INFO] |  +- org.jboss.arquillian.junit:arquillian-junit-core:jar:1.0.0.CR4:test
                      [INFO] |  +- org.jboss.arquillian.test:arquillian-test-api:jar:1.0.0.CR4:test
                      [INFO] |  |  \- org.jboss.arquillian.core:arquillian-core-api:jar:1.0.0.CR4:test
                      [INFO] |  +- org.jboss.arquillian.test:arquillian-test-spi:jar:1.0.0.CR4:test
                      [INFO] |  +- org.jboss.arquillian.container:arquillian-container-test-api:jar:1.0.0.CR4:test
                      [INFO] |  +- org.jboss.arquillian.core:arquillian-core-impl-base:jar:1.0.0.CR4:test
                      [INFO] |  +- org.jboss.arquillian.test:arquillian-test-impl-base:jar:1.0.0.CR4:test
                      [INFO] |  +- org.jboss.arquillian.container:arquillian-container-impl-base:jar:1.0.0.CR4:test
                      [INFO] |  +- org.jboss.arquillian.container:arquillian-container-test-impl-base:jar:1.0.0.CR4:test
                      [INFO] |  \- org.jboss.shrinkwrap:shrinkwrap-impl-base:jar:1.0.0-beta-5:test
                      [INFO] |     \- org.jboss.shrinkwrap:shrinkwrap-spi:jar:1.0.0-beta-5:test
                      [INFO] \- com.sun.jersey:jersey-core:jar:1.1.5:provided
                      [INFO]    \- javax.ws.rs:jsr311-api:jar:1.1.1:provided
                      

                       

                       

                      Some of the stuff from core is pulled in from a parent pom - something there tainting the rest of it?

                      • 8. Re: Test EAR deploys on AS7, but test config can't be found
                        Aslak Knutsen Master

                        seems like your still running on 7.0.0.final

                        • 9. Re: Test EAR deploys on AS7, but test config can't be found
                          Ben Kirby Newbie

                          Damn, you're right - distribution may be updated, but not the relevant versions in the master pom! Sorry about that...

                           

                          Fixed it up by changing both the main dependency and the Arquillian container-related profile dependency versions to 7.0.1.Final - 7.1.0.Alpha1-SNAPSHOT artefacts don't appear to be publically available. With this change, the dependency tree looks correct:

                           

                           

                          [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ jam-testsuite-service-harvest ---
                          [INFO] uk.co.magus.jam:jam-testsuite-service-harvest:jar:2011.1.2-SNAPSHOT
                          [INFO] +- org.jboss.seam.persistence:seam-persistence:jar:3.0.0.Final:compile
                          [INFO] +- org.jboss.seam.solder:seam-solder:jar:3.0.0.Final:compile
                          [INFO] +- uk.co.magus.jam:jam-testsuite-core:jar:2011.1.2-SNAPSHOT:compile
                          [INFO] +- org.jboss.arquillian.protocol:arquillian-protocol-servlet:jar:1.0.0.CR4:provided
                          [INFO] |  +- org.jboss.arquillian.container:arquillian-container-spi:jar:1.0.0.CR4:provided
                          [INFO] |  |  +- org.jboss.arquillian.core:arquillian-core-spi:jar:1.0.0.CR4:provided
                          [INFO] |  |  +- org.jboss.arquillian.config:arquillian-config-api:jar:1.0.0.CR4:provided
                          [INFO] |  |  +- org.jboss.arquillian.config:arquillian-config-impl-base:jar:1.0.0.CR4:provided
                          [INFO] |  |  |  \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-spi:jar:1.1.0-alpha-2:provided
                          [INFO] |  |  +- org.jboss.shrinkwrap:shrinkwrap-api:jar:1.0.0-beta-5:provided
                          [INFO] |  |  \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api:jar:1.1.0-alpha-2:provided
                          [INFO] |  \- org.jboss.arquillian.container:arquillian-container-test-spi:jar:1.0.0.CR4:provided
                          [INFO] +- log4j:log4j:jar:1.2.16:provided
                          [INFO] +- javax.enterprise:cdi-api:jar:1.0:provided
                          [INFO] |  +- org.jboss.interceptor:jboss-interceptor-api:jar:1.1:provided
                          [INFO] |  +- javax.annotation:jsr250-api:jar:1.0:provided
                          [INFO] |  \- javax.inject:javax.inject:jar:1:provided
                          [INFO] +- org.jboss.ejb3:jboss-ejb3-api:jar:3.1.0:provided
                          [INFO] |  +- jboss.jbossws:jboss-jaxrpc:jar:2.0.3.GA:provided
                          [INFO] |  \- org.jboss.javaee:jboss-transaction-api:jar:1.0.1.CR2:provided
                          [INFO] +- org.hibernate:hibernate-entitymanager:jar:4.0.0.Alpha2:provided
                          [INFO] |  +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:provided
                          [INFO] |  +- dom4j:dom4j:jar:1.6.1:provided
                          [INFO] |  |  \- xml-apis:xml-apis:jar:1.0.b2:provided
                          [INFO] |  +- org.hibernate:hibernate-core:jar:3.6.0.Final:provided (version managed from 4.0.0.Alpha2)
                          [INFO] |  |  +- antlr:antlr:jar:2.7.6:provided
                          [INFO] |  |  +- commons-collections:commons-collections:jar:3.1:provided
                          [INFO] |  |  \- org.slf4j:slf4j-api:jar:1.6.1:provided
                          [INFO] |  +- javassist:javassist:jar:3.12.0.GA:provided
                          [INFO] |  +- javax.transaction:jta:jar:1.1:provided
                          [INFO] |  \- org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:provided
                          [INFO] +- uk.co.magus.jam:core-jar:jar:2011.1.2-SNAPSHOT:compile
                          [INFO] |  +- uk.co.magus.jam:store-core:jar:2011.1.2-SNAPSHOT:compile
                          [INFO] |  +- org.jboss.as:jboss-as-jmx:jar:7.0.1.Final:compile
                          [INFO] |  |  +- org.jboss:jboss-common-core:jar:2.2.17.GA:compile
                          [INFO] |  |  +- org.jboss.msc:jboss-msc:jar:1.0.0.GA:compile
                          [INFO] |  |  +- org.jboss.as:jboss-as-server:jar:7.0.1.Final:compile
                          [INFO] |  |  |  +- org.jboss.as:jboss-as-controller:jar:7.0.1.Final:compile
                          [INFO] |  |  |  |  +- org.jboss.logging:jboss-logging:jar:3.0.0.GA:compile
                          [INFO] |  |  |  |  +- org.jboss.as:jboss-as-controller-client:jar:7.0.1.Final:compile
                          [INFO] |  |  |  |  \- org.jboss:staxmapper:jar:1.0.0.Final:compile
                          [INFO] |  |  |  +- org.jboss.as:jboss-as-domain-http-api:jar:7.0.1.Final:compile
                          [INFO] |  |  |  |  +- org.jboss.as:jboss-as-domain-management:jar:7.0.1.Final:compile
                          [INFO] |  |  |  |  +- org.jboss.com.sun.httpserver:httpserver:jar:1.0.0.Beta1:compile
                          [INFO] |  |  |  |  \- org.jboss.as:jboss-as-console:jar:resources:1.0.0.Beta16:compile
                          [INFO] |  |  |  +- org.jboss.as:jboss-as-deployment-repository:jar:7.0.1.Final:compile
                          [INFO] |  |  |  +- org.jboss.as:jboss-as-embedded:jar:7.0.1.Final:compile
                          [INFO] |  |  |  +- org.jboss.as:jboss-as-process-controller:jar:7.0.1.Final:compile
                          [INFO] |  |  |  |  +- org.jboss.as:jboss-as-protocol:jar:7.0.1.Final:compile
                          [INFO] |  |  |  |  |  \- org.jboss.xnio:xnio-nio:jar:3.0.0.Beta3:compile
                          [INFO] |  |  |  |  \- system:jdk-tools:jar:jdk:system
                          [INFO] |  |  |  +- org.jboss.as:jboss-as-remoting:jar:7.0.1.Final:compile
                          [INFO] |  |  |  |  +- org.jboss.as:jboss-as-network:jar:7.0.1.Final:compile
                          [INFO] |  |  |  |  +- org.jboss.xnio:xnio-api:jar:3.0.0.Beta3:compile
                          [INFO] |  |  |  |  \- org.jboss.as:jboss-as-threads:jar:7.0.1.Final:compile
                          [INFO] |  |  |  +- org.jboss:jandex:jar:1.0.0.Final:compile
                          [INFO] |  |  |  +- org.jboss:jboss-dmr:jar:1.0.0.Final:compile
                          [INFO] |  |  |  +- org.jboss.invocation:jboss-invocation:jar:1.1.0.Final:compile
                          [INFO] |  |  |  +- org.jboss.logmanager:jboss-logmanager:jar:1.2.0.CR4:compile
                          [INFO] |  |  |  +- org.jboss.logmanager:jboss-logmanager-log4j:jar:1.0.0.GA:compile
                          [INFO] |  |  |  +- org.jboss.marshalling:jboss-marshalling:jar:1.3.0.GA:compile
                          [INFO] |  |  |  +- org.jboss.modules:jboss-modules:jar:1.0.1.GA:compile
                          [INFO] |  |  |  +- org.jboss.remoting3:jboss-remoting:jar:3.2.0.Beta2:compile
                          [INFO] |  |  |  +- org.jboss.sasl:jboss-sasl:jar:1.0.0.Beta1:compile
                          [INFO] |  |  |  +- org.jboss.stdio:jboss-stdio:jar:1.0.0.GA:compile
                          [INFO] |  |  |  +- org.jboss.threads:jboss-threads:jar:2.0.0.GA:compile
                          [INFO] |  |  |  \- org.jboss:jboss-vfs:jar:3.0.1.GA:compile
                          [INFO] |  |  \- org.jboss.as:jboss-as-build-config:jar:7.0.1.Final:compile
                          [INFO] |  +- javax.mail:javax.mail-api:jar:1.4.4:compile
                          [INFO] |  |  \- javax.activation:activation:jar:1.1:compile
                          [INFO] |  +- javax.jms:jms-api:jar:1.1-rev-1:compile
                          [INFO] |  +- commons-math:commons-math:jar:1.1:provided (scope managed from compile)
                          [INFO] |  |  +- commons-logging:commons-logging:jar:1.0.3:provided
                          [INFO] |  |  \- commons-discovery:commons-discovery:jar:0.2:provided
                          [INFO] |  +- gifDecoder:gifDecoder:jar:1.0:compile
                          [INFO] |  \- lingpipe:lingpipe:jar:3.0.0:compile
                          [INFO] +- junit:junit:jar:4.8.1:test
                          [INFO] +- junit:junit-dep:jar:4.8:test
                          [INFO] |  \- org.hamcrest:hamcrest-core:jar:1.1:test
                          [INFO] +- org.jboss.arquillian.junit:arquillian-junit-container:jar:1.0.0.CR4:test
                          [INFO] |  +- org.jboss.arquillian.junit:arquillian-junit-core:jar:1.0.0.CR4:test
                          [INFO] |  +- org.jboss.arquillian.test:arquillian-test-api:jar:1.0.0.CR4:test
                          [INFO] |  |  \- org.jboss.arquillian.core:arquillian-core-api:jar:1.0.0.CR4:test
                          [INFO] |  +- org.jboss.arquillian.test:arquillian-test-spi:jar:1.0.0.CR4:test
                          [INFO] |  +- org.jboss.arquillian.container:arquillian-container-test-api:jar:1.0.0.CR4:test
                          [INFO] |  +- org.jboss.arquillian.core:arquillian-core-impl-base:jar:1.0.0.CR4:test
                          [INFO] |  +- org.jboss.arquillian.test:arquillian-test-impl-base:jar:1.0.0.CR4:test
                          [INFO] |  +- org.jboss.arquillian.container:arquillian-container-impl-base:jar:1.0.0.CR4:test
                          [INFO] |  +- org.jboss.arquillian.container:arquillian-container-test-impl-base:jar:1.0.0.CR4:test
                          [INFO] |  \- org.jboss.shrinkwrap:shrinkwrap-impl-base:jar:1.0.0-beta-5:test
                          [INFO] |     \- org.jboss.shrinkwrap:shrinkwrap-spi:jar:1.0.0-beta-5:test
                          [INFO] \- com.sun.jersey:jersey-core:jar:1.1.5:provided
                          [INFO]    \- javax.ws.rs:jsr311-api:jar:1.1.1:provided
                          

                           

                           

                          Running the test against 7.0.1.Final distribution now yields a different error:

                           

                          -------------------------------------------------------
                           T E S T S
                          -------------------------------------------------------
                          Running uk.co.magus.jam.harvest.service.TestNewService
                          log4j: reset attribute= "false".
                          log4j: Threshold ="null".
                          log4j: Retreiving an instance of org.apache.log4j.Logger.
                          log4j: Setting [uk.co.magus] additivity to [true].
                          log4j: Level value for uk.co.magus is  [DEBUG].
                          log4j: uk.co.magus level set to DEBUG
                          log4j: Class name: [org.apache.log4j.ConsoleAppender]
                          log4j: Setting property [target] to [System.out].
                          log4j: Setting property [threshold] to [ALL].
                          log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
                          log4j: Setting property [conversionPattern] to [%d{ABSOLUTE} %-5p [%c{1}] %m%n].
                          log4j: Adding appender named [CONSOLE] to category [root].
                          25-Aug-2011 13:15:57 org.jboss.arquillian.container.impl.client.container.ContainerRegistryCreator getActivatedConfiguration
                          INFO: Could not read active container configuration: null
                          inner-jar.jar:
                          /uk/
                          /uk/co/
                          /uk/co/magus/
                          /uk/co/magus/jam/
                          /uk/co/magus/jam/harvest/
                          /uk/co/magus/jam/harvest/service/
                          /uk/co/magus/jam/harvest/service/MyLittleService.class
                          /uk/co/magus/jam/harvest/service/TestNewService.class
                          main-test.ear:
                          /lib/
                          /lib/seam-persistence-3.0.0.Final.jar
                          /lib/seam-solder-3.0.0.Final.jar
                          /seam-persistence-3.0.0.Final.jar
                          /inner-jar.jar
                          /seam-solder-3.0.0.Final.jar
                          13:15:58,063 INFO  [remoting] JBoss Remoting version 3.2.0.Beta2
                          13:15:58,071 INFO  [xnio] XNIO Version 3.0.0.Beta3
                          13:15:58,086 INFO  [nio] XNIO NIO Implementation Version 3.0.0.Beta3
                          13:15:58,104 DEBUG [channel-thread] Started channel thread 'XNIO NIO Read 1', selector sun.nio.ch.WindowsSelectorImpl@101a0ae6
                          13:15:58,105 DEBUG [channel-thread] Started channel thread 'XNIO NIO Write 1', selector sun.nio.ch.WindowsSelectorImpl@26132ae7
                          13:16:00,271 DEBUG [channel-thread] Started channel thread 'XNIO NIO Read 2', selector sun.nio.ch.WindowsSelectorImpl@10980e7
                          13:16:00,272 DEBUG [channel-thread] Started channel thread 'XNIO NIO Write 2', selector sun.nio.ch.WindowsSelectorImpl@1414627a
                          13:16:00,306 ERROR [remote] JBREM00200: Remote connection failed: java.io.IOException: Window open for non-existent channel
                          13:16:00,309 DEBUG [channel-thread] Started channel thread 'XNIO NIO Read 3', selector sun.nio.ch.WindowsSelectorImpl@29a7789c
                          13:16:00,309 DEBUG [channel-thread] Started channel thread 'XNIO NIO Write 3', selector sun.nio.ch.WindowsSelectorImpl@1451ef4e
                          13:16:00,439 DEBUG [channel-thread] Started channel thread 'XNIO NIO Read 4', selector sun.nio.ch.WindowsSelectorImpl@4013fba1
                          13:16:00,439 DEBUG [channel-thread] Started channel thread 'XNIO NIO Write 4', selector sun.nio.ch.WindowsSelectorImpl@23b17d49
                          Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.308 sec <<< FAILURE!
                          13:16:00,499 ERROR [remote] JBREM00200: Remote connection failed: java.io.IOException: An existing connection was forcibly closed by the remote host
                          
                          Results :
                          
                          Tests in error:
                            testServiceCreation(uk.co.magus.jam.harvest.service.TestNewService): uk.co.magus.jam.harvest.service.TestNewService from [Module "deployment.main-test.ear.test.war:main" from Service Module Loader]
                          

                           

                           

                          The full stacktrace for the error is

                           

                           

                          testServiceCreation(uk.co.magus.jam.harvest.service.TestNewService)  Time elapsed: 0.115 sec  <<< ERROR!
                          java.lang.ClassNotFoundException: uk.co.magus.jam.harvest.service.TestNewService from [Module "deployment.main-test.ear.test.war:main" from Service Module Loader]
                              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
                              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
                              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
                              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
                              at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:158)
                              at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:126)
                              at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:90)
                              at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
                              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
                              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
                              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
                              at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
                              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
                              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
                              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
                              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
                              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139)
                              at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)
                              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)
                              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
                              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
                              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)
                              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952)
                              at java.lang.Thread.run(Thread.java:619)
                          

                           

                           

                          However we can see from the test logging above that TestNewService is definitely packaged within a jar within the test EAR. I haven't changed the value of 'ear-subdeployments-isolated', so I would've thought everything could see everything else...

                           

                          If this is getting into JIRA ticket territory, let me know and I'll try to package up the test so it's recreatable and create a ticket. Thanks again for your help.


                          • 10. Re: Test EAR deploys on AS7, but test config can't be found
                            Daniel Meyer Newbie

                            I am getting the same exception

                            • 11. Re: Test EAR deploys on AS7, but test config can't be found
                              Aslak Knutsen Master

                              Hmm...

                               

                              So you have:

                               

                              EAR

                              - EJB Module (with the TestClass included)

                              - WAR Module (arquillian added test runner)

                               

                              But the TestRunner in the WAR can not see the TestClass in the EJB module.. ?

                               

                              This by default should be possible. Could you provide a simplified test project, i'll do some debugging..

                              • 12. Re: Test EAR deploys on AS7, but test config can't be found
                                jaikiran pai Master

                                Is that inner-jar.jar really a EJB jar? Does it contain any EJBs? If not, it won't be considered a sub-deployment and hence the classes from it won't be visible to the .war

                                • 13. Re: Test EAR deploys on AS7, but test config can't be found
                                  Daniel Meyer Newbie

                                  Adding an "actual" ejb to the jar did the trick for me. I am now adding both myt test class and an ejb to the jar contained in the ear and it works. Thanks a lot!

                                   

                                  Regards,

                                  daniel

                                  • 14. Re: Test EAR deploys on AS7, but test config can't be found
                                    Ben Kirby Newbie

                                    Sorry for the delay - yep, works for me too.

                                     

                                    In stripping the test case back to it's barest before completing the Arquillian/JBoss upgrade, I'd removed the @Singleton, @Startup annotations from MyLittleService, making it a normal managed bean. When I add the annotations, the latest error goes away, the test is found, all is well.

                                     

                                    So, to summarise, to fix the original issue of tests not being discovered when packaged in a test EAR:

                                     

                                    • upgrade to AS 7.0.1.Final, at least - both distribution and in any poms
                                    • upgrade to Arquillian 1.0.0.CR4, at least
                                    • use the following workaround:

                                     

                                    As a workaround you can add a dependency to org.jboss.arquillian.protocol:arquillian-protocol-servlet

                                     

                                    and add this to your arq.xml

                                     

                                    <arquillian>

                                       <defaultProtocol type="Servlet 3.0" />

                                    </arquillian>

                                     

                                    That will override the default JMX / Service based Protocol used by the AS7 Contianer and use the same protoclol used by JBoss AS 6.

                                     

                                    Thanks so much for your help, guys! Apologies that it dragged out longer than it should've.

                                    1 2 Previous Next