java.lang.NullPointerException

JIRA | Steve Owens | 5 years ago
  1. 0

    One of our production servers is throwing the following exception stack trace and we would like to elicit help in determining what might be the root cause of the error. The interesting parts of the stakc trace are: ava.lang.NullPointerException at com.mongodb.CommandResult.getException(CommandResult.java:64) at com.mongodb.CommandResult.throwOnError(CommandResult.java:116) at com.mongodb.DBPort.checkAuth(DBPort.java:308) Any thoughts on the root cause possibilities? The error is intermitent and not consistent. Full stack trace below: 2012-02-14 17:34:47,719 ERROR org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274) [http-8080-exec-4] - Servlet.service() for servlet spring threw exception java.lang.NullPointerException at com.mongodb.CommandResult.getException(CommandResult.java:64) at com.mongodb.CommandResult.throwOnError(CommandResult.java:116) at com.mongodb.DBPort.checkAuth(DBPort.java:308) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:201) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:303) at com.mongodb.DBCursor._check(DBCursor.java:360) at com.mongodb.DBCursor._hasNext(DBCursor.java:490) at com.mongodb.DBCursor.hasNext(DBCursor.java:515) at org.springframework.data.document.mongodb.MongoTemplate.executeFindMultiInternal(MongoTemplate.java:1425) at org.springframework.data.document.mongodb.MongoTemplate.doFind(MongoTemplate.java:1186) at org.springframework.data.document.mongodb.MongoTemplate.find(MongoTemplate.java:587) at org.springframework.data.document.mongodb.repository.AbstractMongoQuery$Execution.readCollection(AbstractMongoQuery.java:106) at org.springframework.data.document.mongodb.repository.AbstractMongoQuery$CollectionExecution.execute(AbstractMongoQuery.java:125) at org.springframework.data.document.mongodb.repository.AbstractMongoQuery.execute(AbstractMongoQuery.java:80) at org.springframework.data.repository.support.RepositoryFactorySupport$QueryExecuterMethodInterceptor.invoke(RepositoryFactorySupport.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy25.findAllAPIsWithUserIdAndRole(Unknown Source) at com.disney.tss.ft.cms.service.APIService.getAllAppsForOwner(APIService.java:786) at com.disney.tss.ft.cms.controller.APIController.getAllAppsForOwner(APIController.java:363) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.disney.tss.ft.apimgmt.AuthenticationEnforcementFilter.doFilter(AuthenticationEnforcementFilter.java:101) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.disney.tss.ft.apimgmt.PSKAuthenticationFilter.doFilter(PSKAuthenticationFilter.java:112) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.disney.tss.ft.apimgmt.PortalOauthFilter.doFilter(PortalOauthFilter.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at com.disney.tomcat.GreenCookieValve.invoke(Unknown Source) at com.disney.tomcat.RequestThrottleValve.invoke(Unknown Source) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:880) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2081) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)

    JIRA | 5 years ago | Steve Owens
    java.lang.NullPointerException
  2. 0

    NullPointerException DBTCPConnector.java:282

    Google Groups | 5 years ago | kobi
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.mongodb.CommandResult.getException()
    2. MongoDB Java Driver
      DBCursor.hasNext
      1. com.mongodb.CommandResult.getException(CommandResult.java:64)
      2. com.mongodb.CommandResult.throwOnError(CommandResult.java:116)
      3. com.mongodb.DBPort.checkAuth(DBPort.java:308)
      4. com.mongodb.DBTCPConnector.call(DBTCPConnector.java:201)
      5. com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:303)
      6. com.mongodb.DBCursor._check(DBCursor.java:360)
      7. com.mongodb.DBCursor._hasNext(DBCursor.java:490)
      8. com.mongodb.DBCursor.hasNext(DBCursor.java:515)
      8 frames
    3. org.springframework.data
      AbstractMongoQuery.execute
      1. org.springframework.data.document.mongodb.MongoTemplate.executeFindMultiInternal(MongoTemplate.java:1425)
      2. org.springframework.data.document.mongodb.MongoTemplate.doFind(MongoTemplate.java:1186)
      3. org.springframework.data.document.mongodb.MongoTemplate.find(MongoTemplate.java:587)
      4. org.springframework.data.document.mongodb.repository.AbstractMongoQuery$Execution.readCollection(AbstractMongoQuery.java:106)
      5. org.springframework.data.document.mongodb.repository.AbstractMongoQuery$CollectionExecution.execute(AbstractMongoQuery.java:125)
      6. org.springframework.data.document.mongodb.repository.AbstractMongoQuery.execute(AbstractMongoQuery.java:80)
      6 frames
    4. Spring Data Core
      RepositoryFactorySupport$QueryExecuterMethodInterceptor.invoke
      1. org.springframework.data.repository.support.RepositoryFactorySupport$QueryExecuterMethodInterceptor.invoke(RepositoryFactorySupport.java:333)
      1 frame
    5. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      2 frames
    6. Unknown
      $Proxy25.findAllAPIsWithUserIdAndRole
      1. $Proxy25.findAllAPIsWithUserIdAndRole(Unknown Source)
      1 frame
    7. com.disney.tss
      APIController.getAllAppsForOwner
      1. com.disney.tss.ft.cms.service.APIService.getAllAppsForOwner(APIService.java:786)
      2. com.disney.tss.ft.cms.controller.APIController.getAllAppsForOwner(APIController.java:363)
      2 frames
    8. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    9. Spring
      HandlerMethodInvoker.invokeHandlerMethod
      1. org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
      1 frame
    10. Spring MVC
      FrameworkServlet.doGet
      1. org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)
      2. org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)
      3. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
      4. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
      5. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
      6. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
      6 frames
    11. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      2 frames
    12. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    13. com.disney.tss
      AuthenticationEnforcementFilter.doFilter
      1. com.disney.tss.ft.apimgmt.AuthenticationEnforcementFilter.doFilter(AuthenticationEnforcementFilter.java:101)
      1 frame
    14. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    15. com.disney.tss
      PSKAuthenticationFilter.doFilter
      1. com.disney.tss.ft.apimgmt.PSKAuthenticationFilter.doFilter(PSKAuthenticationFilter.java:112)
      1 frame
    16. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    17. com.disney.tss
      PortalOauthFilter.doFilter
      1. com.disney.tss.ft.apimgmt.PortalOauthFilter.doFilter(PortalOauthFilter.java:106)
      1 frame
    18. Glassfish Core
      ErrorReportValve.invoke
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      6 frames
    19. com.disney.tomcat
      RequestThrottleValve.invoke
      1. com.disney.tomcat.GreenCookieValve.invoke(Unknown Source)
      2. com.disney.tomcat.RequestThrottleValve.invoke(Unknown Source)
      2 frames
    20. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      2. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      2 frames
    21. Grizzly HTTP
      NioEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:880)
      2. org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719)
      3. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2081)
      3 frames
    22. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      3. java.lang.Thread.run(Thread.java:662)
      3 frames