java.lang.NullPointerException: null

Spring JIRA | Pedro Nuno Gonçalves | 3 years ago
  1. 0

    NullPointerException - Rest request

    GitHub | 3 years ago | PerGon
    java.lang.NullPointerException: null
  2. 0

    I'm using spring boot, and in version M5 everything was fine. I updated to M6 and I'm getting this NPE. As I stated in the place where I initially reported the bug (https://github.com/spring-projects/spring-boot/issues/130), I really don't know how to describe it. olivergierke said it was a spring-data bug, so here it is. If there is anymore details you need, just ask. Here's the stacktrace: {code:title=stacktrace|borderStyle=solid} java.lang.NullPointerException: null at org.springframework.data.repository.core.support.DefaultCrudMethods.deleteDetected(DefaultCrudMethods.java:129) at org.springframework.data.repository.core.support.DefaultCrudMethods.<init>(DefaultCrudMethods.java:79) at org.springframework.data.repository.core.support.DefaultRepositoryInformation.<init>(DefaultRepositoryInformation.java:76) at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepositoryInformation(RepositoryFactorySupport.java:183) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getRepositoryInformation(RepositoryFactoryBeanSupport.java:132) at org.springframework.data.repository.support.Repositories.lookupRepositoryFactoryInformationFor(Repositories.java:218) at org.springframework.data.repository.support.Repositories.hasRepositoryFor(Repositories.java:86) at org.springframework.data.repository.support.DomainClassConverter.matches(DomainClassConverter.java:82) at org.springframework.core.convert.support.GenericConversionService$ConvertersForPair.getConverter(GenericConversionService.java:618) at org.springframework.core.convert.support.GenericConversionService$Converters.getRegisteredConverter(GenericConversionService.java:524) at org.springframework.core.convert.support.GenericConversionService$Converters.find(GenericConversionService.java:508) at org.springframework.core.convert.support.GenericConversionService.getConverter(GenericConversionService.java:241) at org.springframework.core.convert.support.GenericConversionService.canConvert(GenericConversionService.java:136) at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:159) at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:93) at org.springframework.beans.TypeConverterSupport.doConvert(TypeConverterSupport.java:64) at org.springframework.beans.TypeConverterSupport.convertIfNecessary(TypeConverterSupport.java:47) at org.springframework.validation.DataBinder.convertIfNecessary(DataBinder.java:584) at org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.resolveArgument(AbstractNamedValueMethodArgumentResolver.java:102) at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:79) at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:157) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:124) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:748) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:947) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:878) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:946) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:837) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:822) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.sysmon.CorsFilter.doFilterInternal(CorsFilter.java:28) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) {code}

    Spring JIRA | 3 years ago | Pedro Nuno Gonçalves
    java.lang.NullPointerException: null
  3. 0

    I'm using spring boot, and in version M5 everything was fine. I updated to M6 and I'm getting this NPE. As I stated in the place where I initially reported the bug (https://github.com/spring-projects/spring-boot/issues/130), I really don't know how to describe it. olivergierke said it was a spring-data bug, so here it is. If there is anymore details you need, just ask. Here's the stacktrace: {code:title=stacktrace|borderStyle=solid} java.lang.NullPointerException: null at org.springframework.data.repository.core.support.DefaultCrudMethods.deleteDetected(DefaultCrudMethods.java:129) at org.springframework.data.repository.core.support.DefaultCrudMethods.<init>(DefaultCrudMethods.java:79) at org.springframework.data.repository.core.support.DefaultRepositoryInformation.<init>(DefaultRepositoryInformation.java:76) at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepositoryInformation(RepositoryFactorySupport.java:183) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getRepositoryInformation(RepositoryFactoryBeanSupport.java:132) at org.springframework.data.repository.support.Repositories.lookupRepositoryFactoryInformationFor(Repositories.java:218) at org.springframework.data.repository.support.Repositories.hasRepositoryFor(Repositories.java:86) at org.springframework.data.repository.support.DomainClassConverter.matches(DomainClassConverter.java:82) at org.springframework.core.convert.support.GenericConversionService$ConvertersForPair.getConverter(GenericConversionService.java:618) at org.springframework.core.convert.support.GenericConversionService$Converters.getRegisteredConverter(GenericConversionService.java:524) at org.springframework.core.convert.support.GenericConversionService$Converters.find(GenericConversionService.java:508) at org.springframework.core.convert.support.GenericConversionService.getConverter(GenericConversionService.java:241) at org.springframework.core.convert.support.GenericConversionService.canConvert(GenericConversionService.java:136) at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:159) at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:93) at org.springframework.beans.TypeConverterSupport.doConvert(TypeConverterSupport.java:64) at org.springframework.beans.TypeConverterSupport.convertIfNecessary(TypeConverterSupport.java:47) at org.springframework.validation.DataBinder.convertIfNecessary(DataBinder.java:584) at org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.resolveArgument(AbstractNamedValueMethodArgumentResolver.java:102) at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:79) at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:157) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:124) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:748) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:947) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:878) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:946) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:837) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:822) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.sysmon.CorsFilter.doFilterInternal(CorsFilter.java:28) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) {code}

    Spring JIRA | 3 years ago | Pedro Nuno Gonçalves
    java.lang.NullPointerException: null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    HQL Exception (org.hibernate.dialect.Dialect$3)

    Stack Overflow | 4 years ago | Hari
    java.lang.NullPointerException: null

    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

      null

      at org.springframework.data.repository.core.support.DefaultCrudMethods.deleteDetected()
    2. Spring Data Core
      DomainClassConverter.matches
      1. org.springframework.data.repository.core.support.DefaultCrudMethods.deleteDetected(DefaultCrudMethods.java:129)
      2. org.springframework.data.repository.core.support.DefaultCrudMethods.<init>(DefaultCrudMethods.java:79)
      3. org.springframework.data.repository.core.support.DefaultRepositoryInformation.<init>(DefaultRepositoryInformation.java:76)
      4. org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepositoryInformation(RepositoryFactorySupport.java:183)
      5. org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getRepositoryInformation(RepositoryFactoryBeanSupport.java:132)
      6. org.springframework.data.repository.support.Repositories.lookupRepositoryFactoryInformationFor(Repositories.java:218)
      7. org.springframework.data.repository.support.Repositories.hasRepositoryFor(Repositories.java:86)
      8. org.springframework.data.repository.support.DomainClassConverter.matches(DomainClassConverter.java:82)
      8 frames
    3. Spring Core
      GenericConversionService.canConvert
      1. org.springframework.core.convert.support.GenericConversionService$ConvertersForPair.getConverter(GenericConversionService.java:618)
      2. org.springframework.core.convert.support.GenericConversionService$Converters.getRegisteredConverter(GenericConversionService.java:524)
      3. org.springframework.core.convert.support.GenericConversionService$Converters.find(GenericConversionService.java:508)
      4. org.springframework.core.convert.support.GenericConversionService.getConverter(GenericConversionService.java:241)
      5. org.springframework.core.convert.support.GenericConversionService.canConvert(GenericConversionService.java:136)
      5 frames
    4. Spring Beans
      TypeConverterSupport.convertIfNecessary
      1. org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:159)
      2. org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:93)
      3. org.springframework.beans.TypeConverterSupport.doConvert(TypeConverterSupport.java:64)
      4. org.springframework.beans.TypeConverterSupport.convertIfNecessary(TypeConverterSupport.java:47)
      4 frames
    5. Spring Context
      DataBinder.convertIfNecessary
      1. org.springframework.validation.DataBinder.convertIfNecessary(DataBinder.java:584)
      1 frame
    6. Spring
      InvocableHandlerMethod.invokeForRequest
      1. org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.resolveArgument(AbstractNamedValueMethodArgumentResolver.java:102)
      2. org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:79)
      3. org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:157)
      4. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:124)
      4 frames
    7. Spring MVC
      FrameworkServlet.doGet
      1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
      2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:748)
      3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
      4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
      5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:947)
      6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:878)
      7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:946)
      8. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:837)
      8 frames
    8. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      1 frame
    9. Spring MVC
      FrameworkServlet.service
      1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:822)
      1 frame
    10. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      1 frame
    11. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    12. com.sysmon
      CorsFilter.doFilterInternal
      1. com.sysmon.CorsFilter.doFilterInternal(CorsFilter.java:28)
      1 frame
    13. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
      1 frame
    14. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    15. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
      2 frames
    16. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
      6. org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680)
      7. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      8. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      10 frames
    17. Grizzly HTTP
      NioEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      3. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686)
      3 frames
    18. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      3. java.lang.Thread.run(Thread.java:724)
      3 frames