• Post Reply Bookmark Topic Watch Topic
  • New Topic

Debug output from JAXRPC generated class  RSS feed

 
Joe Gilvary
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 539
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!