CTD: NPE when sending GET to http://localhost:8080/api/v1/map

caver456's Avatar

caver456

24 Jul, 2021 02:02 PM

Hi, what's the proper way to make sure CTD is responding? As soon as I send the above request (which returns 200), the following NPE shows up in the CTD terminal window, but, the rest of the session appears to run normally / subsequent requests seem to work fine. I'm running CTD 4214. I think the same or similar NPE has been coming up for a long time but I just want to make sure I'm sending the proper request. Thanks!

RequestPropertyFilter handling uncaught exception:
java.lang.NullPointerException
        at org.sarsoft.common.request.APIV1MapRequestDispatcher.dispatch(APIV1MapRequestDispatcher.java:53)
        at org.sarsoft.common.request.APIV1MapRequestDispatcher.dispatch(APIV1MapRequestDispatcher.java:99)
        at org.sarsoft.DispatchController.map(DispatchController.java:29)
        at jdk.internal.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
        at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:440)
        at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:428)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:104)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
        at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
        at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
        at org.sarsoft.common.request.RequestPropertyFilter.doFilter(RequestPropertyFilter.java:69)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
        at org.sarsoft.compatibility.SQLiteDBSpringSessionFilter.doFilter(SQLiteDBSpringSessionFilter.java:27)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
        at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
        at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
        at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
        at java.base/java.lang.Thread.run(Thread.java:832)
RequestPropertyFilter handling uncaught exception:
java.lang.NullPointerException
        at org.sarsoft.common.request.APIV1MapRequestDispatcher.dispatch(APIV1MapRequestDispatcher.java:53)
        at org.sarsoft.common.request.APIV1MapRequestDispatcher.dispatch(APIV1MapRequestDispatcher.java:99)
        at org.sarsoft.DispatchController.map(DispatchController.java:29)
        at jdk.internal.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
        at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:440)
        at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:428)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:104)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
        at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
        at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
        at org.sarsoft.common.request.RequestPropertyFilter.doFilter(RequestPropertyFilter.java:69)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
        at org.sarsoft.compatibility.SQLiteDBSpringSessionFilter.doFilter(SQLiteDBSpringSessionFilter.java:27)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
        at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
        at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
        at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
        at java.base/java.lang.Thread.run(Thread.java:832)

  1. 1 Posted by caver456 on 28 Sep, 2021 02:36 AM

    caver456's Avatar

    Update to this tumbleweed: I was able to eradicate these NPEs entirely, by omitting the (probably long-since obsolete) requests that check for the API version. So this is really just FYI in case it uncovers some underlying issue that does need fixing. It would be great to find out if this is a known-obsolete as-expected issue, but I understand it's not really on your priority list to spend time tracking it down. Thanks

    If I do these initial requests, then the said NPEs happen frequently on various requests during the lifetime of the session:

    <domainAndPort> is something like 'localhost:8080' or 'sartopo.com'

    GET http://<domainAndPort>/api/v1/map --> if response code is 200, then try it with the mapID:
    GET http://<domainAndPort>/m/<mapID> --> if that also returns 200, then the session is valid and subsequent requests will be sent to something like http://<domainAndPort>/api/v1/<mapID>/....

    If I get rid of those initial test-requests, and instead just always send requests to http://<domainAndPort>/api/v1/<mapID>/.... then everything works fine and the NPEs never show up.

  2. matt closed this discussion on 27 Oct, 2021 04:21 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac