2 Replies Latest reply: Jun 11, 2012 8:40 AM by Paul Robinson RSS

    Unable to obtain wsdl when running in IPv6 mode

    Paul Robinson Master

      All,

       

      I'm experiencing a problem when I try to obtain the wsdl of a JAX-WS service when the latest (master as of 9am BST today) build of JBossAS is started in IPv6 mode. I think I'm configuring the server correctly for IPv6 as I use the same config as JBoss QE use.

       

      To reproduce:

       

       

      Build today's JBossAS7 master (~9am if having trouble reproducing)
      
      Download the attatched simple project and unzip
      
      cd jax-ws-simple
      mvn install
      cp target/echo_service-1.0.war $JBOSS_HOME/standalone/deployments/
      
      Start jboss:
      sh bin/standalone.sh -Djboss.bind.address=localhost -Djboss.bind.address.management=localhost -Djboss.bind.address.unsecure=localhost -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true
      
      Try to obtain the wsdl:
      curl http://localhost:8080/echo_service-1.0/EchoServiceService?wsdl
      
      
      Observe the following from curl:
      
      <html><head><title>JBoss Web/7.0.16.Final - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>javax.servlet.ServletException: Cannot obtain destination for: /echo_service-1.0/EchoServiceService
          org.jboss.wsf.stack.cxf.RequestHandlerImpl.findDestination(RequestHandlerImpl.java:164)
          org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:81)
          org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169)
          org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)
          org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:187)
          org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:115)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
          org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)
          org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      </pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the JBoss Web/7.0.16.Final logs.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.0.16.Final</h3></body></html>admins-MacBook-Pro:jax-ws-simple paul
      
      And the following on the JBossAS console output:
      
      
      11:38:06,110 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/echo_service-1.0].[org.my.simple.server.EchoServiceImpl]] (http-/0:0:0:0:0:0:0:1:8080-1) Servlet.service() for servlet org.my.simple.server.EchoServiceImpl threw exception: javax.servlet.ServletException: Cannot obtain destination for: /echo_service-1.0/EchoServiceService
          at org.jboss.wsf.stack.cxf.RequestHandlerImpl.findDestination(RequestHandlerImpl.java:164)
          at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:81)
          at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169)
          at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)
          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:187)
          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:115)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.1.Final.jar:1.0.1.Final]
          at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)
          at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.1.0.Beta1.jar:2.1.0.Beta1]
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.1.Final.jar:1.0.1.Final]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.16.Final.jar:]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.16.Final.jar:]
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.16.Final.jar:]
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.16.Final.jar:]
          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:156) [jboss-as-web-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.16.Final.jar:]
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.16.Final.jar:]
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.16.Final.jar:]
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.16.Final.jar:]
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.16.Final.jar:]
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.16.Final.jar:]
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.16.Final.jar:]
          at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_31]
      

       

       

      If you repeat, by starting up the server without my additional parameters, you should see that the wsdl is returned without issue.

       

      Thanks,

       

      Paul.

        • 1. Re: Unable to obtain wsdl when running in IPv6 mode
          Alessio Soldano Master

          Hi Paul,

          why not starting the AS with

           

          ./bin/standalone.sh -Djboss.bind.address=::1 -Djboss.bind.address.management=::1 -Djboss.bind.address.unsecure=::1 -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true

           

          given you're using IPv6? It seems to prevent the issue afaics.

           

          On a different topic, you should really remove all those libs from WEB-INF/lib folder in the created war; anything I see in there is already available on the app server.

          • 2. Re: Unable to obtain wsdl when running in IPv6 mode
            Paul Robinson Master

            Thanks Alessio,

             

            We shied away from "::1" as hard coding IP addresses (127.0.0.1) had got us into a mess elsewhere when qualifying against IPv6. I thought using "localhost" would be safer. As you say, we're tied to IPv6 in this particular case, so I'm happy to go with your suggestion.

             

            As for the libs in the war, I didn't notice they where there. I just knocked up this simple example to give you a reproducible case. We first saw this issue in an XTS crash recovery test, which needless to say, wasn't the best thing to ask you to look at ;-)

             

            Thanks again,

             

            Paul.