You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Christopher Weiss (JIRA)" <ji...@apache.org> on 2007/09/12 20:09:32 UTC
[jira] Created: (AXIS2-3195) AXIOM parser's throwing
NullPointerException if OMElement.getParent() is instance of OMDocument
AXIOM parser's throwing NullPointerException if OMElement.getParent() is instance of OMDocument
-----------------------------------------------------------------------------------------------
Key: AXIS2-3195
URL: https://issues.apache.org/jira/browse/AXIS2-3195
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Affects Versions: 1.2
Environment: Windows XP SP2, Axis2 1.2, Tomcat 6.0.13
Reporter: Christopher Weiss
I can send a complete project to demonstrate the issue if necessary. With the axis2-1.2 release and earlier, the AXIOM parser may throw a NullPointerException when processing requests:
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.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Updated: (AXIS2-3195) AXIOM parser's throwing
NullPointerException if OMElement.getParent() is instance of OMDocument and
Rampart is engaged
Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Deepal Jayasinghe updated AXIS2-3195:
-------------------------------------
Assignee: Ruchith Udayanga Fernando
> 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: Axis 2.0 (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.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Resolved: (AXIS2-3195) AXIOM parser's throwing
NullPointerException if OMElement.getParent() is instance of OMDocument and
Rampart is engaged
Posted by "Glen Daniels (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Glen Daniels resolved AXIS2-3195.
---------------------------------
Resolution: Invalid
If this is actually still a problem with Axiom or Rampart, please let's reopen or open a new issue.
> 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: Axis 2.0 (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.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AXIS2-3195) AXIOM parser's throwing
NullPointerException if OMElement.getParent() is instance of OMDocument and
Rampart is engaged
Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578043#action_12578043 ]
Davanum Srinivas commented on AXIS2-3195:
-----------------------------------------
Ruchith,
do you want to try fixing this for 1.4?
thanks,
-- dims
> 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: Axis 2.0 (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.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Reopened: (AXIS2-3195) AXIOM parser's throwing
NullPointerException if OMElement.getParent() is instance of OMDocument and
Rampart is engaged
Posted by "Glen Daniels (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Glen Daniels reopened AXIS2-3195:
---------------------------------
Not "fixed"
> 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: Axis 2.0 (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.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AXIS2-3195) AXIOM parser's throwing
NullPointerException if OMElement.getParent() is instance of OMDocument and
Rampart is engaged
Posted by "Christopher Weiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christopher Weiss updated AXIS2-3195:
-------------------------------------
Description:
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);
}
was:
I can send a complete project to demonstrate the issue if necessary. With the axis2-1.2 release and earlier, the AXIOM parser may throw a NullPointerException when processing requests:
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);
}
Affects Version/s: (was: 1.2)
Summary: AXIOM parser's throwing NullPointerException if OMElement.getParent() is instance of OMDocument and Rampart is engaged (was: AXIOM parser's throwing NullPointerException if OMElement.getParent() is instance of OMDocument)
> 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: Axis 2.0 (Axis2)
> Issue Type: Bug
> Environment: Windows XP SP2, Axis2 1.2, Tomcat 6.0.13
> Reporter: Christopher Weiss
>
> 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.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Updated: (AXIS2-3195) AXIOM parser's throwing
NullPointerException if OMElement.getParent() is instance of OMDocument and
Rampart is engaged
Posted by "Christopher Weiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christopher Weiss updated AXIS2-3195:
-------------------------------------
Attachment: RampartBugDemo.zip
BugDemoConfigFiles.zip
I have attached a simple Eclipse project that demonstrates the Rampart integration issue. If the aar file is deployed to an Axis2 web-service (1.1.1 or 1.2), it should echo whatever is sent to it. However, the request never even makes it to the server because rampart throws an error trying to make the request. To invoke the client, run
java -cp Echo.aar;PATH_TO_AXIS2_LIBS\* -Daxis2.repo=PATH_TO_AXIS2_REPO -Daxis2.xml=PATH_TO_AXIS2_CONF org.example.www.echo.Client http://AXIS2_SERVER_IP_ADDRESS:8080/axis2/services/Echo XML_FILE_TO_ECHO
I have also attached a sample axis2.xml config file that engages security, as well as the client.properties and service.properties files (You still need an x509 cert). Deploying the service without security and running the client works as expected, but running the client with rampart engaged results in a null pointer exception.
Here is the stack trace:
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
> 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: Axis 2.0 (Axis2)
> Issue Type: Bug
> Environment: Windows XP SP2, Axis2 1.2, Tomcat 6.0.13
> Reporter: Christopher Weiss
> 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.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Resolved: (AXIS2-3195) AXIOM parser's throwing
NullPointerException if OMElement.getParent() is instance of OMDocument and
Rampart is engaged
Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Deepal Jayasinghe resolved AXIS2-3195.
--------------------------------------
Resolution: Fixed
Let's re-open if the issue is still there, and this is belong to rampart not to Axis2
> 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: Axis 2.0 (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.
-
You can reply to this email to add a comment to the issue online.