2 Replies Latest reply on Oct 14, 2010 9:57 AM by grosueugen

    JBoss 5.1.0 GA web-service client problem when stress testing

    grosueugen Newbie

      Hello,

       

      We are using JBoss 5.1.0 GA, jdk 1.5_22, Solaris 10.

       

      We have implemented a wsdl-to-java EJB3.0 web-service endpoint and have generated the client artifacts using wsconsume. These artifacts are included in a client project - a war that includes a Servlet that calls the endpoint using the generated WS client.

       

      The web-service project is deployed as an ejb jar, which is included into an .ear.

      The war project (the ws client) is deployed in the same JBoss configuration as the .ear.

       

      For testing, we implemented an HttpClient that calls the Servlet, which calls the EJB3.0 endpoint.

       

      Everything is working well, until performing testing with 100 threads, each sending a request 50 times.

      We first created a new WS Client instance for every request, but then we decided to create a pool of these instances to gain performance.

      We can not reuse the same instance because the WS Client is not thread-safe.

      For the pool, we used http://commons.apache.org/pool/.

       

      Here is the code that creates a new instance:

       

      public Object makeObject() {
            OurEnpointWSService service = new
      OurEnpointWSService();
            BindingProvider bp = (BindingProvider) service;
            bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url);
          
      OurEnpoint port = service.getOurEndpointWSPort(); 
            return port;
      }

       

      At some point, after running the tests 3-4 times, we receive a lot of errors:

       

      2010-09-29 14:44:04,980 ERROR [org.jboss.ws.core.CommonClient] (http-0.0.0.0-8080-305) Exception caught while (preparing for) performing the invocation:
      javax.xml.ws.soap.SOAPFaultException: Unqualified {http://schemas.xmlsoap.org/soap/envelope/}Client fault
          at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:84)
          at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:107)
          at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:579)
          at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:381)
          at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:290)
          at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:170)
          at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
          at $Proxy569.execute(Unknown Source)
          at com.orvaal.ucipPlugin.web.IgwServlet.service(IgwServlet.java:127)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at com.orvaal.ucipPlugin.web.filter.IgwFilter.doFilter(IgwFilter.java:54)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          at java.lang.Thread.run(Thread.java:595)

       

       

      I searched for a couple of days on the net, but no luck.

       

      If someone can help me, I would be very greatful.

       

      Thanks in advance.

       

      Eugen.

        • 1. Re: JBoss 5.1.0 GA web-service client problem when stress testing
          grosueugen Newbie

          On a Linux OS, these errors are not being thrown when running the stress tests with 100 threads. Unfortunately, with 300 threads, it raises some other exceptions (still errors regarding web-service).

          Anyway, we reimplement the client with Axis, and now, no more errors! Not even with 300 threads. Tests were done on Linux, not on Solaris yet.

           

          Another problem with the JBoss Web-Service we found was this: we made an update to the jbossws native, to the latest 3.3.1. The build was successful for JBoss 5.1.0, but when wanted to regenerate with wsconsume, the following exception is thrown:

           

          Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
              at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
              at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

           

          Also, I ran ant tests, as it is mentioned in the Install.txt from the jbossws native zip file, but this also fails with:

           

          tests-compile:
              [mkdir] Created dir: /home/eugen/Kits/Java/JBoss/jboss-as-plugins/jbossws-native-bin-dist/output/test-classes
              [javac] /home/eugen/Kits/Java/JBoss/jboss-as-plugins/jbossws-native-bin-dist/tests/ant-import/build-testsuite.xml:372: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
              [javac] Compiling 345 source files to /home/eugen/Kits/Java/JBoss/jboss-as-plugins/jbossws-native-bin-dist/output/test-classes
              [javac] /home/eugen/Kits/Java/JBoss/jboss-as-plugins/jbossws-native-bin-dist/tests/java/org/jboss/test/ws/console/ConsoleAccessTestCase.java:27: cannot access org.jboss.wsf.test.JBossWSTest
              [javac] bad class file: /home/eugen/Kits/Java/JBoss/jboss-as-plugins/jbossws-native-bin-dist/deploy/lib/jbossws-common.jar(org/jboss/wsf/test/JBossWSTest.class)
              [javac] class file has wrong version 50.0, should be 49.0
              [javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
              [javac] import org.jboss.wsf.test.JBossWSTest;
              [javac]                           ^
              [javac] 1 error

           

          Java used is jdk 1.5_22, JBoss 5.1.0 version for jdk 1.5

           

          I switched to jdk 1.6, and surprise: no more errors when running wsconsume.sh. Also, build is successful when running ant tests.

           

          Unfortunately, we can not use Java 1.5.

           

          Can someone please give me an advice?

          Maybe I'm doing something wrong...

           

          Thanks.

          • 2. Re: JBoss 5.1.0 GA web-service client problem when stress testing
            grosueugen Newbie

            Just for information, we retested on Solaris 10, with Axis generated classes, and now it works.