You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by PrSd <si...@yahoo.com> on 2010/02/28 17:21:59 UTC

RE: WebSphere problems w/ CXF

Eric, 

I am amazed I have the exact same problem two years down. Hope you can still
reply. I have the same setup - CXF 2.2.6 on Websphere 6.1.0.19. + Spring
+OpenSAML. 
and I have the exact same symptoms that you ran into. 

OpenSAML does not let you use Sun's JAXP provider (buggy and broken) and
forces you to use Xerces and Xalan endorsed on the JRE's endorsed directory
(in this case WAS's IBM JDK). So I have put the three jars in the endorsed
directory - xercesImpl-2.9.1.jar, xml-apis-2.9.1.jar, xalan-2.7.1.jar. 

However if I put the saaj-impl-1.3.2 and saaj-api-1.3 (SUN) on the IBM's
endorsed directory, I get the exact same exception - 
*******************************************************************************
2/27/10 15:16:28:324 EST] 00000020 WebApp        E   [Servlet
Error]-[CXFServlet]: java.lang.NoClassDefFoundError:
com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl
	at
com.sun.xml.messaging.saaj.soap.SOAPPartImpl.<init>(SOAPPartImpl.java:119)
	at
com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.getSOAPPart(Message1_1Impl.java:109)
	at
org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:104)
	at
org.apache.cxf.jaxws.handler.soap.SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:78)
	at
org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.getOpQName(SOAPHandlerInterceptor.java:297)
	at
org.apache.cxf.jaxws.handler.AbstractJAXWSHandlerInterceptor.setupBindingOperationInfo(AbstractJAXWSHandlerInterceptor.java:111)
	at
org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.createProtocolMessageContext(SOAPHandlerInterceptor.java:235)
*******************************************************************************

So it appears WAS 6.1 does not seem to recognize these two jars in the
endorsed directory. When I take those two jars (SUN SAAJ1.3) out from the
WAS endorsed directory and let IBM's SAAJ (bolded below) to take over - I
run into the exact same issue you ran into - 

*******************************************************************************
org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging Interceptor for
{http://web.hsc.syscom.com/}BPMWebService has thrown exception, unwinding
now
                                 org.w3c.dom.DOMException:
HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not
permitted. 
	at org.apache.xerces.dom.CoreDocumentImpl.insertBefore(Unknown Source)
	at org.apache.xerces.dom.NodeImpl.appendChild(Unknown Source)
	at
com.ibm.ws.webservices.engine.xmlsoap.SOAPPart.appendChild(SOAPPart.java:244)
	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.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnvelopeStart(SoapOutInterceptor.java:122)
	at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:81)
******************************************************************************

Now I see from your response that you had this working. You mentioned that
you dumped these two jars
xercesImpl.jar and dom.jar in the
/opt/IBM/WebSphere/AppServer/java/jre/lib/endorsed directory. 

So here are my questions. Did you use

1. SUN's SAAJ1.3 jars (read somewhere WAS 6.1 only recognizes SAAJ 1.2) in
the endorsed directory or did you use IBM's own SAAJ?

2. Assuming you used SUN's, what XercesImpl version did you use. I have
xercesImpl-2.9.1.jar (required by OpenSAML 2.3.0) sitting in the endorsed.
However you mentioned you dropped xercesImpl and dom which suggests to me
that you did use SAAJ1.2. Were you still able to use OpenSAML 2.3 with that
setup. 

Looking forward to hearing from you

thanks
Sid







Ostermueller, Erik-2 wrote:
> 
> replying to self...
> 
> I keep forgetting about the subtle differences b/t
> classnotfoundexception and noclassdeffounderror.
> http://www.jroller.com/sjivan/entry/difference_between_classnotfoundexce
> ption_and_noclassdeffounderror 
> 
> My original problem was this:
> 
> [8/12/08 20:47:03:028 CDT] 0000004e ServletWrappe E   SRVE0068E:
> Uncaught exception thrown in one of the service methods of the servlet:
> cxf. Exception thrown : java.lang.NoClassDefFoundError:
> com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl
>         at
> com.sun.xml.messaging.saaj.soap.SOAPPartImpl.<init>(SOAPPartImpl.java:11
> 9)
>         at
> com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.getSOAPPart(Messag
> e1_1Impl.java:109)
>         at
> org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInI
> nterceptor.java:85)
> 
> NoClassDefFoundError means this class is indeed being found, but it has
> dependencies that are not.
> 
> I decompiled (using 'jad') the problem child:
> com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl.
> The import stmts showed that xercesImpl.jar and dom.jar were being used.
> So I dumped those into
> /opt/IBM/WebSphere/AppServer/java/jre/lib/endorsed and I was off and
> running.
> Wohoo!
> 
> -----Original Message-----
> From: Ostermueller, Erik [mailto:Erik.Ostermueller@fnis.com] 
> Sent: Wednesday, August 13, 2008 6:19 PM
> To: users@cxf.apache.org
> Subject: RE: WebSphere problems w/ CXF
> 
> Whoops, I forgot to mention that I started with a war file that was
> working on tomcat 5.0.30.
> By the way, thanks for keeping up with your cxf doc on your site.
> 
> -----Original Message-----
> From: Glen Mazza [mailto:glen.mazza@gmail.com]
> Sent: Wednesday, August 13, 2008 6:07 PM
> To: users@cxf.apache.org
> Subject: Re: WebSphere problems w/ CXF
> 
> 
> 
> Ostermueller, Erik-2 wrote:
>> 
>> If someone has this working on 6.1.0.17, could they perhaps send me 
>> what they have?
>> 
>> Thanks a lot,
>> --Erik Ostermueller
>> 
> 
> Erik, hopefully someone can get you an answer but in the meantime
> perhaps you should try getting your system to work on Tomcat first--that
> will allow you to separate system vs. application-server-related
> problems.  Before doing that, it may even be better to get a non-WS
> security version working on Tomcat (or even Websphere) before moving to
> WS-Security.
> 
> Here's what I managed with UsernameTokens on Tomcat (but its
> WSDL-first):
> http://www.jroller.com/gmazza/entry/using_cxf_and_wss4j_to
> 
> Glen
> 
> --
> View this message in context:
> http://www.nabble.com/WebSphere-problems-w--CXF-tp18961306p18972874.html
> Sent from the cxf-user mailing list archive at Nabble.com.
> 
> _____________
> 
> The information contained in this message is proprietary and/or
> confidential. If you are not the 
> intended recipient, please: (i) delete the message and all copies; (ii)
> do not disclose, 
> distribute or use the message in any manner; and (iii) notify the sender
> immediately. In addition, 
> please be aware that any message addressed to our domain is subject to
> archiving and review by 
> persons other than the intended recipient. Thank you.
> _____________
> 
> _____________
> 
> The information contained in this message is proprietary and/or
> confidential. If you are not the 
> intended recipient, please: (i) delete the message and all copies; (ii) do
> not disclose, 
> distribute or use the message in any manner; and (iii) notify the sender
> immediately. In addition, 
> please be aware that any message addressed to our domain is subject to
> archiving and review by 
> persons other than the intended recipient. Thank you.
> _____________
> 
> 

-- 
View this message in context: http://old.nabble.com/WebSphere-problems-w--CXF-tp18961306p27736104.html
Sent from the cxf-user mailing list archive at Nabble.com.