John Yates wrote:

I recently tracked down a NullPointerException in my jsvc loaded java application to the fact that Thread.getContextClassLoader() returning null. JAXBContext.newInstance(String contextPath) effectively is JAXBContext.newInstance(contextPath, Thread.getContextClassLoader()) and dies if the class loader is null. For my application, a fix was

  if (Thread.getContextClassLoader() == null) {
    Thread.setContextClassLoader(ClassLoader.getSystemClassLoader());
  }

My question: is this is bug? If so, where? Should jsvc, since it loads the application, do this for me? Should JAXB do this (it should perhaps provide more info when this happens - it took debugging to find it)?

Please add a bug report in bugzilla, so that the problem is not forgotten in the next release.

Cheers

Jean-Frederic


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to