7 Replies Latest reply on Aug 2, 2011 6:17 AM by Aslak Knutsen

    Problems running JBoss 6 embedded

    Nick de Graeve Newbie

      Because I can't get my tests to run the embedded Glassfish, (see this thread for the whole story: http://community.jboss.org/message/613467) I decided to give JBoss AS 6 a try. Unfortunately this goes even worse, I can't even get the container to start.

       

      How can I get it to work?

       

      In my POM I have these dependencies:

              <dependency>
                  <groupId>org.jboss.arquillian.junit</groupId>
                  <artifactId>arquillian-junit-container</artifactId>
                  <scope>test</scope>
                  <version>1.0.0.CR1</version>
              </dependency>
              <dependency>
                  <groupId>org.jboss.arquillian.container</groupId>
                  <artifactId>arquillian-jbossas-embedded-6</artifactId>
                  <scope>test</scope>
                  <version>1.0.0.CR1</version>
              </dependency>
              <dependency>
                  <groupId>org.jboss.jbossas</groupId>
                  <artifactId>jboss-as-depchain</artifactId>
                  <type>pom</type>
                  <scope>test</scope>
                  <version>6.0.0.Final</version>
              </dependency>
      

       

      and I configured the Surefire plugin like this:

       

                 <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-surefire-plugin</artifactId>
                      <configuration>           
                          <includes>
                              <include>**/AllFileBrowserTests.java</include>
                          </includes>
                              <additionalClasspathElements>
                                  <additionalClasspathElement>${env.JBOSS_HOME}/client/jbossws-native-client.jar</additionalClasspathElement>
                                  <!-- Because jbossweb.sar contains shared web.xml, which must be visible from same CL as TomcatDeployer.class.getClassLoader -->
                                  <additionalClasspathElement>${env.JBOSS_HOME}/server/default/deploy/jbossweb.sar</additionalClasspathElement>
                              </additionalClasspathElements>
                              <redirectTestOutputToFile>true</redirectTestOutputToFile>
                              <trimStackTrace>false</trimStackTrace>
                              <printSummary>true</printSummary>
                              <forkMode>once</forkMode>
                              <!-- MaxPermSize Required to bump the space for relective data like classes, methods, etc. EMB-41. Endorsed required for things 
                                  like WS support (EMB-61) -->
                              <argLine>-Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true
                                  -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Djava.endorsed.dirs=${env.JBOSS_HOME}/lib/endorsed
                                  -Djboss.home=${env.JBOSS_HOME} -Djboss.boot.server.log.dir=${env.JBOSS_HOME}</argLine>
                      </configuration>
                  </plugin>
      

       

      When I run my test I seem to be missing 3 dependecies but the Maven continues anyway but the test itself can't be run as the container can't be started:

      c:\dvl\java\gtsc\services\filebrowser\filebrowser-services>mvn clean test -Dtest=XSSServiceTestCase
      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building File Browser Services 1.0.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [WARNING] The POM for com.sun.istack:istack-commons-runtime:jar:1.1-SNAPSHOT is missing, no dependency information available
      [WARNING] The POM for woodstox:wstx-asl:jar:3.2.1 is missing, no dependency information available
      [WARNING] The POM for ws-commons:policy:jar:1.0 is missing, no dependency information available
      [INFO]
      [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ filebrowser-services ---
      [INFO] Deleting c:\dvl\java\gtsc\services\filebrowser\filebrowser-services\target
      [INFO]
      [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ filebrowser-services ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 3 resources
      [INFO]
      [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ filebrowser-services ---
      [INFO] Compiling 24 source files to c:\dvl\java\gtsc\services\filebrowser\filebrowser-services\target\classes
      [INFO]
      [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ filebrowser-services ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 20 resources
      [INFO]
      [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ filebrowser-services ---
      [INFO] Compiling 16 source files to c:\dvl\java\gtsc\services\filebrowser\filebrowser-services\target\test-classes
      [INFO]
      [INFO] --- maven-surefire-plugin:2.8.1:test (default-test) @ filebrowser-services ---
      [INFO] Surefire report directory: c:\dvl\java\gtsc\services\filebrowser\filebrowser-services\target\surefire-reports
      
      -------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      Running com.jnj.gtsc.services.filebrowser.services.util.XSSServiceTestCase
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.644 sec <<< FAILURE!
      
      Results :
      
      Tests in error:
        com.jnj.gtsc.services.filebrowser.services.util.XSSServiceTestCase: Could not start container
      
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
      
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 38.487s
      [INFO] Finished at: Mon Aug 01 15:21:51 CEST 2011
      [INFO] Final Memory: 78M/247M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.8.1:test (default-test) on project filebrowser-services: There are tes
      t failures.
      [ERROR]
      [ERROR] Please refer to c:\dvl\java\gtsc\services\filebrowser\filebrowser-services\target\surefire-reports for the individual test results.
      [ERROR] -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
      

       

      These are the Surefire reports:

       

      -------------------------------------------------------------------------------
      Test set: com.jnj.gtsc.services.filebrowser.services.util.XSSServiceTestCase
      -------------------------------------------------------------------------------
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.644 sec <<< FAILURE!
      com.jnj.gtsc.services.filebrowser.services.util.XSSServiceTestCase  Time elapsed: 0 sec  <<< ERROR!
      org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not start container
          at org.jboss.arquillian.container.jbossas.embedded_6.JBossASEmbeddedContainer.start(JBossASEmbeddedContainer.java:106)
          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$5.perform(ContainerLifecycleController.java:144)
          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$5.perform(ContainerLifecycleController.java:134)
          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:182)
          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startContainer(ContainerLifecycleController.java:133)
          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.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.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.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:83)
          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:76)
          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forEachContainer(ContainerLifecycleController.java:175)
          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startContainers(ContainerLifecycleController.java:75)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
          at org.jboss.arquillian.core.impl.EventContextImpl.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:83)
          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.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.beforeSuite(EventTestRunnerAdaptor.java:68)
          at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:76)
          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: Encountered exception in server startup
          at org.jboss.bootstrap.impl.mc.server.AbstractMCServerBase.bootstrapMcAndDescriptors(AbstractMCServerBase.java:325)
          at org.jboss.bootstrap.impl.mc.server.AbstractMCServerBase.doStart(AbstractMCServerBase.java:257)
          at org.jboss.bootstrap.impl.as.server.AbstractJBossASServerBase.doStart(AbstractJBossASServerBase.java:381)
          at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:413)
          at java.lang.Thread.run(Thread.java:662)
      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: xml_stream@37,72
          at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:224)
          at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:193)
          at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:171)
          at org.jboss.bootstrap.impl.mc.deployer.TempBasicXMLDeployer.deploy(TempBasicXMLDeployer.java:188)
          at org.jboss.bootstrap.impl.mc.server.AbstractMCServerBase.bootstrapMcAndDescriptors(AbstractMCServerBase.java:310)
          ... 4 more
      Caused by: java.lang.RuntimeException: Error retrieving annotation attribute values
          at org.jboss.reflect.plugins.AnnotationValueFactory.createAnnotationValue(AnnotationValueFactory.java:124)
          at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.createAnnotationValue(IntrospectionTypeInfoFactoryImpl.java:148)
          at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getAnnotations(IntrospectionTypeInfoFactoryImpl.java:141)
          at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getPackage(IntrospectionTypeInfoFactoryImpl.java:283)
          at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getPackage(IntrospectionTypeInfoFactoryImpl.java:73)
          at org.jboss.reflect.plugins.ClassInfoImpl.getPackage(ClassInfoImpl.java:617)
          at org.jboss.xb.builder.JBossXBBuilder.initSchema(JBossXBBuilder.java:352)
          at org.jboss.xb.builder.JBossXBNoSchemaBuilder.build(JBossXBNoSchemaBuilder.java:271)
          at org.jboss.xb.builder.JBossXBBuilder.build(JBossXBBuilder.java:336)
          at org.jboss.xb.builder.JBossXBBuilder.build(JBossXBBuilder.java:222)
          at org.jboss.xb.builder.JBossXBBuilder.build(JBossXBBuilder.java:201)
          at org.jboss.xb.binding.resolver.AbstractMutableSchemaResolver.resolve(AbstractMutableSchemaResolver.java:321)
          at org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding.getElement(WildcardBinding.java:170)
          at org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding.newPosition(WildcardBinding.java:255)
          at org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding$ChoicePosition.nextPosition(ChoiceBinding.java:114)
          at org.jboss.xb.binding.sunday.unmarshalling.NonElementPosition.startParticle(NonElementPosition.java:94)
          at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:202)
          at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.startElement(SaxJBossXBParser.java:401)
          at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
          at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
          at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
          at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
          at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
          at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
          at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
          at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
          at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:209)
          ... 8 more
      Caused by: java.lang.RuntimeException: Error retrieving annotation attribute values
          at org.jboss.reflect.plugins.AnnotationValueFactory.createAnnotationValue(AnnotationValueFactory.java:124)
          at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.createAnnotationValue(IntrospectionTypeInfoFactoryImpl.java:148)
          at org.jboss.reflect.plugins.AnnotationValueFactory.createValue(AnnotationValueFactory.java:79)
          at org.jboss.reflect.plugins.AnnotationValueFactory.createValue(AnnotationValueFactory.java:65)
          at org.jboss.reflect.plugins.AnnotationValueFactory.createAnnotationValue(AnnotationValueFactory.java:119)
          ... 36 more
      Caused by: java.lang.TypeNotPresentException: Type org.jboss.beans.metadata.plugins.SearchInfoValueAdapter not present
          at sun.reflect.annotation.TypeNotPresentExceptionProxy.generateException(TypeNotPresentExceptionProxy.java:27)
          at sun.reflect.annotation.AnnotationInvocationHandler.invoke(AnnotationInvocationHandler.java:56)
          at $Proxy41.valueAdapter(Unknown Source)
          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.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60)
          at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168)
          at org.jboss.reflect.plugins.SecurityActions.invokeMethod(SecurityActions.java:78)
          at org.jboss.reflect.plugins.AnnotationValueFactory.createAnnotationValue(AnnotationValueFactory.java:117)
          ... 40 more
      Caused by: java.lang.ClassNotFoundException: org.jboss.beans.metadata.plugins.SearchInfoValueAdapter
          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:307)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:247)
          at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:95)
          at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)
          at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
          at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:370)
          at sun.reflect.annotation.AnnotationParser.parseClassValue(AnnotationParser.java:351)
          at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:280)
          at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)
          at sun.reflect.annotation.AnnotationParser.parseAnnotationArray(AnnotationParser.java:694)
          at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:466)
          at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286)
          at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)
          at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
          at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
          at java.lang.Class.initAnnotationsIfNecessary(Class.java:3070)
          at java.lang.Class.getAnnotations(Class.java:3050)
          at java.lang.Package.getAnnotations(Package.java:383)
          at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.readAnnotations(IntrospectionTypeInfoFactoryImpl.java:610)
          at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getAnnotations(IntrospectionTypeInfoFactoryImpl.java:126)
          ... 34 more
      
      

       

      and

       

      15:21:49,237 INFO  [ContainerRegistryCreator] Could not read active container configuration: null
      15:21:49,860 INFO  [AbstractJBossASServerBase] Server Configuration:
      
          JBOSS_HOME URL: file:/c:/java/jboss-6.0.0.Final/
          Bootstrap: $JBOSS_HOME\server/default/conf/bootstrap.xml
          Common Base: $JBOSS_HOME\common/
          Common Library: $JBOSS_HOME\common/lib/
          Server Name: default
          Server Base: $JBOSS_HOME\server/
          Server Library: $JBOSS_HOME\server/default/lib/
          Server Config: $JBOSS_HOME\server/default/conf/
          Server Home: $JBOSS_HOME\server/default/
          Server Data: $JBOSS_HOME\server/default/data/
          Server Log: $JBOSS_HOME\server/default/log/
          Server Temp: $JBOSS_HOME\server/default/tmp/
      
      15:21:49,870 INFO  [AbstractServer] Starting: JBossAS [6.0.0.Final "Neo"]
      
        • 1. Re: Problems running JBoss 6 embedded
          Aslak Knutsen Master

          Maven Surefire is silly.. it requires you to write the argLine argument on one line. If you split it over multiple lines it will only read the first line.

          • 2. Re: Problems running JBoss 6 embedded
            Nick de Graeve Newbie

            Unfortunately, that didn't help. I put it all on one line and I still get the same error.

            • 3. Re: Problems running JBoss 6 embedded
              Andrew Rubinger Master

              Have you tried putting the dependency upon "jboss-as-depchain" also in the "dependencyManagement" section in "import" scope?  This is what Maven uses to honor the exclusions that are defined by the depchain (and parent) POMs.

               

              If I were to guess, I think some dependency is leaking in, which is messing up JBossXB's ability to parse.

               

              Example:

               

              http://anonsvn.jboss.org/repos/jbossas/projects/embedded/examples/tags/6.0.0.Final/pom.xml

               

              S,

              ALR

              1 of 1 people found this helpful
              • 4. Re: Problems running JBoss 6 embedded
                Nick de Graeve Newbie

                Progress! With your suggestion the container is now ablo to start but now I get an error in the test itself:

                 

                java.lang.NoSuchMethodError: org.jboss.shrinkwrap.api.spec.JavaArchive.addPackages(Z[Ljava/lang/String;)Lorg/jboss/shrinkwrap/api/Archive;
                

                 

                In my test case:

                 

                @Deployment
                    public static JavaArchive createTestArchive() {
                        return ShrinkWrap.create(JavaArchive.class, "test.jar").addClasses(XSSService.class, XSSServiceBean.class, AppLog.class,
                                MockAppLogger.class, MailService.class, MockMailServiceBean.class);
                    }
                

                 

                Full Surefire report:

                 

                -------------------------------------------------------------------------------
                Test set: com.jnj.gtsc.services.filebrowser.services.util.XSSServiceTestCase
                -------------------------------------------------------------------------------
                Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 39.638 sec <<< FAILURE!
                com.jnj.gtsc.services.filebrowser.services.util.XSSServiceTestCase  Time elapsed: 0 sec  <<< ERROR!
                java.lang.NoSuchMethodError: org.jboss.shrinkwrap.api.spec.JavaArchive.addPackages(Z[Ljava/lang/String;)Lorg/jboss/shrinkwrap/api/Archive;
                    at org.jboss.arquillian.container.test.impl.deployment.ArquillianDeploymentAppender.createAuxiliaryArchive(ArquillianDeploymentAppender.java:39)
                    at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.loadAuxiliaryArchives(DeploymentGenerator.java:198)
                    at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.buildTestableDeployments(DeploymentGenerator.java:149)
                    at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.createTestableDeployments(DeploymentGenerator.java:136)
                    at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.generateDeployment(DeploymentGenerator.java:85)
                    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:96)
                    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)
                
                com.jnj.gtsc.services.filebrowser.services.util.XSSServiceTestCase  Time elapsed: 0.003 sec  <<< ERROR!
                java.lang.NullPointerException
                    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployedDeployment(ContainerDeployController.java:228)
                    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.undeployManaged(ContainerDeployController.java:99)
                    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:102)
                    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.afterClass(EventTestRunnerAdaptor.java:87)
                    at org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:180)
                    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)
                
                • 5. Re: Problems running JBoss 6 embedded
                  Aslak Knutsen Master

                  Yea, this is because JBoss 6 Embedded pull in a old v. of ShrinkWrap via it's depchain. You need to explicitly define a dependency on ShrinkWrap in your pom so Maven can upgrade the version.

                   

                  I think adding this above the depchain dep should do the trix:

                   

                              <dependency>
                                  <groupId>org.jboss.shrinkwrap</groupId>
                                  <artifactId>shrinkwrap-impl-base</artifactId>
                                  <version>${version.shrinkwrap_shrinkwrap}</version>
                              </dependency>
                  

                   

                   

                  Arquillian 1.0.0.CR1 use the following ShrinkWrap version:

                   

                          <version.shrinkwrap_shrinkwrap>1.0.0-beta-3</version.shrinkwrap_shrinkwrap>
                  
                  • 6. Re: Problems running JBoss 6 embedded
                    Andrew Rubinger Master

                    NoSuchMethodError points to that you have some mismatch in the versions of ShrinkWrap you're using.  Ensure that your shrinkwrap-api and shrinkwrap-impl-base are the same version.


                    S,
                    ALR

                    • 7. Re: Problems running JBoss 6 embedded
                      Aslak Knutsen Master

                      ALR, did a ShrinkWrap upgrade to beta stage get on the list for AS 6.1 ?