Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Debug output from JAXRPC generated class  RSS feed

 
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
 
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
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!