You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Arjen Poutsma (JIRA)" <ji...@apache.org> on 2008/05/19 01:37:56 UTC

[jira] Created: (GERONIMO-4029) Transforming from DOM Document to SAAJ SOAPBody throws TransformerException

Transforming from DOM Document to SAAJ SOAPBody throws TransformerException
---------------------------------------------------------------------------

                 Key: GERONIMO-4029
                 URL: https://issues.apache.org/jira/browse/GERONIMO-4029
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: webservices
    Affects Versions: 2.0.2
         Environment: OS X, JDK 1.5, Geronimo 2.0.2
            Reporter: Arjen Poutsma


When running the following program within Geronimo:

{noformat}
MessageFactory messageFactory = MessageFactory.newInstance();
Transformer transformer = TransformerFactory.newInstance().newTransformer();
SOAPMessage message = messageFactory.createMessage();
Document document = createDocument();
SOAPBody body = message.getSOAPBody();
transformer.transform(new DOMSource(document), new DOMResult(body));
{noformat}

a TransformerException is thrown on the last line. The attached zip file contains a simple Servlet which can be used to reproduce this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (GERONIMO-4029) Transforming from DOM Document to SAAJ SOAPBody throws TransformerException

Posted by "Jarek Gawor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-4029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jarek Gawor resolved GERONIMO-4029.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2
         Assignee: Jarek Gawor

Resolving as this problem was fixed in Axis2 and Geronimo 2.2 will use Axis2 1.5 which contains a fix for this problem.



> Transforming from DOM Document to SAAJ SOAPBody throws TransformerException
> ---------------------------------------------------------------------------
>
>                 Key: GERONIMO-4029
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4029
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: webservices
>    Affects Versions: 2.0.2
>         Environment: OS X, JDK 1.5, Geronimo 2.0.2
>            Reporter: Arjen Poutsma
>            Assignee: Jarek Gawor
>             Fix For: 2.2
>
>         Attachments: saaj-test.zip
>
>
> When running the following program within Geronimo:
> {noformat}
> MessageFactory messageFactory = MessageFactory.newInstance();
> Transformer transformer = TransformerFactory.newInstance().newTransformer();
> SOAPMessage message = messageFactory.createMessage();
> Document document = createDocument();
> SOAPBody body = message.getSOAPBody();
> transformer.transform(new DOMSource(document), new DOMResult(body));
> {noformat}
> a TransformerException is thrown on the last line. The attached zip file contains a simple Servlet which can be used to reproduce this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-4029) Transforming from DOM Document to SAAJ SOAPBody throws TransformerException

Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598108#action_12598108 ] 

Kevan Miller commented on GERONIMO-4029:
----------------------------------------

Heh. Yeah, I was a little curious about that too... Jarek, Jeff, or Dims would know the gory details.

IIUC, Axis2 requires the Axis2 SAAJ implementation. I'm not sure how tightly bound CXF is to the Sun RI. I would guess that it's a tight binding -- we have to do some switching to support the alternate SAAJ implementations. Another possibility is that it's just historical -- we had CXF integrated prior to Axis2...

> Transforming from DOM Document to SAAJ SOAPBody throws TransformerException
> ---------------------------------------------------------------------------
>
>                 Key: GERONIMO-4029
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4029
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: webservices
>    Affects Versions: 2.0.2
>         Environment: OS X, JDK 1.5, Geronimo 2.0.2
>            Reporter: Arjen Poutsma
>         Attachments: saaj-test.zip
>
>
> When running the following program within Geronimo:
> {noformat}
> MessageFactory messageFactory = MessageFactory.newInstance();
> Transformer transformer = TransformerFactory.newInstance().newTransformer();
> SOAPMessage message = messageFactory.createMessage();
> Document document = createDocument();
> SOAPBody body = message.getSOAPBody();
> transformer.transform(new DOMSource(document), new DOMResult(body));
> {noformat}
> a TransformerException is thrown on the last line. The attached zip file contains a simple Servlet which can be used to reproduce this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-4029) Transforming from DOM Document to SAAJ SOAPBody throws TransformerException

Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598045#action_12598045 ] 

Kevan Miller commented on GERONIMO-4029:
----------------------------------------

You must be using the Tomcat distribution of geronimo. Your test works fine on the Jetty distribution of Geronimo 2.1. By default, our Jetty distribution uses CXF as it's web services implementation and Sun as the SAAJ implementation. 

This problem is either a Geronimo environment problem or a bug in the Axis2 SAAJ implementation. Either way, will use this Jira to track our progress...

This problem was discussed recently on our user list. You have a few work-arounds to get this working on our Tomcat distribution:

1) Use a different SAAJ implementation. Before starting your server:

export GERONIMO_OPTS="-Dorg.apache.geronimo.saaj.provider=sun"

This requires that you run on a Sun JVM, which won't be a problem on Mac OS.

2) Hide Axis2 from your web app. Use the following geronimo deployment plan when deploying your app:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1" xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
  <dep:environment>
    <dep:moduleId>
      <dep:groupId>org.mygroup</dep:groupId>
      <dep:artifactId>MyApp</dep:artifactId>
      <dep:version>1.0</dep:version>
      <dep:type>war</dep:type>
    </dep:moduleId>
    <!-- 
         Don't load axis2 classes from parent ClassLoaders.
      -->
    <hidden-classes>
      <filter>org.apache.axis2</filter>
    </hidden-classes>
  </dep:environment>
</web-app>






> Transforming from DOM Document to SAAJ SOAPBody throws TransformerException
> ---------------------------------------------------------------------------
>
>                 Key: GERONIMO-4029
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4029
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: webservices
>    Affects Versions: 2.0.2
>         Environment: OS X, JDK 1.5, Geronimo 2.0.2
>            Reporter: Arjen Poutsma
>         Attachments: saaj-test.zip
>
>
> When running the following program within Geronimo:
> {noformat}
> MessageFactory messageFactory = MessageFactory.newInstance();
> Transformer transformer = TransformerFactory.newInstance().newTransformer();
> SOAPMessage message = messageFactory.createMessage();
> Document document = createDocument();
> SOAPBody body = message.getSOAPBody();
> transformer.transform(new DOMSource(document), new DOMResult(body));
> {noformat}
> a TransformerException is thrown on the last line. The attached zip file contains a simple Servlet which can be used to reproduce this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-4029) Transforming from DOM Document to SAAJ SOAPBody throws TransformerException

Posted by "Jarek Gawor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598351#action_12598351 ] 

Jarek Gawor commented on GERONIMO-4029:
---------------------------------------

This is a bug in Axis2 SAAJ implementation. Here's the Axis2 bug report: https://issues.apache.org/jira/browse/AXIS2-3808


> Transforming from DOM Document to SAAJ SOAPBody throws TransformerException
> ---------------------------------------------------------------------------
>
>                 Key: GERONIMO-4029
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4029
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: webservices
>    Affects Versions: 2.0.2
>         Environment: OS X, JDK 1.5, Geronimo 2.0.2
>            Reporter: Arjen Poutsma
>         Attachments: saaj-test.zip
>
>
> When running the following program within Geronimo:
> {noformat}
> MessageFactory messageFactory = MessageFactory.newInstance();
> Transformer transformer = TransformerFactory.newInstance().newTransformer();
> SOAPMessage message = messageFactory.createMessage();
> Document document = createDocument();
> SOAPBody body = message.getSOAPBody();
> transformer.transform(new DOMSource(document), new DOMResult(body));
> {noformat}
> a TransformerException is thrown on the last line. The attached zip file contains a simple Servlet which can be used to reproduce this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-4029) Transforming from DOM Document to SAAJ SOAPBody throws TransformerException

Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598090#action_12598090 ] 

Kevan Miller commented on GERONIMO-4029:
----------------------------------------

BTW, here's the failure info, since it wasn't provided previously...

Testing MessageFactory org.apache.geronimo.webservices.saaj.GeronimoMessageFactory

Trying to create SOAPMessage: success.

Trying to get SOAPBody: success.

Trying to transform from Document to SOAPBody: failure.

javax.xml.transform.TransformerException: org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. 
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:670)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:300)
	at com.springsource.saaj.SaajTestServlet.transformToBody(Unknown Source)
	at com.springsource.saaj.SaajTestServlet.service(Unknown Source)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
	at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:406)
	at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:613)
Caused by: org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. 
	at org.apache.axiom.om.impl.dom.NodeImpl.insertBefore(NodeImpl.java:259)
	at org.apache.axiom.om.impl.dom.NodeImpl.appendChild(NodeImpl.java:238)
	at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.startElement(SAX2DOM.java:150)
	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:205)
	at com.sun.org.apache.xml.internal.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:291)
	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.startElement(ToXMLSAXHandler.java:646)
	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.startElement(ToXMLSAXHandler.java:501)
	at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:138)
	at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:215)
	at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:121)
	at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:85)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:615)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:661)
	... 19 more
---------
org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. 
	at org.apache.axiom.om.impl.dom.NodeImpl.insertBefore(NodeImpl.java:259)
	at org.apache.axiom.om.impl.dom.NodeImpl.appendChild(NodeImpl.java:238)
	at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.startElement(SAX2DOM.java:150)
	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:205)
	at com.sun.org.apache.xml.internal.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:291)
	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.startElement(ToXMLSAXHandler.java:646)
	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.startElement(ToXMLSAXHandler.java:501)
	at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:138)
	at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:215)
	at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:121)
	at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:85)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:615)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:661)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:300)
	at com.springsource.saaj.SaajTestServlet.transformToBody(Unknown Source)
	at com.springsource.saaj.SaajTestServlet.service(Unknown Source)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
	at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:406)
	at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:613)



> Transforming from DOM Document to SAAJ SOAPBody throws TransformerException
> ---------------------------------------------------------------------------
>
>                 Key: GERONIMO-4029
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4029
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: webservices
>    Affects Versions: 2.0.2
>         Environment: OS X, JDK 1.5, Geronimo 2.0.2
>            Reporter: Arjen Poutsma
>         Attachments: saaj-test.zip
>
>
> When running the following program within Geronimo:
> {noformat}
> MessageFactory messageFactory = MessageFactory.newInstance();
> Transformer transformer = TransformerFactory.newInstance().newTransformer();
> SOAPMessage message = messageFactory.createMessage();
> Document document = createDocument();
> SOAPBody body = message.getSOAPBody();
> transformer.transform(new DOMSource(document), new DOMResult(body));
> {noformat}
> a TransformerException is thrown on the last line. The attached zip file contains a simple Servlet which can be used to reproduce this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-4029) Transforming from DOM Document to SAAJ SOAPBody throws TransformerException

Posted by "Arjen Poutsma (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-4029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arjen Poutsma updated GERONIMO-4029:
------------------------------------

    Attachment: saaj-test.zip

> Transforming from DOM Document to SAAJ SOAPBody throws TransformerException
> ---------------------------------------------------------------------------
>
>                 Key: GERONIMO-4029
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4029
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: webservices
>    Affects Versions: 2.0.2
>         Environment: OS X, JDK 1.5, Geronimo 2.0.2
>            Reporter: Arjen Poutsma
>         Attachments: saaj-test.zip
>
>
> When running the following program within Geronimo:
> {noformat}
> MessageFactory messageFactory = MessageFactory.newInstance();
> Transformer transformer = TransformerFactory.newInstance().newTransformer();
> SOAPMessage message = messageFactory.createMessage();
> Document document = createDocument();
> SOAPBody body = message.getSOAPBody();
> transformer.transform(new DOMSource(document), new DOMResult(body));
> {noformat}
> a TransformerException is thrown on the last line. The attached zip file contains a simple Servlet which can be used to reproduce this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-4029) Transforming from DOM Document to SAAJ SOAPBody throws TransformerException

Posted by "Arjen Poutsma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598097#action_12598097 ] 

Arjen Poutsma commented on GERONIMO-4029:
-----------------------------------------

Indeed, I used the tomcat distro. Thanks for the info!

Just my curiosity, but why do you ship two different SOAP stacks with the different Geronimos (CXF vs Axis2) ? Inquisitive minds want to know...


> Transforming from DOM Document to SAAJ SOAPBody throws TransformerException
> ---------------------------------------------------------------------------
>
>                 Key: GERONIMO-4029
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4029
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: webservices
>    Affects Versions: 2.0.2
>         Environment: OS X, JDK 1.5, Geronimo 2.0.2
>            Reporter: Arjen Poutsma
>         Attachments: saaj-test.zip
>
>
> When running the following program within Geronimo:
> {noformat}
> MessageFactory messageFactory = MessageFactory.newInstance();
> Transformer transformer = TransformerFactory.newInstance().newTransformer();
> SOAPMessage message = messageFactory.createMessage();
> Document document = createDocument();
> SOAPBody body = message.getSOAPBody();
> transformer.transform(new DOMSource(document), new DOMResult(body));
> {noformat}
> a TransformerException is thrown on the last line. The attached zip file contains a simple Servlet which can be used to reproduce this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.