Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty 9 NPE on startup

Never mind. You always spot the problem right after posting. I neglected to add:

server.setHandler(HandlerCollection)

On 11/19/2012 1:30 PM, ccleve wrote:
I'm trying to duplicate jetty.xml, jetty-http.xml, and jetty-deploy.xml
in code, and I get a NullPointerException on startup:

2012-11-19 13:12:24 org.eclipse.jetty.webapp.WebAppContext 578  WARN
Failed startup of context
o.e.j.w.WebAppContext@2b1d8ca6{/,file:/C:/dev/rhubarb/rhubarb/webapps/root/,STARTING}{C:\dev\rhubarb\rhubarb\webapps\root}

java.lang.NullPointerException: null
     at
org.eclipse.jetty.server.session.AbstractSessionManager.doStart(AbstractSessionManager.java:221)
~[jetty-server-9.0.0.M2.jar:9.0.0.M2]
     at
org.eclipse.jetty.server.session.HashSessionManager.doStart(HashSessionManager.java:86)
~[jetty-server-9.0.0.M2.jar:9.0.0.M2]


The offending lines in AbstractSession are:

final Server server=getSessionHandler().getServer();
synchronized (server)

I'm having a hard time tracing through the stack to figure out where
"server" should have been set.

Can anyone help?

Here's the code: https://gist.github.com/4113034

and the startup log: https://gist.github.com/4113046

What am I doing wrong?




Back to the top