14 Replies Latest reply: Sep 18, 2012 2:40 AM by Ben.yu yu RSS

Running arquillian tests in remote JBoss 7.1.0.Final

apoc9 Newbie

I'm trying to run arquillian test on JBoss 7.1.0.Final. However I'm stuck at exception that occurs when junit attempts to run the tests with arquillian.

 

java.lang.RuntimeException: Could not create and startup manager

at org.jboss.arquillian.impl.core.ManagerImpl.<init>(ManagerImpl.java:95)

at org.jboss.arquillian.impl.core.ManagerBuilder.create(ManagerBuilder.java:74)

at org.jboss.arquillian.impl.DeployableTestBuilder.build(DeployableTestBuilder.java:97)

at org.jboss.arquillian.impl.DeployableTestBuilder.build(DeployableTestBuilder.java:67)

at org.jboss.arquillian.junit.Arquillian.<init>(Arquillian.java:82)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)

at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)

at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)

at org.apache.maven.surefire.junit4.JUnit4TestSet.<init>(JUnit4TestSet.java:45)

at org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite.createTestSet(JUnit4DirectoryTestSuite.java:56)

at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:96)

at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209)

at org.apache.maven.surefire.Surefire.run(Surefire.java:156)

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.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)

at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)

Caused by: org.jboss.arquillian.impl.domain.ContainerCreationException: Could not create Container jboss-as-7

at org.jboss.arquillian.impl.domain.ContainerRegistry.create(ContainerRegistry.java:78)

at org.jboss.arquillian.impl.client.container.ContainerRegistryCreator.createRegistry(ContainerRegistryCreator.java:67)

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.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

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

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

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

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

at org.jboss.arquillian.impl.core.ManagerImpl.bindAndFire(ManagerImpl.java:221)

at org.jboss.arquillian.impl.core.InstanceImpl.set(InstanceImpl.java:74)

at org.jboss.arquillian.impl.bootstrap.ConfigurationRegistrar.loadConfiguration(ConfigurationRegistrar.java:58)

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.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

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

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

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

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

at org.jboss.arquillian.impl.core.ManagerImpl.<init>(ManagerImpl.java:91)

... 25 more

Caused by: java.lang.IllegalStateException: No implementation found for org.jboss.arquillian.spi.client.container.DeployableContainer, please check your classpath

at org.jboss.arquillian.impl.DynamicServiceLoader.verifyOnlyOneOrSameImplementation(DynamicServiceLoader.java:134)

at org.jboss.arquillian.impl.DynamicServiceLoader.onlyOne(DynamicServiceLoader.java:92)

at org.jboss.arquillian.impl.domain.ContainerRegistry.create(ContainerRegistry.java:69)

... 48 more

 

 

Here is my maven configuration

 

<properties><jboss.version>7.1.0.Final</jboss.version><jboss-javaee6-spec.version>1.0.0.Final</jboss-javaee6-spec.version><arquillian.version>1.0.0.CR7</arquillian.version>
</properties><profile>
     <!-- An optional Arquillian testing profile that executes tests in a remote JBoss AS instance -->
     <!-- Run with: mvn clean test -Parq-jbossas-remote -->
     <id>arq-jbossas-remote</id>
           <dependencies>
                <!-- Java EE 6 API dependency -->
                <!-- This one dependency imports all APIs available for a Java EE 6.0 application -->
                <dependency>
                     <groupId>org.jboss.spec</groupId>
                     <artifactId>jboss-javaee-6.0</artifactId>
                     <version>${jboss-javaee6-spec.version}</version>
                     <type>pom</type>
                     <scope>provided</scope>
                </dependency>
                <!-- Arquillian allows you to test enterprise code such as EJBs and Transactional(JTA) JPA from JUnit/TestNG --> 
                <dependency>
                    <groupId>org.jboss.arquillian</groupId>
                    <artifactId>arquillian-bom</artifactId>
                     <version>${arquillian.version}</version>
                     <scope>test</scope>
                     <type>pom</type>
                </dependency>
                 <dependency>
                     <groupId>org.jboss.arquillian</groupId>
                     <artifactId>arquillian-junit</artifactId>
                     <version>1.0.0.Alpha5</version>
                     <scope>test</scope>
                </dependency>
                <dependency>
                     <groupId>org.jboss.as</groupId>
                     <artifactId>jboss-as-controller-client</artifactId>
                     <version>${jboss.version}</version>
                     <scope>test</scope>
                </dependency>
                <dependency>
                     <groupId>org.jboss.as</groupId>
                     <artifactId>jboss-as-arquillian-container-remote</artifactId>
                     <version>${jboss.version}</version>
                     <scope>test</scope>
                 </dependency>
             </dependencies>
           <build>
                <plugins>
                     <plugin>
                          <artifactId>maven-surefire-plugin</artifactId>
                          <version>2.4.3</version>
                          <configuration>
                               <systemPropertyVariables>
                                    <JBOSS_HOST>${jboss.ip}</JBOSS_HOST>
                                     <arquillian.launch>jboss-as-7</arquillian.launch>
                               </systemPropertyVariables>
                          </configuration>
                     </plugin>
                  </plugins> 
                 <testResources>
                     <testResource>
                          <directory>src/test/resources</directory>
                      </testResource>
                         <!-- Overrides default configuration to use alternate persistence.xml with default JBoss AS data source -->
                         <!-- Used by Arquillian -->
                     <testResource>
                          <directory>src/test/resources-jbossas</directory>
                     </testResource>
                </testResources>
          </build>
 </profile>

 

  • 1. Re: Running arquillian tests in remote JBoss 7.1.0.Final
    Aslak Knutsen Master

    You're running a very old Arquillian Core v. try upgrading to 1.0.0.CR7 (there are a few artifact changes etc)

     

    I recommend having a look at this: https://github.com/arquillian/arquillian.github.com/blob/develop/guides/getting_started.textile

  • 2. Re: Running arquillian tests in remote JBoss 7.1.0.Final
    apoc9 Newbie

    This helps a little, thanks. I've made some changes to pom according to the guide.  Now for the change I'm having problem with the ShrinkWrapper.

    btw I've been using 1.0.0.CR7 in the first place.

     

    java.lang.NoClassDefFoundError: org/jboss/shrinkwrap/descriptor/impl/base/NodeProviderImplBase

    at java.lang.ClassLoader.defineClass1(Native Method)

    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)

    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)

    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)

    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)

    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)

    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)

    at java.security.AccessController.doPrivileged(Native Method)

    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

    at java.lang.Class.forName0(Native Method)

    at java.lang.Class.forName(Class.java:247)

    at org.jboss.shrinkwrap.descriptor.api.DescriptorConstructionInfo.&lt;init&gt;(DescriptorConstructionInfo.java:69)

    at org.jboss.shrinkwrap.descriptor.api.DescriptorInstantiator.getDescriptorConstructionInfoForUserView(DescriptorInstantiator.java:275)

    at org.jboss.shrinkwrap.descriptor.api.DescriptorInstantiator.createImporterFromUserView(DescriptorInstantiator.java:178)

    at org.jboss.shrinkwrap.descriptor.api.Descriptors.importAs(Descriptors.java:108)

    at org.jboss.shrinkwrap.descriptor.api.Descriptors.importAs(Descriptors.java:85)

    at org.jboss.arquillian.impl.bootstrap.ConfigurationRegistrar.loadConfiguration(ConfigurationRegistrar.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.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

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

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

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

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

    at org.jboss.arquillian.impl.core.ManagerImpl.&lt;init&gt;(ManagerImpl.java:91)

    at org.jboss.arquillian.impl.core.ManagerBuilder.create(ManagerBuilder.java:74)

    at org.jboss.arquillian.impl.DeployableTestBuilder.build(DeployableTestBuilder.java:97)

    at org.jboss.arquillian.impl.DeployableTestBuilder.build(DeployableTestBuilder.java:67)

    at org.jboss.arquillian.junit.Arquillian.&lt;init&gt;(Arquillian.java:82)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

    at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)

    at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)

    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

    at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)

    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

    at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)

    at org.apache.maven.surefire.junit4.JUnit4TestSet.&lt;init&gt;(JUnit4TestSet.java:45)

    at org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite.createTestSet(JUnit4DirectoryTestSuite.java:56)

    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:96)

    at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209)

    at org.apache.maven.surefire.Surefire.run(Surefire.java:156)

    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.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)

    at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)

    Caused by: java.lang.ClassNotFoundException: org.jboss.shrinkwrap.descriptor.impl.base.NodeProviderImplBase

    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

    at java.security.AccessController.doPrivileged(Native Method)

    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

    ... 55 more

     

     

  • 3. Re: Running arquillian tests in remote JBoss 7.1.0.Final
    Aslak Knutsen Master

    You have this artifact in your pom, or had..

     

                     <dependency>
                         <groupId>org.jboss.arquillian</groupId>
                         <artifactId>arquillian-junit</artifactId>
                         <version>1.0.0.Alpha5</version>
                         <scope>test</scope>
                    </dependency>
    

     

    That should be 1.0.0.CR7 as well, and in CR7 it's called org.jboss.arquillian.junit:arquillian-junit-container

  • 4. Re: Running arquillian tests in remote JBoss 7.1.0.Final
    apoc9 Newbie

    Yes, I have. I've removed this dependency and everything seems ok. Thank you very much.

  • 5. Re: Running arquillian tests in remote JBoss 7.1.0.Final
    Zithulele Shange Newbie

    Hi All,

    I have done all these changes in the configuration, and I even updated my arquillian to version 1.0.0.Final but I still get the following error:

     

    2012-04-17 13:24:39,765:  DEBUG : [logging] : main : Logging Provider: org.jboss.logging.Log4jLoggerProvider
    2012-04-17 13:24:40,380:  DEBUG : [JMXProtocolPackager] : main : Generating: arquillian-service
    2012-04-17 13:24:40,393:  DEBUG : [JMXProtocolPackager] : main : Merging archive: arquillian-testenricher-ejb.jar: 8 assets
    2012-04-17 13:24:40,396:  DEBUG : [JMXProtocolPackager] : main : Merging archive: arquillian-core.jar: 448 assets
    2012-04-17 13:24:40,411:  DEBUG : [JMXProtocolPackager] : main : Merging archive: arquillian-junit.jar: 254 assets
    2012-04-17 13:24:40,418:  DEBUG : [JMXProtocolPackager] : main : Merging archive: arquillian-testenricher-initialcontext.jar: 3 assets
    2012-04-17 13:24:40,418:  DEBUG : [JMXProtocolPackager] : main : Merging archive: arquillian-testenricher-osgi.jar: 9 assets
    2012-04-17 13:24:40,419:  DEBUG : [JMXProtocolPackager] : main : Merging archive: arquillian-testenricher-cdi.jar: 15 assets
    2012-04-17 13:24:40,420:  DEBUG : [JMXProtocolPackager] : main : Merging archive: arquillian-testenricher-resource.jar: 8 assets
    2012-04-17 13:24:40,421:  DEBUG : [JMXProtocolPackager] : main : Merging archive: arquillian-testenricher-msc.jar: 7 assets
    2012-04-17 13:24:40,425:  DEBUG : [JMXProtocolPackager] : main : Loadable extensions: [org.jboss.arquillian.testenricher.cdi.container.CDIEnricherRemoteExtension, org.jboss.arquillian.testenricher.ejb.container.EJBEnricherRemoteExtension, org.jboss.arquillian.testenricher.resource.container.ResourceEnricherRemoteExtension, org.jboss.arquillian.testenricher.initialcontext.container.InitialContextRemoteExtension, org.jboss.as.arquillian.service.JMXProtocolEndpointExtension, org.jboss.arquillian.container.test.impl.ContainerTestRemoteExtension, org.jboss.arquillian.testenricher.msc.MSCEnricherRemoteExtension, org.jboss.arquillian.testenricher.osgi.OSGiEnricherRemoteExtension]
    2012-04-17 13:24:40,437:  DEBUG : [JMXProtocolPackager] : main : Add dependencies: org.jboss.modules,deployment.arquillian-service,org.jboss.msc
    2012-04-17 13:24:40,449:   INFO : [ArquillianServiceDeployer] : main : Deploy arquillian service: arquillian-service: 775 assets
    2012-04-17 13:24:40,548:   INFO : [xnio] : main : XNIO Version 3.0.3.GA
    2012-04-17 13:24:40,564:   INFO : [nio] : main : XNIO NIO Implementation Version 3.0.3.GA
    2012-04-17 13:24:40,576:   INFO : [remoting] : main : JBoss Remoting version 3.2.2.GA
    2012-04-17 13:24:40,602:  DEBUG : [nio] : Remoting "management-client" read-1 : Started channel thread 'Remoting "management-client" read-1', selector sun.nio.ch.WindowsSelectorImpl@551934b2
    2012-04-17 13:24:40,602:  DEBUG : [nio] : Remoting "management-client" write-1 : Started channel thread 'Remoting "management-client" write-1', selector sun.nio.ch.WindowsSelectorImpl@69d2bdc3
    Apr 17, 2012 1:24:41 PM org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1 call
    WARNING: Exception encountered during export of archive
    org.jboss.shrinkwrap.api.exporter.ArchiveExportException: Failed to write asset to output: /junit/extensions/TestDecorator.class
    at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$3.handle(StreamExporterDelegateBase.java:272)
    at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:219)
    at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.processNode(StreamExporterDelegateBase.java:233)
    at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:105)
    at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)
    at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)
    at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.doExport(AbstractExporterDelegate.java:95)
    at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.access$001(StreamExporterDelegateBase.java:50)
    at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:121)
    at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:116)
    at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:124)
    at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:118)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
    Caused by: java.io.IOException: Pipe closed
    at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:261)
    at java.io.PipedInputStream.receive(PipedInputStream.java:227)
    at java.io.PipedOutputStream.write(PipedOutputStream.java:149)
    at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:253)
    at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:238)
    at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.closeEntry(JdkZipExporterDelegate.java:84)
    at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.closeEntry(JdkZipExporterDelegate.java:40)
    at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:265)
    at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:233)
    at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:217)
    ... 15 more

    Apr 17, 2012 1:24:41 PM org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1 call
    WARNING: [SHRINKWRAP-120] Possible deadlock scenario: Got exception on closing the ZIP out stream: Pipe closed
    java.io.IOException: Pipe closed
    at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:261)
    at java.io.PipedInputStream.receive(PipedInputStream.java:202)
    at java.io.PipedOutputStream.write(PipedOutputStream.java:122)
    at java.util.zip.ZipOutputStream.writeInt(ZipOutputStream.java:590)
    at java.util.zip.ZipOutputStream.writeEXT(ZipOutputStream.java:427)
    at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:262)
    at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:343)
    at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:238)
    at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:360)
    at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:148)
    at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:118)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

    2012-04-17 13:24:41,529:  ERROR : [ArquillianServiceDeployer] : main : Cannot deploy arquillian service
    java.lang.RuntimeException: org.jboss.as.arquillian.container.ManagementClient$UnSuccessfulOperationException: "JBAS014792: Unknown attribute bound-address"
    at org.jboss.as.arquillian.container.ManagementClient.getBinding(ManagementClient.java:212)
    at org.jboss.as.arquillian.container.ManagementClient.extractSubSystemURI(ManagementClient.java:176)
    at org.jboss.as.arquillian.container.ManagementClient.getSubSystemURI(ManagementClient.java:104)
    at org.jboss.as.arquillian.container.ManagementClient.getDeploymentMetaData(ManagementClient.java:110)
    at org.jboss.as.arquillian.container.CommonDeployableContainer.deploy(CommonDeployableContainer.java:144)
    at org.jboss.as.arquillian.protocol.jmx.ArquillianServiceDeployer.doServiceDeploy(ArquillianServiceDeployer.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
    at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:155)
    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)
    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)
    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
    at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
    at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
    at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
    at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)
    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)
    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)
    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)
    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java: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.ContainerEventController.execute(ContainerEventController.java:101)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
    at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
    at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)
    at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
    at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)
    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
    at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
    at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
    Caused by: org.jboss.as.arquillian.container.ManagementClient$UnSuccessfulOperationException: "JBAS014792: Unknown attribute bound-address"
    at org.jboss.as.arquillian.container.ManagementClient.checkSuccessful(ManagementClient.java:307)
    at org.jboss.as.arquillian.container.ManagementClient.executeForResult(ManagementClient.java:300)
    at org.jboss.as.arquillian.container.ManagementClient.getBinding(ManagementClient.java:201)

  • 6. Re: Running arquillian tests in remote JBoss 7.1.0.Final
    Lincoln Baxter III Master

    Make sure that you are running your remote tests against a version of JBossAS that matches your container adapter. If the adapter is out of date, you may have deployment issues, or visa-versa. This goes for all containers and container adapter versions.

  • 7. Re: Running arquillian tests in remote JBoss 7.1.0.Final
    Andrew Rubinger Master

    Could you please note your environment?  We're investigating a bug in SW during export and I'm hammering out steps for reproduction; so far we've observed this in Ubuntu distributions (possibly limited to 64-bit) using Oracle JDK6.

     

    S,

    ALR

  • 8. Re: Running arquillian tests in remote JBoss 7.1.0.Final
    Zithulele Shange Newbie

    I am using Oracle JDK 7u3, JBoss AS 7.1.0 on Centos 5 linux.  The arquillian dependencies:

          <dependency>
                <groupId>org.jboss.arquillian.junit</groupId>
                <artifactId>arquillian-junit-container</artifactId>
                <version>1.0.0.Final</version>
    <!--            <version>1.0.0.CR7</version>-->
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <artifactId>arquillian-core-api</artifactId>
                        <groupId>org.jboss.arquillian.core</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.jboss.as</groupId>
                <artifactId>jboss-as-arquillian-container-remote</artifactId>
                <version>7.1.0.Final</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <artifactId>arquillian-core-api</artifactId>
                <groupId>org.jboss.arquillian.core</groupId>
    <!--            <version>1.0.0.Final</version>-->
                <version>1.0.0.CR7</version>
                <scope>test</scope>
            </dependency>

      <dependency>
                <groupId>org.jboss.as</groupId>
                <artifactId>jboss-as-controller-client</artifactId>
                <version>7.1.0.Final</version>
                <scope>test</scope>
            </dependency>

     

    I had to put this for some class that was not found:

    <dependency>
                <groupId>org.apache.xalan</groupId>
                <artifactId>serializer</artifactId>
                <version>2.7.1-1.jbossorg</version>
                <scope>test</scope>
            </dependency>       

  • 9. Re: Running arquillian tests in remote JBoss 7.1.0.Final
    Andrew Rubinger Master

    OK, I see what's happening here.  We don't have enough context in this Thread to solve it completely, but I can explain some of the trace.

     

    WARNING: Exception encountered during export of archive
    org.jboss.shrinkwrap.api.exporter.ArchiveExportException: Failed to write asset to output: /junit/extensions/TestDecorator.class
    at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$3.handle(StreamExporterDelegateBase.java:272)
    ...
    at java.lang.Thread.run(Thread.java:722)
    Caused by: java.io.IOException: Pipe closed
    ...
    Apr 17, 2012 1:24:41 PM org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1 call
    WARNING: [SHRINKWRAP-120] Possible deadlock scenario: Got exception on closing the ZIP out stream: Pipe closed
    java.io.IOException: Pipe closed
    

     

    OK, that stuff above from ShrinkWrap looks bad.  And I'm going to file an issue to at least get some better error reporting on it.  But the cause stems from some error (which we still have to uncover) and Arquillian's handling of it in ArchiveDeployer.deploy:

     

    public String deploy(Archive<?> archive) throws DeploymentException {
            try {
                final InputStream input = archive.as(ZipExporter.class).exportAsInputStream(); // 1
                try {
                    DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
                    builder = builder.add(archive.getName(), input).andDeploy();
                    DeploymentPlan plan = builder.build();
                    DeploymentAction deployAction = builder.getLastAction();
                    return executeDeploymentPlan(plan, deployAction); // 2
                } finally {
                    if(input != null) try {
                        input.close();  // 3
                    } catch (IOException e) {
                        log.warnf(e, "Failed to close resource %s", input);
                    }
                }
            } catch (Exception e) {
                String rcMessage = e.getMessage();
                Throwable rootCause = e.getCause();
                while( null != rootCause ){
                    rcMessage = rootCause.getMessage();
                    rootCause = rootCause.getCause();
                }
                throw new DeploymentException("Could not deploy to container: " + rcMessage, e); //4
            }
        }
    

     

    Above you'll see that we get the Archive exported as an InputStream (1). If any error is encountered (2), the finally block will look to close that InputStream (3).  Now, the InputStream that ShrinkWrap ZipExporter gives is a pipe, and when the client closes it like this, it breaks the OTHER end of the pipe, which is writing the export process to an OutputStream.  Thus when the SW side continues along with its push to write, it encounters this broken pipe and you get the errors as seen above.

     

    Lincoln earlier today pointed me to an error with a similar trace, and the underlying issue there was:

     

    org.jboss.arquillian.container.spi.client.container.DeploymentException: Could not deploy to container: JBAS012144: Could not connect to remote://127.0.0.1:9999. The connection timed out
    

     

    Meaning that something on the server side wasn't fired or listening for the client to connect, thus ARQ gets an exception when attempting to execute the deployment plan and, again, closes the InputStream thus breaking the pipe.

     

    For your error in particular, the key is to figure out what exception Arquillian is encountering in ArchiveDeployer.deploy (4), and if you fix that all the SW errors will go away.  Check your client logs for the exception message.

     

    S,

    ALR

  • 10. Re: Running arquillian tests in remote JBoss 7.1.0.Final
    Andrew Rubinger Master

    In case you wanna see this in action for yourself, here's the proof:

     

        @Test
        public void brokenPipe() throws IOException {
            final InputStream in = ShrinkWrap.create(JavaArchive.class).addClass(this.getClass())
                .as(ZipExporter.class).exportAsInputStream();
            in.read();
            in.close(); // Mock the client closing this
            in.read(); // Boom baby, broken pipe
        }
    

     

    S,

    ALR

  • 11. Re: Running arquillian tests in remote JBoss 7.1.0.Final
    Andrew Rubinger Master

    I think this is it:

     

    2012-04-17 13:24:41,529:  ERROR : [ArquillianServiceDeployer] : main : Cannot deploy arquillian service

    java.lang.RuntimeException: org.jboss.as.arquillian.container.ManagementClient$UnSuccessfulOperationException: "JBAS014792: Unknown attribute bound-address"

    Guessing your JBOSS_HOME version is not the same as the one you have specified in your ARQ dependencies.

     

    S,

    ALR

  • 12. Re: Running arquillian tests in remote JBoss 7.1.0.Final
    Zithulele Shange Newbie

    Thanks for the responses.

     

    I will check the JBOSS_HOME variable. I have changed versions trying to match Server for several times now.

  • 13. Re: Running arquillian tests in remote JBoss 7.1.0.Final
    Zithulele Shange Newbie

    My JBoss homes are pointing to the right JBoss versions both on local and remote server machines. I still get the same error. But I switched to managed container and it is working fine.

  • 14. Re: Running arquillian tests in remote JBoss 7.1.0.Final
    Ben.yu yu Newbie

    你好,冒昧打扰,我也在学习JSFUnit,软件版本跟你JSFUnit一样,你能把你的学习JSFUnit项目发送一份给我学习吗?因为我也出现java.lang.ClassNotFoundException: org.jboss.shrinkwrap.descriptor.impl.base.NodeProviderImplBase这个异常。 但我根据上面的回答没有解决这个问题 ,所以?
    我的邮箱是381436782 @ qq.com

     

    Hello, take the liberty to bother, I also in the study JSFUnit, software version JSFUnit with you, can you put your study JSFUnit project send a copy to me to learn? Because I also appear Java. Lang. ClassNotFoundException: org. Jboss. Shrinkwrap. Descriptor. Impl. Base. NodeProviderImplBase. But I according to the above answer not solve this problem, so?
    My mailbox is 381436782 @ qq.com