5 Replies Latest reply on Mar 21, 2008 9:17 AM by Martin Murphy

    IONA Fuse and Weblogic Service ..... Throws Nullpointer exception

    myilvahanan duraipandian Newbie

      Hi All,

       

      Thanks in advance for your interest and responses.

       

      I am pretty new to ESB and am facing an issue. This may be a trivial mistake from my side. Please correct if my approach is wrong.

       

      I have a service running in the Weblogic.

       

      THE FLOW:

       

      Consumer -> Routing slip which then routs to the following Bean (I do String manipulation to change the namespace to the target service) -> Target service (Hosted in Weblogic) -> Bean (I do String manipulation to change the namespace back to the original)

       

      WHAT HAPPENS:

       

      Consumer -> Routing slip which then routes to Bean -> Target service (throws a null pointer error at the weblogic end)

       

      PROBLEM IN DETAIL

       

      1. The cousumer XBean

      <?xml version="1.0" encoding="UTF-8"?&gt;

       

      &lt;beans xmlns:http="http://servicemix.apache.org/http/1.0"

       

       

      &lt;/beans&gt;

       

      2. my-relay-in-transform-su XBean

      &lt;?xml version="1.0" encoding="UTF-8"?&gt;

      &lt;beans xmlns:eip="http://servicemix.apache.org/eip/1.0"

       

      &lt;/beans&gt;

       

      3. my-relay-routing-slip-su XBean

      &lt;?xml version="1.0" encoding="UTF-8"?&gt;

      &lt;beans xmlns:bean="http://servicemix.apache.org/bean/1.0"

      &lt;/beans&gt;

       

      4. my-relay-out-transform-su

      &lt;?xml version="1.0" encoding="UTF-8"?&gt;

      &lt;beans xmlns:bean="http://servicemix.apache.org/bean/1.0"

      &lt;/beans&gt;

       

       

      5. my-relay-soap-producer-su

      &lt;?xml version="1.0" encoding="UTF-8"?&gt;

       

      &lt;beans xmlns:http="http://servicemix.apache.org/http/1.0"

       

      &lt;/beans&gt;

       

      ERROR DESCRIPTION

       

      a.  In Service mix console:

      EBUG - PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.servicemix.soap.interceptors.mime.AttachmentsInInterceptor

      EBUG - PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.servicemix.soap.interceptors.xml.StaxInInterceptor

      NFO - PhaseInterceptorChain - Interceptor has thrown exception, unwinding now

      rg.apache.servicemix.soap.api.Fault: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space

      etween public and system identifiers

      at row,col {unknown-source}: 1,55

      aused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system i

      entifiers

      at row,col {unknown-source}: 1,55

      EBUG - PhaseInterceptorChain - Invoking handleFault on interceptor org.apache.servicemix.soap.interceptors.xml.StaxInInterceptor

      EBUG - PhaseInterceptorChain - Invoking handleFault on interceptor org.apache.servicemix.soap.interceptors.mime.AttachmentsInInterceptor

      ARN - jetty - EXCEPTION

       

      b. In Weblogic console

      #### <[weblogic.servlet.internal.WebAppServletContext@1058579 - appName: '_appsdir_myapp-mockexternalservices-ear-1.1.7.1_ear', name: '/MyEndpointImpl', context-path: '/MyEndpointImpl'] Root cause of ServletException.

      javax.servlet.ServletException

           at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:39)

           at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:218)

           at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

           at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

           at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)

           at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)

           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)

           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)

           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3395)

           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

           at weblogic.security.service.SecurityManager.runAs(Unknown Source)

           at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)

           at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)

           at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)

           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)

           at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)

      java.lang.NullPointerException

           at com.sun.xml.ws.encoding.SOAPBindingCodec.compareStrings(SOAPBindingCodec.java:261)

           at com.sun.xml.ws.encoding.SOAPBindingCodec.isMultipartRelated(SOAPBindingCodec.java:245)

           at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:178)

           at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:151)

           at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:235)

           at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:97)

           at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:36)

           at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:218)

           at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

           at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

           at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)

           at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)

           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)

           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)

           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3395)

           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

           at weblogic.security.service.SecurityManager.runAs(Unknown Source)

           at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)

           at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)

           at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)

           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)

           at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)

       

      FEW OBSERVATIONS:

      When captured the SOAP object through TCPMON, I could see the content type missing in the Header.  If I manualy add "Content-Type= application/xml" to the SOAP object and resend it through TCPMON to the destination service, it goes through successfully.

       

      It will be of help if some one of us can help me in resolving this issue.

       

      Thanks and Regards,

      Myilvahanan D