3 Replies Latest reply on Oct 13, 2011 8:51 AM by alex soto

    Weld Archetype problem with arq-glassfish-embedded profile

    Todd Morrison Newbie

      Attempting



      mvn archetype:generate -DarchetypeArtifactId=jboss-javaee6-webapp -DarchetypeGroupId=org.jboss.weld.archetypes -DarchetypeVersion=1.0.1.CR1 -DarchetypeRepository=central






      Then,



      mvn clean test -Parq-glassfish-embedded




      Failing with:


      [INFO] Tests are skipped.
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 14.043s
      [INFO] Finished at: Fri Apr 08 16:11:17 PDT 2011
      [INFO] Final Memory: 11M/81M
      [INFO] ------------------------------------------------------------------------
      LittleDeveloper:sampleweld toddmorrison$ mvn clean test -Parq-glassfish-embedded
      [INFO] Scanning for projects...
      [INFO]                                                                         
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Java EE 6 webapp project 1.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      Downloading: http://repo1.maven.org/maven2/org/jboss/arquillian/container/arquillian-glassfish-embedded-3/1.0.0.Alpha5/arquillian-glassfish-embedded-3-1.0.0.Alpha5.pom
      [WARNING] The POM for org.jboss.arquillian.container:arquillian-glassfish-embedded-3:jar:1.0.0.Alpha5 is missing, no dependency information available
      Downloading: http://repository.jboss.org/nexus/content/groups/public/org/jboss/arquillian/container/arquillian-glassfish-embedded-3/1.0.0.Alpha5/arquillian-glassfish-embedded-3-1.0.0.Alpha5.jar
      Downloading: http://repository.jboss.org/nexus/content/groups/public/org/glassfish/extras/glassfish-embedded-all/3.0.1/glassfish-embedded-all-3.0.1.jar
      Downloaded: http://repository.jboss.org/nexus/content/groups/public/org/glassfish/extras/glassfish-embedded-all/3.0.1/glassfish-embedded-all-3.0.1.jar (46868 KB at 327.9 KB/sec)
      Downloading: http://repo1.maven.org/maven2/org/jboss/arquillian/container/arquillian-glassfish-embedded-3/1.0.0.Alpha5/arquillian-glassfish-embedded-3-1.0.0.Alpha5.jar
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 2:24.878s
      [INFO] Finished at: Fri Apr 08 16:32:48 PDT 2011
      [INFO] Final Memory: 4M/81M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal on project sampleweld: Could not resolve dependencies for project sampleweld:sampleweld:war:1.0-SNAPSHOT: Could not find artifact org.jboss.arquillian.container:arquillian-glassfish-embedded-3:jar:1.0.0.Alpha5 in jboss-public-repository (http://repository.jboss.org/nexus/content/groups/public) -> [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/DependencyResolutionException



        • 1. Re: Weld Archetype problem with arq-glassfish-embedded profile
          Todd Morrison Newbie

          (Dan, not trying to be that 'state-the-obvious' guy. Just wanted to make it clear that alpha 5 arquillian hasn't been pushed up to http://repository.jboss.org/nexus/content/groups/public yet. keep up the good work)

          • 2. Re: Weld Archetype problem with arq-glassfish-embedded profile
            Todd Morrison Newbie

            Found this: http://community.jboss.org/thread/164761


            Moving from arquillian-glassfish-embedded-3 to arquillian-glassfish-embedded-3.1 did resolve the alpha-5.


            But, out-of-the-box-surefire gives




            -------------------------------------------------------------------------------
            Test set: com.sampleweld.test.MemberRegistrationTest
            -------------------------------------------------------------------------------
            Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.041 sec <<< FAILURE!
            initializationError(com.sampleweld.test.MemberRegistrationTest)  Time elapsed: 0.013 sec  <<< ERROR!
            java.lang.NoClassDefFoundError: org/glassfish/embeddable/GlassFishException
                    at java.lang.Class.getDeclaredConstructors0(Native Method)
                    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
                    at java.lang.Class.getConstructor0(Class.java:2699)
                    at java.lang.Class.getConstructor(Class.java:1657)
                    at org.jboss.arquillian.impl.SecurityActions$1.run(SecurityActions.java:77)
                    at org.jboss.arquillian.impl.SecurityActions$1.run(SecurityActions.java:74)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at org.jboss.arquillian.impl.SecurityActions.getConstructor(SecurityActions.java:73)
                    at org.jboss.arquillian.impl.DynamicServiceLoader.createInstance(DynamicServiceLoader.java:268)
                    at org.jboss.arquillian.impl.DynamicServiceLoader.onlyOne(DynamicServiceLoader.java:94)
                    at org.jboss.arquillian.impl.domain.ContainerRegistry.create(ContainerRegistry.java:69)
                    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)
                    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)
            
            



            • 3. Re: Weld Archetype problem with arq-glassfish-embedded profile
              alex soto Newbie

              Anybody has any clue about this error?


              I am getting the same error with the jpa2 example project from the Arquillian's source at


              https://github.com/arquillian/arquillian-examples/tree/master/jpa2


              In fact, the sample project does not even compile as is.  I had change a couple of things to get it to compile and then the unit test fails with the error:





              -------------------------------------------------------------------------------
              Test set: com.acme.jpa.GamePersistenceTestCase
              -------------------------------------------------------------------------------
              Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.271 sec <<< FAILURE!
              initializationError(com.acme.jpa.GamePersistenceTestCase)  Time elapsed: 0.029 sec  <<< ERROR!
              java.lang.NoClassDefFoundError: org/glassfish/embeddable/GlassFishException
                   at java.lang.Class.getDeclaredConstructors0(Native Method)
                   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
                   at java.lang.Class.getConstructor0(Class.java:2699)
                   at java.lang.Class.getConstructor(Class.java:1657)
                   at org.jboss.arquillian.impl.SecurityActions$1.run(SecurityActions.java:77)
                   at org.jboss.arquillian.impl.SecurityActions$1.run(SecurityActions.java:74)
                   at java.security.AccessController.doPrivileged(Native Method)
                   at org.jboss.arquillian.impl.SecurityActions.getConstructor(SecurityActions.java:73)
                   at org.jboss.arquillian.impl.DynamicServiceLoader.createInstance(DynamicServiceLoader.java:268)
                   at org.jboss.arquillian.impl.DynamicServiceLoader.onlyOne(DynamicServiceLoader.java:94)
                   at org.jboss.arquillian.impl.DynamicServiceLoader.onlyOne(DynamicServiceLoader.java:79)
                   at org.jboss.arquillian.impl.client.container.ContainerRegistryCreator.createRegistry(ContainerRegistryCreator.java:87)
                   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)
                   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: java.lang.ClassNotFoundException: org.glassfish.embeddable.GlassFishException
                   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)
                   ... 59 more





              Is Arquillian project dead?