History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: SES-471
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Herko ter Horst
Reporter: Jan Stette
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Sesame

NullPointerException in Sesame Server when handling UnsupportedOperationException

Created: 30/Oct/07 01:22 PM   Updated: 20/Mar/08 08:33 PM
Component/s: HTTP Server
Affects Version/s: 2.0-beta6
Fix Version/s: 2.0-rc1


 Description   
When trying to query an HTTPRepository registered with the Sesame Server, it tries at some point to call HTTPRepositoryConnection.prepareQuery(). This throws an UnsupportedOperationException, however this exception isn't handled correctly and causes an NPE in the server:

java.lang.NullPointerException
at info.aduna.webapp.views.SimpleResponseView.render(SimpleResponseView.java:56)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1123)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:860)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:774)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:460)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
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.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:295)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)



 All   Comments   Change History      Sort Order:
Comment by James Leigh [07/Nov/07 08:57 PM]
info.aduna.webapp.views.SimpleResponseView should not throw a NPE if content is null. Not all response have content, like error codes.

Comment by Herko ter Horst [09/Nov/07 11:49 AM]
Made SimpleResponseView (and SimpleCustomResponseView) handle null inputs.