users@jersey.java.net

Re: [Jersey] 0.6 -> 0.7 problem with jetty

From: Jean Aurambault <aurambaj_at_yahoo-inc.com>
Date: Thu, 05 Jun 2008 10:40:43 +0200

Hi all,

I tried the 0.8 snapshot and now I have another error !! any idea?

java.lang.NullPointerException
        at
sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:36)
        at
sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:18)
        at java.lang.reflect.Field.get(Field.java:358)
        at
com.sun.jersey.spi.resource.ResourceClassInjector.inject(ResourceClassInjector.java:270)
        at
com.sun.jersey.impl.resource.SingletonProvider.init(SingletonProvider.java:69)
        at
com.sun.jersey.spi.resource.ResourceProviderFactory.createProvider(ResourceProviderFactory.java:132)
        at
com.sun.jersey.impl.model.ResourceClass.init(ResourceClass.java:174)
        at
com.sun.jersey.impl.application.WebApplicationImpl.getResourceClass(WebApplicationImpl.java:250)
        at
com.sun.jersey.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:681)
        at
com.sun.jersey.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:568)
        at
com.yahoo.l10nservice.servlet.SpringServlet.initiate(SpringServlet.java:108)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.load(ServletContainer.java:328)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:136)
        at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:433)
        at
org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:342)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:463)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
        at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
        at org.mortbay.jetty.Server.handle(Server.java:313)
        at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
        at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:227)
        at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

Jean.


Paul Sandoz wrote:
> Lars Tackmann wrote:
>> On Tue, Jun 3, 2008 at 5:52 PM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
>>> I wonder if it is my fault. This is the rather embarrassing piece of
>>> code:
>>>
>>> public BaseRule(UriTemplate template) {
>>> assert template != template; <- !!!!!!!!!!!!
>>>
>>> this.template = template;
>>> }
>>>
>>> Find bugs spotted it, but i did not spot that find bugs did until
>>> after 0.7
>>> was released. However, it seemed to be benign and did not result in any
>>> failures to unit tests or running the examples, otherwise i would have
>>> noticed and fixed it immediately.
>>
>> Indeed it is fixed in the latest maven pom snapshot, which can be
>> obatined by adding the following lines to pom.xml
>>
>
> Great. Glad the maven stuff is working :-)
>
> Paul.
>