Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] NPE in MultiPartFilter

It appears to be this line:

MultipartConfigElement config = new MultipartConfigElement(tempdir.getCanonicalPath(), _maxFileSize, _maxRequestSize, _fileOutputBuffer);

Which means that tempdir is probably null for some reason.  The line appears in the jetty-8 branch; it was merged in from jetty-8-historical in this commit.
It first appeared in jetty-8-historical in this commit

I managed to get it working for me by using the 7.6.0.RC2 version of jetty-servlets.jar

Hope this was maybe a little bit helpful.

-Steve

On Sat, Dec 24, 2011 at 11:09 PM, Steven Arcangeli <arcangeli07@xxxxxxxxx> wrote:
I'm getting a NPE when I try to upload a file.  This happened right after upgrading to 8.1.0.RC2.  Previously I was on 7.0.2 with no problems.  Haven't tested it on any other versions.  It's possible I'm passing it the wrong set of DispatcherTypes?  I've included the stack trace and the final log statement.  I'm running it from an embedded server and can provide the server code if you like.  Any ideas?

Merry Christmahanakwanzika!
-Steve

2011-12-24 22:32:45,018 [qtp58472846-24] WARN  org.eclipse.jetty.servlet.ServletHandler  - /upload.html
java.lang.NullPointerException
at org.eclipse.jetty.servlets.MultiPartFilter.doFilter(MultiPartFilter.java:132)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1336)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:483)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1061)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:412)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:995)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:351)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:451)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:931)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:870)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:233)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:75)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:615)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
at java.lang.Thread.run(Thread.java:662)


Back to the top