users@jersey.java.net

NPE in java.lang.Class.isAssignableFrom in obfuscated server

From: Farrukh Najmi <farrukh_at_wellfleetsoftware.com>
Date: Wed, 10 Nov 2010 15:55:29 -0500

I have a server and client that are fairly mature and stable and use
spring-ws and JAXB for the server interface.

Recently I obfuscated my server code and now my gives an NPE during boot
with a stack trace involving jersey server code.
Here is an excerpt from the server log...

Can any one hazard a guess as to what sort of problem introduced during
class modification by obfuscator could cause this error?
Thanks for your help.

[#|2010-11-10T15:47:05.315-0500|INFO|glassfish3.0.1|com.sun.jersey.server.impl.application.WebApplicationImpl|_ThreadID=11;_ThreadName=Thread-1;|Initiating
Jersey application, version 'Jersey: 1.1.5 01/20/2010 04:04 PM'|#]

[#|2010-11-10T15:47:05.344-0500|INFO|glassfish3.0.1|com.sun.jersey.server.impl.application.WebApplicationImpl|_ThreadID=11;_ThreadName=Thread-1;|Adding
the following classes declared in
META-INF/services/jersey-server-components to the resource configuration:
   class com.sun.jersey.multipart.impl.FormDataMultiPartDispatchProvider
   class com.sun.jersey.multipart.impl.MultiPartConfigProvider
   class com.sun.jersey.multipart.impl.MultiPartReader
   class com.sun.jersey.multipart.impl.MultiPartWriter|#]

[#|2010-11-10T15:47:07.769-0500|SEVERE|glassfish3.0.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=11;_ThreadName=FelixStartLevel;|WebModule[/xxxx-server]StandardWrapper.Throwable
java.lang.NullPointerException
         at java.lang.Class.isAssignableFrom(Native Method)
         at
com.sun.jersey.server.impl.application.ExceptionMapperFactory.getExceptionType(ExceptionMapperFactory.java:112)
         at
com.sun.jersey.server.impl.application.ExceptionMapperFactory.init(ExceptionMapperFactory.java:72)
         at
com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:851)
         at
com.sun.jersey.spi.spring.container.servlet.SpringServlet.initiate(SpringServlet.java:99)
         at
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:252)
         at
com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:550)
         at
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:201)
         at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:307)

-- 
Regards,
Farrukh Najmi
Web: http://www.wellfleetsoftware.com