You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by mkhand02 <mk...@yahoo.com> on 2012/04/09 18:06:34 UTC

Classloading issue - Wrong SoapPartImpl getting picket up and throwing HIERARCHY_REQUEST_ERR

Hi, 

I have a bunch of Axis2 jars on the classpath (used elsewhere in the
project), and the below (bold) is basically an Axis2 impl of SOAPPart
getting picked up by CXF and causing the below.  If I remove that jar (axis2
saaj) things are ok, but that's not a realistic option for me.  This is when
envoking password callback for ws-sec. 

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.ParentNode.insertBefore(ParentNode.java:224) 
        at
org.apache.axiom.om.impl.dom.NodeImpl.appendChild(NodeImpl.java:240) 
        at
org.apache.axis2.saaj.SOAPPartImpl.appendChild(SOAPPartImpl.java:948)
        at
org.apache.cxf.staxutils.W3CDOMStreamWriter.setChild(W3CDOMStreamWriter.java:114) 
        at
org.apache.cxf.staxutils.W3CDOMStreamWriter.newChild(W3CDOMStreamWriter.java:104) 
        at
org.apache.cxf.staxutils.W3CDOMStreamWriter.writeStartElement(W3CDOMStreamWriter.java:132) 
        at
org.apache.cxf.staxutils.StaxUtils.writeStartElement(StaxUtils.java:538) 
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:478) 
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:466) 
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:448) 
        at
org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:113) 
        at
org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:73) 
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) 
        at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113) 
        at
org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:97) 
        at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:461) 
        at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:188) 
        at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:148) 
        at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179) 
        at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) 
        at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159) 
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) 
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
        at
com.savvis.ui.ccc.filters.DirectLaunchFilter.doFilter(DirectLaunchFilter.java:64) 
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) 
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
        at
com.savvis.ui.common.filters.InputValidationFilter.doFilter(InputValidationFilter.java:131) 
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) 
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
        at
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176) 
        at
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) 
        at
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) 
        at
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381) 
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) 
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) 
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563) 
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) 
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) 
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879) 
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) 
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) 
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) 
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) 
        at java.lang.Thread.run(Thread.java:619) 

--
View this message in context: http://cxf.547215.n5.nabble.com/Classloading-issue-Wrong-SoapPartImpl-getting-picket-up-and-throwing-HIERARCHY-REQUEST-ERR-tp5627639p5627639.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Classloading issue - Wrong SoapPartImpl getting picket up and throwing HIERARCHY_REQUEST_ERR

Posted by Glen Mazza <gm...@talend.com>.
Maybe there's a newer version of Axis2's saaj JAR available that CXF can 
also work with: https://issues.apache.org/jira/browse/AXIS2-3808

Glen

On 04/17/2012 12:44 PM, mkhand02 wrote:
> Bump - does anyone know any possible way out or something else outside the
> box I can try?  This a showstopper for us, and I am not sure how to get past
> it.
>
> Thanks again.
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Classloading-issue-Wrong-SoapPartImpl-getting-picket-up-and-throwing-HIERARCHY-REQUEST-ERR-tp5627639p5647005.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Glen Mazza
Talend Community Coders
coders.talend.com
blog: www.jroller.com/gmazza


Re: Classloading issue - Wrong SoapPartImpl getting picket up and throwing HIERARCHY_REQUEST_ERR

Posted by Freeman Fang <fr...@gmail.com>.
Yeah, this kind of issue is very hard to resolve in servlet container, but OSGi container could help you a lot  from the lib versions co-exist perspective.
-------------
Freeman Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042

On 2012-10-12, at 下午1:51, patsimon wrote:

> Just to bring some closure to this issue (and help others who have the same
> problem), it look's like it's not possible to upgrade CXF with the version
> of AXIS2 mentioned. This is because they both have dependancies on the
> XmlSchema lib, but they both need different versions.. So I ended up using
> AXIS2 and JAxB for databindings..
> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Classloading-issue-Wrong-SoapPartImpl-getting-picket-up-and-throwing-HIERARCHY-REQUEST-ERR-tp5627639p5716451.html
> Sent from the cxf-user mailing list archive at Nabble.com.


Re: Classloading issue - Wrong SoapPartImpl getting picket up and throwing HIERARCHY_REQUEST_ERR

Posted by patsimon <pa...@heypatty.com>.
Just to bring some closure to this issue (and help others who have the same
problem), it look's like it's not possible to upgrade CXF with the version
of AXIS2 mentioned. This is because they both have dependancies on the
XmlSchema lib, but they both need different versions.. So I ended up using
AXIS2 and JAxB for databindings..



--
View this message in context: http://cxf.547215.n5.nabble.com/Classloading-issue-Wrong-SoapPartImpl-getting-picket-up-and-throwing-HIERARCHY-REQUEST-ERR-tp5627639p5716451.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Classloading issue - Wrong SoapPartImpl getting picket up and throwing HIERARCHY_REQUEST_ERR

Posted by patsimon <pa...@heypatty.com>.
Thanks for the reply Dan.

I tried setting this in catalina.properties (like below) and it's still
getting into the axis2 code.

org.apache.cxf.binding.soap.messageFactoryClassName=com.sun.xml.internal.messaging.saaj.soap.SOAPPartImpl


I am using cxf 2.2.10 BTW and trying to avoid an upgrade if possible due all
the code that is pegged to libs that also need to move with CXF (WSS4J
etc..)

Any suggestions greatly appreciated.



--
View this message in context: http://cxf.547215.n5.nabble.com/Classloading-issue-Wrong-SoapPartImpl-getting-picket-up-and-throwing-HIERARCHY-REQUEST-ERR-tp5627639p5716045.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Classloading issue - Wrong SoapPartImpl getting picket up and throwing HIERARCHY_REQUEST_ERR

Posted by Daniel Kulp <dk...@apache.org>.
Just checked the code this morning and unfortunately, this setting only currently works as a system property, not an endpoint property.  :-(

Dan



On Oct 8, 2012, at 1:48 AM, patsimon <pa...@heypatty.com> wrote:

> How does one configure the endpoint with the property of
> org.apache.cxf.binding.soap.messageFactoryClassName ?
> 
> I am attempting to do this with client (ie. <jaxws:client) but nothing
> appears to be working
> 
> &lt;jaxws:client id=&quot;blahPort&quot;
> serviceClass=&quot;org.open.BlahPort&quot;
>                  address=&quot;${endpoint}&quot;>
>        <jaxws:features>
>            <ref bean="gzipFeature"/>
> 
>            <ref bean="fastInfosetFeature"/>
> 
>        </jaxws:features>
>        <jaxws:properties>
>            <entry key="org.apache.cxf.binding.soap.messageFactoryClassName"
> value="com.sun.xml.internal.messaging.saaj.soap.SOAPPartImpl" />
>        </jaxws:properties>
>        <jaxws:outInterceptors>
>            <ref bean="outPasswordInterceptor" />
>        </jaxws:outInterceptors>
>    </jaxws:client>
> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Classloading-issue-Wrong-SoapPartImpl-getting-picket-up-and-throwing-HIERARCHY-REQUEST-ERR-tp5627639p5715960.html
> Sent from the cxf-user mailing list archive at Nabble.com.

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: Classloading issue - Wrong SoapPartImpl getting picket up and throwing HIERARCHY_REQUEST_ERR

Posted by patsimon <pa...@heypatty.com>.
How does one configure the endpoint with the property of
org.apache.cxf.binding.soap.messageFactoryClassName ?

I am attempting to do this with client (ie. <jaxws:client) but nothing
appears to be working

&lt;jaxws:client id=&quot;blahPort&quot;
serviceClass=&quot;org.open.BlahPort&quot;
                  address=&quot;${endpoint}&quot;>
        <jaxws:features>
            <ref bean="gzipFeature"/>

            <ref bean="fastInfosetFeature"/>

        </jaxws:features>
        <jaxws:properties>
            <entry key="org.apache.cxf.binding.soap.messageFactoryClassName"
value="com.sun.xml.internal.messaging.saaj.soap.SOAPPartImpl" />
        </jaxws:properties>
        <jaxws:outInterceptors>
            <ref bean="outPasswordInterceptor" />
        </jaxws:outInterceptors>
    </jaxws:client>



--
View this message in context: http://cxf.547215.n5.nabble.com/Classloading-issue-Wrong-SoapPartImpl-getting-picket-up-and-throwing-HIERARCHY-REQUEST-ERR-tp5627639p5715960.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Classloading issue - Wrong SoapPartImpl getting picket up and throwing HIERARCHY_REQUEST_ERR

Posted by Daniel Kulp <da...@kulp.com>.
On Tuesday, April 17, 2012 09:44:48 AM mkhand02 wrote:
> Bump - does anyone know any possible way out or something else outside the
> box I can try?  This a showstopper for us, and I am not sure how to get
> past it.
> 
> Thanks again.

Couple options:

1) You can try upgrading to CXF 2.6.0 released last week.   I did some 
updates to make CXF more tolerant of older SAAJ implementations.   2.5.3 did 
get SOME of those fixes, but not all of them due to compatibility issues.

2) You can configure the CXF endpoint with properties of:

org.apache.cxf.binding.soap.messageFactoryClassName

with the name of a factory that does work.   Likely the 
com.sun.xml.internal.XXXXX  thing found in the JDK you are using.  May also 
need to specify:

org.apache.cxf.binding.soap.soapFactoryClassName


Dan




> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Classloading-issue-Wrong-SoapPartImpl-get
> ting-picket-up-and-throwing-HIERARCHY-REQUEST-ERR-tp5627639p5647005.html
> Sent from the cxf-user mailing list archive at Nabble.com.
-- 
Daniel Kulp
dan@kulp.com
http://dankulp.com/blog


Re: Classloading issue - Wrong SoapPartImpl getting picket up and throwing HIERARCHY_REQUEST_ERR

Posted by mkhand02 <mk...@yahoo.com>.
Bump - does anyone know any possible way out or something else outside the
box I can try?  This a showstopper for us, and I am not sure how to get past
it.

Thanks again.

--
View this message in context: http://cxf.547215.n5.nabble.com/Classloading-issue-Wrong-SoapPartImpl-getting-picket-up-and-throwing-HIERARCHY-REQUEST-ERR-tp5627639p5647005.html
Sent from the cxf-user mailing list archive at Nabble.com.