• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Debug output from JAXRPC generated class

Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.


Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic