You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Michael Berkowitz <Mi...@Kayote.com> on 2008/03/19 11:54:53 UTC

When client gets fault response, it throws "java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.internal.ws.fault.SOAPFaultBuilder"

I've put this into Jira; I apologize if that wasn't the proper
procedure.  I did search quite a bit for any references to such a
problem beforehand - no luck.

Anyway, what I would expect is to get an exception from the invoke()
that contains whatever information is in the fault message.  This is
killing my tester, who can never tell what's gone wrong without
searching the Tomcat log for the corresponding server error.  Sometimes
even that doesn't show up, but that's for another email...

If anyone can suggest what may be going wrong, I'm all ears.  TIA.

Michael


RE: When client gets fault response, it throws "java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.internal.ws.fault.SOAPFaultBuilder"

Posted by Michael Berkowitz <mb...@xconnect.net>.
Well, that almost worked.  Now that I put the CXF jars in, my client throws
exceptions when calling certain WS methods (it seems to be limited to those
that take a few parameters).

With the CXF jars I get the following stack when making the call:

	  	  addAll():472, ArrayList.java
	  	  createWrapperObject():-1
	  	  handleMessage():102, WrapperClassOutInterceptor.java
	  	  doIntercept():208, PhaseInterceptorChain.java
	  	  invoke():276, ClientImpl.java
	  	  invoke():222, ClientImpl.java
	  	  invokeSync():73, ClientProxy.java
	  	  invoke():135, JaxWsClientProxy.java
	  	  getNumbers():-1
	  	  doLine():95, CmdLineApp.java
	  	  main():45, CmdLineApp.java

and then in addAll() it throws a NullPointerException.

WITHOUT the CXF jars this is the stack I get:

	  addAll():472, ArrayList.java
	  copySatelliteInto():86, DistributedPropertySet.java
	  <init>():168, Packet.java
	  createClientResponse():607, Packet.java
	  process():148, HttpTransportPipe.java
	  processRequest():74, HttpTransportPipe.java
	  __doRun():581, Fiber.java
	  _doRun():540, Fiber.java
	  doRun():525, Fiber.java
	  runSync():422, Fiber.java
	  process():235, Stub.java
	  doProcess():120, SEIStub.java
	  invoke():230, SyncMethodHandler.java
	  invoke():210, SyncMethodHandler.java
	  invoke():103, SEIStub.java
	  getNumbers():-1
	  doLine():95, CmdLineApp.java
	  main():45, CmdLineApp.java

and everything works fine (unless of course the server sends back a fault
message, in which case -- as we know -- the client throws an exception).

I will freely admit that I haven't delved into JAX, SOAP or CXF -- I just
want an easy way to export some methods as Web Services and use them
transparently in a client application -- so please factor that in when
explaining your theories of what's gone so terribly, terribly wrong.

Thanks in advance.

Michael

-----Original Message-----
From: Michael Berkowitz [mailto:Michael.Berkowitz@Kayote.com] 
Sent: Thursday, March 20, 2008 2:48 PM
To: Daniel Kulp; cxf-user@incubator.apache.org
Subject: RE: When client gets fault response, it throws
"java.lang.NoClassDefFoundError: Could not initialize class
com.sun.xml.internal.ws.fault.SOAPFaultBuilder"

Actually, I'm embarrassed to say this, but I just realized that I didn't
have the CXF jars in my client's classpath, just the JAX jars, so it
worked okay with "proper" messages but didn't know what to do with
faults.  Putting the CXF jars (I didn't know exactly which were needed,
so I took the whole distribution) in place worked.

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Thursday, March 20, 2008 2:18 PM
To: cxf-user@incubator.apache.org
Cc: Michael Berkowitz
Subject: Re: When client gets fault response, it throws
"java.lang.NoClassDefFoundError: Could not initialize class
com.sun.xml.internal.ws.fault.SOAPFaultBuilder"

On Wednesday 19 March 2008, Michael Berkowitz wrote:
> Thanks, Daniel.  I am, in fact, using build 1.6.0_04-b12.  Thanks for
> the advice, I'll look into it.  What's the ETA on 2.1?

I started a discussion about that:
http://www.nabble.com/Options-for-CXF-2.1.....-to16158740.html

Users inputs would be welcome as well.   :-)

Dan



> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Wednesday, March 19, 2008 4:05 PM
> To: cxf-user@incubator.apache.org
> Cc: Michael Berkowitz
> Subject: Re: When client gets fault response, it throws
> "java.lang.NoClassDefFoundError: Could not initialize class
> com.sun.xml.internal.ws.fault.SOAPFaultBuilder"
>
>
>
> Looking at the error, I guess it's Java 6?
>
> That's probably the "issue".   My gut feeling says it would work ok if
> you used a Java5 vm.   Getting 2.0.x to completely work on Java 6 (up
> to
>
> update 3, but not update 4) can be done, but you probably need to copy
> a
>
> couple jars from the lib dir to the jre/lib/endorsed dir.
> Specifically, the saaj* jars and the jaxb* jars.    I don't think
> 2.0.x will work at all with Java 6 update 4.  Maybe if you also
> endorse the jaxws-api jar.
>
>
> CXF 2.1 will support Java 6 update 4 (but not updates 1-3).
>
> Dan
>
> On Wednesday 19 March 2008, Michael Berkowitz wrote:
> > I've put this into Jira; I apologize if that wasn't the proper
> > procedure.  I did search quite a bit for any references to such a
> > problem beforehand - no luck.
> >
> > Anyway, what I would expect is to get an exception from the invoke()
> > that contains whatever information is in the fault message.  This is
> > killing my tester, who can never tell what's gone wrong without
> > searching the Tomcat log for the corresponding server error.
> > Sometimes even that doesn't show up, but that's for another email...
> >
> > If anyone can suggest what may be going wrong, I'm all ears.  TIA.
> >
> > Michael



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



RE: When client gets fault response, it throws "java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.internal.ws.fault.SOAPFaultBuilder"

Posted by Michael Berkowitz <Mi...@Kayote.com>.
Actually, I'm embarrassed to say this, but I just realized that I didn't
have the CXF jars in my client's classpath, just the JAX jars, so it
worked okay with "proper" messages but didn't know what to do with
faults.  Putting the CXF jars (I didn't know exactly which were needed,
so I took the whole distribution) in place worked.

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Thursday, March 20, 2008 2:18 PM
To: cxf-user@incubator.apache.org
Cc: Michael Berkowitz
Subject: Re: When client gets fault response, it throws
"java.lang.NoClassDefFoundError: Could not initialize class
com.sun.xml.internal.ws.fault.SOAPFaultBuilder"

On Wednesday 19 March 2008, Michael Berkowitz wrote:
> Thanks, Daniel.  I am, in fact, using build 1.6.0_04-b12.  Thanks for
> the advice, I'll look into it.  What's the ETA on 2.1?

I started a discussion about that:
http://www.nabble.com/Options-for-CXF-2.1.....-to16158740.html

Users inputs would be welcome as well.   :-)

Dan



> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Wednesday, March 19, 2008 4:05 PM
> To: cxf-user@incubator.apache.org
> Cc: Michael Berkowitz
> Subject: Re: When client gets fault response, it throws
> "java.lang.NoClassDefFoundError: Could not initialize class
> com.sun.xml.internal.ws.fault.SOAPFaultBuilder"
>
>
>
> Looking at the error, I guess it's Java 6?
>
> That's probably the "issue".   My gut feeling says it would work ok if
> you used a Java5 vm.   Getting 2.0.x to completely work on Java 6 (up
> to
>
> update 3, but not update 4) can be done, but you probably need to copy
> a
>
> couple jars from the lib dir to the jre/lib/endorsed dir.
> Specifically, the saaj* jars and the jaxb* jars.    I don't think
> 2.0.x will work at all with Java 6 update 4.  Maybe if you also
> endorse the jaxws-api jar.
>
>
> CXF 2.1 will support Java 6 update 4 (but not updates 1-3).
>
> Dan
>
> On Wednesday 19 March 2008, Michael Berkowitz wrote:
> > I've put this into Jira; I apologize if that wasn't the proper
> > procedure.  I did search quite a bit for any references to such a
> > problem beforehand - no luck.
> >
> > Anyway, what I would expect is to get an exception from the invoke()
> > that contains whatever information is in the fault message.  This is
> > killing my tester, who can never tell what's gone wrong without
> > searching the Tomcat log for the corresponding server error.
> > Sometimes even that doesn't show up, but that's for another email...
> >
> > If anyone can suggest what may be going wrong, I'm all ears.  TIA.
> >
> > Michael



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

Re: When client gets fault response, it throws "java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.internal.ws.fault.SOAPFaultBuilder"

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday 19 March 2008, Michael Berkowitz wrote:
> Thanks, Daniel.  I am, in fact, using build 1.6.0_04-b12.  Thanks for
> the advice, I'll look into it.  What's the ETA on 2.1?

I started a discussion about that:
http://www.nabble.com/Options-for-CXF-2.1.....-to16158740.html

Users inputs would be welcome as well.   :-)

Dan



> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Wednesday, March 19, 2008 4:05 PM
> To: cxf-user@incubator.apache.org
> Cc: Michael Berkowitz
> Subject: Re: When client gets fault response, it throws
> "java.lang.NoClassDefFoundError: Could not initialize class
> com.sun.xml.internal.ws.fault.SOAPFaultBuilder"
>
>
>
> Looking at the error, I guess it's Java 6?
>
> That's probably the "issue".   My gut feeling says it would work ok if
> you used a Java5 vm.   Getting 2.0.x to completely work on Java 6 (up
> to
>
> update 3, but not update 4) can be done, but you probably need to copy
> a
>
> couple jars from the lib dir to the jre/lib/endorsed dir.
> Specifically, the saaj* jars and the jaxb* jars.    I don't think
> 2.0.x will work at all with Java 6 update 4.  Maybe if you also
> endorse the jaxws-api jar.
>
>
> CXF 2.1 will support Java 6 update 4 (but not updates 1-3).
>
> Dan
>
> On Wednesday 19 March 2008, Michael Berkowitz wrote:
> > I've put this into Jira; I apologize if that wasn't the proper
> > procedure.  I did search quite a bit for any references to such a
> > problem beforehand - no luck.
> >
> > Anyway, what I would expect is to get an exception from the invoke()
> > that contains whatever information is in the fault message.  This is
> > killing my tester, who can never tell what's gone wrong without
> > searching the Tomcat log for the corresponding server error.
> > Sometimes even that doesn't show up, but that's for another email...
> >
> > If anyone can suggest what may be going wrong, I'm all ears.  TIA.
> >
> > Michael



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

RE: When client gets fault response, it throws "java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.internal.ws.fault.SOAPFaultBuilder"

Posted by Michael Berkowitz <Mi...@Kayote.com>.
Thanks, Daniel.  I am, in fact, using build 1.6.0_04-b12.  Thanks for
the advice, I'll look into it.  What's the ETA on 2.1?

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Wednesday, March 19, 2008 4:05 PM
To: cxf-user@incubator.apache.org
Cc: Michael Berkowitz
Subject: Re: When client gets fault response, it throws
"java.lang.NoClassDefFoundError: Could not initialize class
com.sun.xml.internal.ws.fault.SOAPFaultBuilder"



Looking at the error, I guess it's Java 6?

That's probably the "issue".   My gut feeling says it would work ok if 
you used a Java5 vm.   Getting 2.0.x to completely work on Java 6 (up to

update 3, but not update 4) can be done, but you probably need to copy a

couple jars from the lib dir to the jre/lib/endorsed dir.   
Specifically, the saaj* jars and the jaxb* jars.    I don't think 2.0.x 
will work at all with Java 6 update 4.  Maybe if you also endorse the 
jaxws-api jar.  


CXF 2.1 will support Java 6 update 4 (but not updates 1-3).  

Dan

On Wednesday 19 March 2008, Michael Berkowitz wrote:
> I've put this into Jira; I apologize if that wasn't the proper
> procedure.  I did search quite a bit for any references to such a
> problem beforehand - no luck.
>
> Anyway, what I would expect is to get an exception from the invoke()
> that contains whatever information is in the fault message.  This is
> killing my tester, who can never tell what's gone wrong without
> searching the Tomcat log for the corresponding server error. 
> Sometimes even that doesn't show up, but that's for another email...
>
> If anyone can suggest what may be going wrong, I'm all ears.  TIA.
>
> Michael



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

Re: When client gets fault response, it throws "java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.internal.ws.fault.SOAPFaultBuilder"

Posted by Daniel Kulp <dk...@apache.org>.

Looking at the error, I guess it's Java 6?

That's probably the "issue".   My gut feeling says it would work ok if 
you used a Java5 vm.   Getting 2.0.x to completely work on Java 6 (up to 
update 3, but not update 4) can be done, but you probably need to copy a 
couple jars from the lib dir to the jre/lib/endorsed dir.   
Specifically, the saaj* jars and the jaxb* jars.    I don't think 2.0.x 
will work at all with Java 6 update 4.  Maybe if you also endorse the 
jaxws-api jar.  


CXF 2.1 will support Java 6 update 4 (but not updates 1-3).  

Dan

On Wednesday 19 March 2008, Michael Berkowitz wrote:
> I've put this into Jira; I apologize if that wasn't the proper
> procedure.  I did search quite a bit for any references to such a
> problem beforehand - no luck.
>
> Anyway, what I would expect is to get an exception from the invoke()
> that contains whatever information is in the fault message.  This is
> killing my tester, who can never tell what's gone wrong without
> searching the Tomcat log for the corresponding server error. 
> Sometimes even that doesn't show up, but that's for another email...
>
> If anyone can suggest what may be going wrong, I'm all ears.  TIA.
>
> Michael



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog