axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajesh Kumar Yadav (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-3195) AXIOM parser's throwing NullPointerException if OMElement.getParent() is instance of OMDocument and Rampart is engaged
Date Tue, 27 Mar 2012 11:42:27 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-3195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239389#comment-13239389
] 

Rajesh Kumar Yadav commented on AXIS2-3195:
-------------------------------------------

Hi Everyone,

In my application when I call a web service it thows following excecption. I assume this is
the same exception which is talked about in this issue. If so please tell in which release
of Axis or AXIOM this issue is fixed.

Thanks
Rajesh


Exception trace.

java.lang.NullPointerException
	at org.apache.axiom.om.impl.llom.OMNodeImpl.detach(OMNodeImpl.java:194)
	at org.apache.axiom.om.impl.llom.OMElementImpl.setText(OMElementImpl.java:686)
	at com.mercury.itg.ws.core.handlers.security.OutboundSecurityContext.set(OutboundSecurityContext.java:181)
	at com.mercury.itg.ws.core.handlers.security.OutboundSecurityContext.getSecurityContext(OutboundSecurityContext.java:73)
	at org.apache.jsp.web.knta.crt.rpt.UpdateRequestSecurity_jsp.updateField(UpdateRequestSecurity_jsp.java:25)
	at org.apache.jsp.web.knta.crt.rpt.UpdateRequestSecurity_jsp._jspService(UpdateRequestSecurity_jsp.java:299)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
	at com.kintana.rpt.web.servlet.RunJspReport.doPost(RunJspReport.java:90)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.kintana.core.web.filter.MLUFilter.applyFilter(MLUFilter.java:110)
	at com.kintana.core.web.filter.BaseFilter.doFilter(BaseFilter.java:59)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.kintana.core.web.filter.stinger.ValidationFilter.applyFilter(ValidationFilter.java:93)
	at com.kintana.core.web.filter.stinger.ValidationFilter.doFilter(ValidationFilter.java:66)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.kintana.core.web.filter.MultipartRequestFilter.applyFilter(MultipartRequestFilter.java:85)
	at com.kintana.core.web.filter.BaseFilter.doFilter(BaseFilter.java:59)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.kintana.core.web.filter.ControlFilter.applyFilter(ControlFilter.java:825)
	at com.kintana.core.web.filter.ControlFilter.doFilter(ControlFilter.java:1318)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.mercury.itg.servlet.I18NFilter.doFilter(I18NFilter.java:40)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.kintana.core.web.filter.Log4jFilter.applyFilter(Log4jFilter.java:49)
	at com.kintana.core.web.filter.BaseFilter.doFilter(BaseFilter.java:59)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:619)


                
> AXIOM parser's throwing NullPointerException if OMElement.getParent() is instance of
OMDocument and Rampart is engaged
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3195
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3195
>             Project: Axis2
>          Issue Type: Bug
>         Environment: Windows XP SP2, Axis2 1.2, Tomcat 6.0.13
>            Reporter: Christopher Weiss
>            Assignee: Ruchith Udayanga Fernando
>         Attachments: BugDemoConfigFiles.zip, RampartBugDemo.zip
>
>
> Please see attached project to demonstrate the issue. With the axis2-1.2 release and
earlier, the AXIOM parser throws a NullPointerException when processing requests using Rampart:
> Thread [main] (Suspended (exception NullPointerException)) 
>  OMStAXWrapper.updateNextNode() line: 981 
>  OMStAXWrapper.updateLastNode() line: 950 
>  OMStAXWrapper.next() line: 913 
>  StAXSOAPModelBuilder(StAXOMBuilder).next() line: 111 
>  SOAPEnvelopeImpl(NodeImpl).build() line: 469 
>  SOAPMessageImpl(DocumentImpl).build() line: 476 
>  Axis2Util.getDocumentFromSOAPEnvelope(SOAPEnvelope, boolean) line: 107 
>  RampartMessageData.<init>(MessageContext, boolean) line: 146 
>  MessageBuilder.build(MessageContext) line: 56 
>  RampartSender.invoke(MessageContext) line: 59 
>  Phase.invoke(MessageContext) line: 382 
>  AxisEngine.invoke(MessageContext) line: 522 
>  AxisEngine.send(MessageContext) line: 655 
>  OutInAxisOperationClient.send(MessageContext) line: 237 
>  OutInAxisOperationClient.execute(boolean) line: 202 
>  EchoStub.EchoOperation(OMElement) line: 127 
>  Client.main(String[]) line: 47 
> The cause of the exception is the AXIOM parser's setting the boolean variable needToThrowEndDocument
in the DOMStAXWrapper to true if the current node being parsed has a parent node of type OMDocument..
> Temp fix: In the code, when creating an AXIOM compatible schema, we did the following:
>  
> try {
>   // Get the schema is it is already AXIOM compatible, or convert it if it isn't.
>   OMElement schema = docSchema instanceof OMDocument ? (OMElement) docSchema
>     .getDocumentElement() : org.apache.axis2.util.XMLUtils.toOM(docSchema.getDocumentElement());
>   
>   // Workaround to fix an issue with the building the OMElement if the
>   // parent is an OMDocument. Detach the element from the parent Document...
>   if (schema.getParent() != null && schema.getParent() instanceof OMDocument)
{
>     schema.detach();
>   }
>   elementList.add(org.apache.axis2.databinding.utils.Constants.OM_ELEMENT_KEY);
>   elementList.add(schema);
> } catch (Exception e) {
>   throw new java.lang.RuntimeException("Can't convert schema to AXIOM!", e);
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message