The moose likes Web Services and the fly likes Debug output from JAXRPC generated class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Debug output from JAXRPC generated class" Watch "Debug output from JAXRPC generated class" New topic
Author

Debug output from JAXRPC generated class

Joe Gilvary
Ranch Hand

Joined: May 11, 2001
Posts: 152
Hi,

I have an intermittent error from a null pointer in a generated SOAP serializer classes. Despite the warning posted at the top of the source, I went ahead and edited the class, recompiled, massaged it into my EAR and redeployed. I can see the stack traces that incriminate the null pointer for the times when it does occur (and it doesn't always), but I can't use Log4j, System.out, or even throwing new Error() to get any details about what exactly is null those times when the failure occurs.

The application runs on SunONE Java System App Server v72004Q2. Anyone have any ideas how I can get the details out when the error occurs? The stack traces don't show what was null, just a series of exceptions.

Thanks,

Joe
Tim West
Ranch Hand

Joined: Mar 15, 2004
Posts: 539
I guess the way I'd do this is log the SOAP messages being serialised/deserialised and compare them to the ones that throw exceptions. One way of doing this is to add a JAX-RPC handler to one end of the service that simply logs the messages, though I imagine you have a mechanism already in place.

If you were lucky, it'd only be throwing NPEs where your XML Schema says the field is mandatory...but it ain't guaranteed =\

I guess the answer is that I don't know of a JAX-RPC-specific way of doing this. I've found Sun's tools to have attrocious error reporting, the sort of thing you've described is typical of this - the information you *really* want just ain't there. My favourite error (which came out of Sun's wscompile utility) is "error: generator error: internal error (should not happen): tie.generator.002"

Maybe someone else has a better suggestion.

Cheers,


-Tim
 
IntelliJ Java IDE
 
subject: Debug output from JAXRPC generated class
 
Threads others viewed
Visual Editor Error
Does Tomcat Timeout?
Java In Genearal
Null Pointer Exception
EJB
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture