5 Replies Latest reply on Oct 13, 2010 9:57 AM by yahya hugirat

    Webservices Testings with Arquillian

    yahya hugirat Newbie

      Hello All,

      i have been integrating Arquillian in our Projects, with the help of Aslak i have solved most of the errors.

      now i run in this error :

       

      ------------- Standard Error -----------------

      13.10.2010 12:59:35 org.jboss.arquillian.container.jsr88.remote_1_2.JSR88DeploymentListener handleProgressEvent

      INFO: Deployment of application jsr88-1590473843312846652

      13.10.2010 12:59:35 org.jboss.arquillian.container.jsr88.remote_1_2.JSR88DeploymentListener$1 handleProgressEvent

      INFO: Application jsr88-1590473843312846652 enabled successfully

      13.10.2010 12:59:35 org.jboss.arquillian.container.jsr88.remote_1_2.JSR88DeploymentListener$1 handleProgressEvent

      INFO: All operations completed successfully

      13.10.2010 12:59:39 org.jboss.arquillian.container.jsr88.remote_1_2.JSR88DeploymentListener handleProgressEvent

      INFO: Undeployment of application jsr88-1590473843312846652

      13.10.2010 12:59:39 org.jboss.arquillian.container.jsr88.remote_1_2.JSR88DeploymentListener handleProgressEvent

      INFO: All operations completed successfully

      ------------- ---------------- ---------------

      Testcase: testGetEmployee(employeews.NewWebServiceTest):        Caused an ERROR

      java.lang.IllegalStateException: Error launching test employeews.NewWebServiceTest public void employeews.NewWebServiceTest.testGetEmployee()

      org.jboss.arquillian.impl.event.FiredEventException: java.lang.IllegalStateException: Error launching test employeews.NewWebServiceTest public void employeews.NewWebServiceTest.testGetEmployee()

      13.10.2010 12:59:39 org.jboss.arquillian.container.jsr88.remote_1_2.JSR88DeploymentListener handleProgressEvent

      INFO: Undeployment of application jsr88-1590473843312846652

      13.10.2010 12:59:39 org.jboss.arquillian.container.jsr88.remote_1_2.JSR88DeploymentListener handleProgressEvent

      INFO: All operations completed successfully

              at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:68)

              at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)

              at org.jboss.arquillian.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:157)

              at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:244)

              at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:207)

              at org.jboss.arquillian.junit.Arquillian$5$1.evaluate(Arquillian.java:225)

              at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)

              at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:221)

              at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:163)

              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.IllegalStateException: Error launching test employeews.NewWebServiceTest public void employeews.NewWebServiceTest.testGetEmployee()

              at org.jboss.arquillian.protocol.servlet_3.ServletMethodExecutor.invoke(ServletMethodExecutor.java:61)

              at org.jboss.arquillian.impl.handler.ContainerTestExecuter.callback(ContainerTestExecuter.java:50)

              at org.jboss.arquillian.impl.handler.ContainerTestExecuter.callback(ContainerTestExecuter.java:40)

              at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)

      Caused by: java.net.ConnectException: Connection refused: connect

              at java.net.PlainSocketImpl.socketConnect(Native Method)

              at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

              at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

              at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)

              at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)

              at java.net.Socket.connect(Socket.java:529)

              at java.net.Socket.connect(Socket.java:478)

              at sun.net.NetworkClient.doConnect(NetworkClient.java:163)

              at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)

              at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)

              at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)

              at sun.net.www.http.HttpClient.New(HttpClient.java:306)

              at sun.net.www.http.HttpClient.New(HttpClient.java:323)

              at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)

              at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801)

              at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)

              at org.jboss.arquillian.protocol.servlet_3.ServletMethodExecutor.execute(ServletMethodExecutor.java:81)

              at org.jboss.arquillian.protocol.servlet_3.ServletMethodExecutor.invoke(ServletMethodExecutor.java:57)

       

       

      Testcase: testSetEmployee(employeews.NewWebServiceTest):        Caused an ERROR

       

      java.lang.IllegalStateException: Error launching test employeews.NewWebServiceTest public void employeews.NewWebServiceTest.testSetEmployee()

       

      org.jboss.arquillian.impl.event.FiredEventException: java.lang.IllegalStateException: Error launching test employeews.NewWebServiceTest public void employeews.NewWebServiceTest.testSetEmployee()

       

              at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:68)

       

              at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)

       

              at org.jboss.arquillian.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:157)

       

              at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:244)

       

              at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:207)

       

              at org.jboss.arquillian.junit.Arquillian$5$1.evaluate(Arquillian.java:225)

       

              at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)

       

              at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:221)

       

              at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:163)

       

              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.IllegalStateException: Error launching test employeews.NewWebServiceTest public void employeews.NewWebServiceTest.testSetEmployee()

       

              at org.jboss.arquillian.protocol.servlet_3.ServletMethodExecutor.invoke(ServletMethodExecutor.java:61)

       

              at org.jboss.arquillian.impl.handler.ContainerTestExecuter.callback(ContainerTestExecuter.java:50)

       

              at org.jboss.arquillian.impl.handler.ContainerTestExecuter.callback(ContainerTestExecuter.java:40)

       

              at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)

       

      Caused by: java.net.ConnectException: Connection refused: connect

       

              at java.net.PlainSocketImpl.socketConnect(Native Method)

       

              at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

       

              at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

       

              at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)

       

              at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)

       

              at java.net.Socket.connect(Socket.java:529)

       

              at java.net.Socket.connect(Socket.java:478)

       

              at sun.net.NetworkClient.doConnect(NetworkClient.java:163)

       

              at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)

       

              at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)

       

              at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)

       

              at sun.net.www.http.HttpClient.New(HttpClient.java:306)

       

              at sun.net.www.http.HttpClient.New(HttpClient.java:323)

       

              at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)

       

              at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801)

       

              at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)

       

              at org.jboss.arquillian.protocol.servlet_3.ServletMethodExecutor.execute(ServletMethodExecutor.java:81)

       

              at org.jboss.arquillian.protocol.servlet_3.ServletMethodExecutor.invoke(ServletMethodExecutor.java:57)

       

      at the beginning i have the same problem, but i have this Entry in logfile

       

      [#|2010-10-13T12:31:12.012+0200|SEVERE|glassfish3.0.1|global|_ThreadID=29;_ThreadName=Thread-1;|Class [ Lemployee/employeebean; ] not found. Error while loading [ class employeews.NewWebService ]|#]

       

      then i have added the missing classes to the archive, after that i didn't have the entry in the logfile but i have the error.

      what could this be.

       

      best Regards

      Yahya

        • 1. Re: Webservices Testings with Arquillian
          yahya hugirat Newbie

          i have found in this blog:

          http://community.jboss.org/en/arquillian/blog/2010/05/25/arquillian-100-alpha2--released

          that we should use AS_CLIENT for Webservices

          Note: AS_CLIENT alone give an error i have had to use RunModeType.AS_CLIENT

          now i have this error

          Testcase: testGetEmployee(employeews.NewWebServiceTest):        Caused an ERROR
          org/jboss/logging/Logger
          java.lang.NoClassDefFoundError: org/jboss/logging/Logger
          13.10.2010 14:09:10 org.jboss.arquillian.container.jsr88.remote_1_2.JSR88DeploymentListener handleProgressEvent
          INFO: Undeployment of application jsr88-5595323397942950710
          13.10.2010 14:09:10 org.jboss.arquillian.container.jsr88.remote_1_2.JSR88DeploymentListener handleProgressEvent
          INFO: All operations completed successfully
                  at org.jboss.arquillian.testenricher.osgi.OSGiTestEnricher.<clinit>(OSGiTestEnricher.java:57)
                  at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
                  at org.jboss.arquillian.spi.util.ServiceLoader.createInstance(ServiceLoader.java:222)
                  at org.jboss.arquillian.spi.util.ServiceLoader.reload(ServiceLoader.java:181)
                  at org.jboss.arquillian.spi.util.ServiceLoader.iterator(ServiceLoader.java:278)
                  at org.jboss.arquillian.spi.util.TestEnrichers.enrich(TestEnrichers.java:53)
                  at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:250)
                  at org.jboss.arquillian.impl.handler.ActivateRunModeTypeClient$LocalMethodExecutor.invoke(ActivateRunModeTypeClient.java:65)
                  at org.jboss.arquillian.impl.handler.ContainerTestExecuter.callback(ContainerTestExecuter.java:50)
                  at org.jboss.arquillian.impl.handler.ContainerTestExecuter.callback(ContainerTestExecuter.java:40)
                  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.test(EventTestRunnerAdaptor.java:157)
                  at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:244)
                  at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:207)
                  at org.jboss.arquillian.junit.Arquillian$5$1.evaluate(Arquillian.java:225)
                  at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)
                  at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:221)
                  at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:163)
                  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.logging.Logger
                  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)

           


          Testcase: testSetEmployee(employeews.NewWebServiceTest):        Caused an ERROR
          Could not initialize class org.jboss.arquillian.testenricher.osgi.OSGiTestEnricher
          java.lang.NoClassDefFoundError: Could not initialize class org.jboss.arquillian.testenricher.osgi.OSGiTestEnricher
                  at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
                  at org.jboss.arquillian.spi.util.ServiceLoader.createInstance(ServiceLoader.java:222)
                  at org.jboss.arquillian.spi.util.ServiceLoader.reload(ServiceLoader.java:181)
                  at org.jboss.arquillian.spi.util.ServiceLoader.iterator(ServiceLoader.java:278)
                  at org.jboss.arquillian.spi.util.TestEnrichers.enrich(TestEnrichers.java:53)
                  at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:250)
                  at org.jboss.arquillian.impl.handler.ActivateRunModeTypeClient$LocalMethodExecutor.invoke(ActivateRunModeTypeClient.java:65)
                  at org.jboss.arquillian.impl.handler.ContainerTestExecuter.callback(ContainerTestExecuter.java:50)
                  at org.jboss.arquillian.impl.handler.ContainerTestExecuter.callback(ContainerTestExecuter.java:40)
                  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.test(EventTestRunnerAdaptor.java:157)
                  at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:244)
                  at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:207)
                  at org.jboss.arquillian.junit.Arquillian$5$1.evaluate(Arquillian.java:225)
                  at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)
                  at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:221)
                  at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:163)
                  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)

          • 2. Re: Webservices Testings with Arquillian
            Aslak Knutsen Master

            for some reason you have the arquillian-testenricher-osgi module on your classpath..

            • 3. Re: Webservices Testings with Arquillian
              yahya hugirat Newbie

              i have added it mistakely, then i tought it will not make any trouble

              • 4. Re: Webservices Testings with Arquillian
                Aslak Knutsen Master

                A general good assumption, but we're not quite there yet. A enricher should be able to detect if it can run in the given environment or not, but not all of them currently do, so they fail in stead.. 

                • 5. Re: Webservices Testings with Arquillian
                  yahya hugirat Newbie

                  anyway thank you for your fast replay.

                  your replaies have been very helpful for me.