NPE in jetty's MimeTypes initialization

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

NPE in jetty's MimeTypes initialization

bhiefer
Recently I have received some crash logs related to initialization of MimeTypes:

"java.lang.ExceptionInInitializerError
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:704)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
        at org.eclipse.jetty.server.Server.doStart(Server.java:280)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.fourthline.cling.transport.impl.jetty.JettyServletContainer.startIfNotRunning(JettyServletContainer.java:108)
        at org.fourthline.cling.transport.impl.AsyncServletStreamServerImpl.run(AsyncServletStreamServerImpl.java:88)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
        at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.NullPointerException
        at org.eclipse.jetty.util.StringUtil.asciiToLowerCase(StringUtil.java:106)
        at org.eclipse.jetty.http.MimeTypes.<clinit>(MimeTypes.java:138)
        ... 10 more
java.lang.NullPointerException
        at org.eclipse.jetty.util.StringUtil.asciiToLowerCase(StringUtil.java:106)
        at org.eclipse.jetty.http.MimeTypes.<clinit>(MimeTypes.java:138)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:704)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
        at org.eclipse.jetty.server.Server.doStart(Server.java:280)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.fourthline.cling.transport.impl.jetty.JettyServletContainer.startIfNotRunning(JettyServletContainer.java:108)
        at org.fourthline.cling.transport.impl.AsyncServletStreamServerImpl.run(AsyncServletStreamServerImpl.java:88)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
        at java.lang.Thread.run(Thread.java:841)
"

It looks like some keys of org/eclipse/jetty/http/mime are null. Do you have any idea how can I fix it ?

Is it possible that it might be device related ? I observe it only on ASUS Transformer Pad TF701T (K00C), NVIDIA Tegra Note P1640, NVIDIA Shield and Toshiba Excite Pro AT10LE-A-108.

Thank you very much for any help.

Reply | Threaded
Open this post in threaded view
|

Re: NPE in jetty's MimeTypes initialization

Christian Bauer
Administrator
This looks like Jetty issue, have a look at the source and how this NPE happens. Probably try a newer version of Jetty libs as well.

Reply | Threaded
Open this post in threaded view
|

Re: NPE in jetty's MimeTypes initialization

rob.barker
In reply to this post by bhiefer
@bhiefer Did you get anywhere with this? I'm also getting this on the TF701t...
Reply | Threaded
Open this post in threaded view
|

Re: NPE in jetty's MimeTypes initialization

rob.barker
So, I attempted version 9 of jetty, but this didn't compile.  I tried the latest version 8 of jetty, and the same NPE problem exists. So I updated the http jar by simply clearing out mime.properties file completely - which solved the issue in so far as NPE doesn't happen. Not yet sure what I have broken in doing this however.