14 Replies Latest reply on Oct 19, 2010 6:23 AM by yahya hugirat

    Does i need to change my pom.xml to get arquillian work under hudson

    yahya hugirat Newbie

      Hello,

      i'm trying to integrate Arquillian in Hudson, the tests work fine in Netbeans, and all the needed jar files will be downloaded when they needed.

      i have aded  the project in hudson. now i can't get it runs. i'm using maven too.

       

      best regards

      Yahya

        • 1. Re: Does i need to change my pom.xml to get arquillian work under hudson
          Aslak Knutsen Master

          Same setup should work under Hudson.

           

          What container are you using? What error do you get?

          • 2. Re: Does i need to change my pom.xml to get arquillian work under hudson
            yahya hugirat Newbie

            glassfish v3 , maven 3 beta 2, hudson the latest.

            i have found that maven 3 hat problems with hudson.

            when i tryied to use maven 2.2.1 i got an error that i shuold use newer version

            • 3. Re: Does i need to change my pom.xml to get arquillian work under hudson
              yahya hugirat Newbie

              it work, i have used just the newest hudson 1.378

              now i have another  quastion:

              i want to use Arquillian in an ant project, it is possible to write an ant task?

              when it is possible how could i do that?

               

              yahya

              • 4. Re: Does i need to change my pom.xml to get arquillian work under hudson
                Aslak Knutsen Master

                Arquillian execute fine in Ant, the only problem is you'll have to manage the dependencies your self.

                 

                execute:

                mvn install -pl containers/glassfish-embedded-3,junit -am

                 

                That will build and tell you which Arquillian modules are needed on the classpath when running against GlassFish embedded. Add those to the ant test classpath(+ the glassfish-embedded jar) and you should be good to go.

                • 5. Re: Does i need to change my pom.xml to get arquillian work under hudson
                  yahya hugirat Newbie

                  oh thank you.

                  i will give it a try, i hobe it  will work without  any complication.

                  • 6. Re: Does i need to change my pom.xml to get arquillian work under hudson
                    Aslak Knutsen Master

                    You basically need the jars behind these modules:

                     

                    [INFO] Arquillian API

                    [INFO] Arquillian SPI

                    [INFO] Arquillian Implementation Base

                    [INFO] Arquillian TestRunner JUnit

                    [INFO] Arquillian TestEnricher CDI

                    [INFO] Arquillian TestEnricher EJB

                    [INFO] Arquillian TestEnricher Resource

                    [INFO] Arquillian Protocol Servlet 3.x

                    [INFO] Arquillian Container GlassFish Embedded 3.x

                     

                    + ShrinkWrap API, SPI, impl-base and extension-glassfish

                    [INFO] Arquillian API
                    [INFO] Arquillian SPI
                    [INFO] Arquillian Implementation Base
                    [INFO] Arquillian TestRunner JUnit
                    [INFO] Arquillian TestEnricher CDI
                    [INFO] Arquillian TestEnricher EJB
                    [INFO] Arquillian TestEnricher Resource
                    [INFO] Arquillian Protocol Servlet 3.x
                    [INFO] Arquillian Container GlassFish Embedded 3.x
                    + ShrinkWrap API, SPI, impl-base and extension-glassfish
                    • 7. Re: Does i need to change my pom.xml to get arquillian work under hudson
                      yahya hugirat Newbie

                      Hello Aslak,

                      i have added the jars, but when i try to run the test i get this error

                       

                      Testcase: initializationError(employeews.NewWebServiceTest):        Caused an ERROR
                      null
                      java.lang.NullPointerException
                              at org.jboss.arquillian.impl.DeployableTestBuilder.build(DeployableTestBuilder.java:88)
                              at org.jboss.arquillian.impl.DeployableTestBuilder.build(DeployableTestBuilder.java:77)
                              at org.jboss.arquillian.junit.Arquillian.<init>(Arquillian.java:85)
                              at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
                              at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

                      after that i have added the latest snapshot, but i still get the same error. waht could that be ?

                       

                      Ragards

                      Yahya

                      • 8. Re: Does i need to change my pom.xml to get arquillian work under hudson
                        Aslak Knutsen Master

                        You get that error because your missing a org.jboss.arquillian.container:arquillian-xxxxxx module from your classpath. You seems to be missing arquillian-glassfish-embedded-3

                        • 9. Re: Does i need to change my pom.xml to get arquillian work under hudson
                          yahya hugirat Newbie

                          what shuold i include to use remote glassfish. i have found no jar for remote glassfish.

                          i have found it tahnks.

                          • 10. Re: Does i need to change my pom.xml to get arquillian work under hudson
                            Aslak Knutsen Master

                            If you want to use the remote glassfish connector you'll need to use this command:

                             

                            mvn install -pl containers/glassfish-remote-3,junit -am 

                             

                            (this will build the arquillian-jsr88-remote-1.2 module as well, which is also needed on classpath)

                             

                            and include the other glassfish libs described in doc:

                            http://docs.jboss.org/arquillian/reference/latest/en-US/html_single/#container.glassfish-remote-3

                            1 of 1 people found this helpful
                            • 11. Re: Does i need to change my pom.xml to get arquillian work under hudson
                              yahya hugirat Newbie

                              thank you for your fast reply

                              i'm trying to use Arquillian without maven. becouse our projects are built with ant. i have made a project and adedd to it the jars that you have mentioned.

                              i have added the arquillian.xml file to the root path. it looks like this

                              <?xml version="1.0"?>

                               

                               

                               

                              <arquillian xmlns="http://jboss.com/arquillian"

                               

                                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                               

                                      xmlns:jboss="urn:arq:org.jboss.arquillian.container.glassfish.remote_3">

                               

                               

                               

                              <engine>

                               

                                 <deploymentExportPath>/tmp</deploymentExportPath>

                               

                              </engine>
                                  <glassfish-remote:container>
                                    <glassfish-remote:deploymentUri>deployer:Sun:AppServer::localhost:4848</glassfish-remote:deploymentUri>
                                    <glassfish-remote:remoteServerAddress>localhost</glassfish-remote:remoteServerAddress>
                                    <glassfish-remote:remoteServerHttpPort>8585</glassfish-remote:remoteServerHttpPort>
                                 </glassfish-remote:container>

                               

                              </arquillian>

                               

                              i have dowloaded arquillian-jsr88-remote-1.2 snapshot and added it to the classpath

                              and i have manualy  added deployment-client-3.0.1-b19.jar from local repository

                              when i run the test i get this error:

                              Testcase: employeews.NewWebServiceTest:        Caused an ERROR
                              org/jboss/arquillian/testenricher/ejb/EJBInjectionEnricher
                              java.lang.NoClassDefFoundError: org/jboss/arquillian/testenricher/ejb/EJBInjectionEnricher
                                      at org.jboss.arquillian.container.jsr88.remote_1_2.EE6DeploymentAppender.createAuxiliaryArchive(EE6DeploymentAppender.java:39)
                                      at org.jboss.arquillian.impl.ClientDeploymentGenerator.loadAuxiliaryArchives(ClientDeploymentGenerator.java:78)
                                      at org.jboss.arquillian.impl.ClientDeploymentGenerator.generate(ClientDeploymentGenerator.java:65)
                                      at org.jboss.arquillian.impl.handler.ArchiveGenerator.callback(ArchiveGenerator.java:52)
                                      at org.jboss.arquillian.impl.handler.ArchiveGenerator.callback(ArchiveGenerator.java:42)
                                      at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)
                                      at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)
                                      at org.jboss.arquillian.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:96)
                                      at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:162)
                                      at org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:186)
                                      at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)
                                      at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:182)
                                      at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127)
                              Caused by: java.lang.ClassNotFoundException: org.jboss.arquillian.testenricher.ejb.EJBInjectionEnricher
                                      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)

                              • 12. Re: Does i need to change my pom.xml to get arquillian work under hudson
                                Aslak Knutsen Master

                                You need the Enricher modules as well.. for GlassFish Remote it should be, arquillian-testenricher-cdi, arquillian-testenricher-ejb and arquillian-testenricher-resource

                                1 of 1 people found this helpful
                                • 13. Re: Does i need to change my pom.xml to get arquillian work under hudson
                                  yahya hugirat Newbie

                                  thank you a loot,

                                  still i have an error but i think this error becouse of my test class.

                                  best Regards.

                                  Yahya

                                  • 14. Re: Does i need to change my pom.xml to get arquillian work under hudson
                                    yahya hugirat Newbie

                                    to whom is interested,

                                    thanks the Aslak i have configured my system to work with Arquillian.

                                    i'm using Netbeans 6.9.1 Glassfish 3.0.1 (in my tests i try to use remote) and ant as build system. localy i have got the tests to run. i have to run them  in hudson to i mean with ant (i have got it to run in maven project).

                                    i have added an arquillian.xml file to the root folder of my project. i have attached my arquillian.xml if somebody need it.

                                     

                                    Update:

                                    i have added my project to svn and after that i have made a new Build in Hudson, after that i have made the configuration in hudson. i had worked fine without any complication.

                                     

                                    Nachricht geändert durch yahya hugirat

                                    Update to the Update:

                                    to import the project in svn the IDE had to copy the libs. to a lib directory. after this operation (not all jars ware copied, i have to add them manually) i started to get this Error.

                                    java.lang.IllegalArgumentException: Sniffer from Typ [ejb] and [connector] should not cliame the archive at the same time. please consulte the configuration your Archive  [C: \NetBeansProjects\ArquillianTests\build\web]
                                            at com.sun.enterprise.v3.server.SnifferManagerImpl.validateSniffers(SnifferManagerImpl.java:221)
                                            at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:426)
                                            at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:262)
                                            at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
                                            at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
                                            at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
                                            at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
                                            at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1121)
                                            at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
                                            at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
                                            at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
                                            at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:96)
                                            at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
                                            at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
                                            at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
                                            at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
                                            at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
                                            at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
                                            at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
                                            at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
                                            at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
                                            at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
                                            at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
                                            at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
                                            at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
                                            at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
                                            at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
                                            at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
                                            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
                                            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
                                            at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
                                            at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
                                            at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
                                            at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
                                            at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
                                            at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
                                            at java.lang.Thread.run(Thread.java:619)

                                     

                                    Nachricht geändert durch yahya hugirat