java.lang.NullPointerException

Spring JIRA | Björn Voß | 3 years ago
  1. 0

    The cache seems not to be able to handle heavy load during its warmup phase. We use 42 threads in parallel in performance test scenario (a lot of database operations in each thread) and got the NPE in one of five runs. Using a ConcurrentHashMap solves the problem. {code} java.lang.NullPointerException at org.springframework.data.mongodb.core.convert.CustomConversions.getCustomReadTarget(CustomConversions.java:329) at org.springframework.data.mongodb.core.convert.CustomConversions.hasCustomReadTarget(CustomConversions.java:283) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:200) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:187) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:183) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:77) at org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:1975) at org.springframework.data.mongodb.core.MongoTemplate.executeFindOneInternal(MongoTemplate.java:1626) at org.springframework.data.mongodb.core.MongoTemplate.doFindOne(MongoTemplate.java:1446) at org.springframework.data.mongodb.core.MongoTemplate.findById(MongoTemplate.java:539) at org.springframework.data.mongodb.repository.support.SimpleMongoRepository.findOne(SimpleMongoRepository.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:358) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:343) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy26.findOne(Unknown Source) at de.is24.offer.mongodb.evaluation.ReadYourOwnDataRightTask.countNumberOfInvalidResults(ReadYourOwnDataRightTask.java:34) at de.is24.offer.mongodb.evaluation.ReadYourOwnDataRightTask$$FastClassByCGLIB$$2b453a69.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:95) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.lang.Thread.run(Thread.java:744) {code}

    Spring JIRA | 3 years ago | Björn Voß
    java.lang.NullPointerException
  2. 0

    The cache seems not to be able to handle heavy load during its warmup phase. We use 42 threads in parallel in performance test scenario (a lot of database operations in each thread) and got the NPE in one of five runs. Using a ConcurrentHashMap solves the problem. {code} java.lang.NullPointerException at org.springframework.data.mongodb.core.convert.CustomConversions.getCustomReadTarget(CustomConversions.java:329) at org.springframework.data.mongodb.core.convert.CustomConversions.hasCustomReadTarget(CustomConversions.java:283) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:200) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:187) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:183) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:77) at org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:1975) at org.springframework.data.mongodb.core.MongoTemplate.executeFindOneInternal(MongoTemplate.java:1626) at org.springframework.data.mongodb.core.MongoTemplate.doFindOne(MongoTemplate.java:1446) at org.springframework.data.mongodb.core.MongoTemplate.findById(MongoTemplate.java:539) at org.springframework.data.mongodb.repository.support.SimpleMongoRepository.findOne(SimpleMongoRepository.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:358) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:343) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy26.findOne(Unknown Source) at de.is24.offer.mongodb.evaluation.ReadYourOwnDataRightTask.countNumberOfInvalidResults(ReadYourOwnDataRightTask.java:34) at de.is24.offer.mongodb.evaluation.ReadYourOwnDataRightTask$$FastClassByCGLIB$$2b453a69.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:95) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.lang.Thread.run(Thread.java:744) {code}

    Spring JIRA | 3 years ago | Björn Voß
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. 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 org.springframework.data.mongodb.core.convert.CustomConversions.getCustomReadTarget()
    2. Spring Data MongoDB - Core
      SimpleMongoRepository.findOne
      1. org.springframework.data.mongodb.core.convert.CustomConversions.getCustomReadTarget(CustomConversions.java:329)
      2. org.springframework.data.mongodb.core.convert.CustomConversions.hasCustomReadTarget(CustomConversions.java:283)
      3. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:200)
      4. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:187)
      5. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:183)
      6. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:77)
      7. org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:1975)
      8. org.springframework.data.mongodb.core.MongoTemplate.executeFindOneInternal(MongoTemplate.java:1626)
      9. org.springframework.data.mongodb.core.MongoTemplate.doFindOne(MongoTemplate.java:1446)
      10. org.springframework.data.mongodb.core.MongoTemplate.findById(MongoTemplate.java:539)
      11. org.springframework.data.mongodb.repository.support.SimpleMongoRepository.findOne(SimpleMongoRepository.java:100)
      11 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    4. Spring Data Core
      RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke
      1. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:358)
      2. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:343)
      2 frames
    5. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    6. com.sun.proxy
      $Proxy26.findOne
      1. com.sun.proxy.$Proxy26.findOne(Unknown Source)
      1 frame
    7. de.is24.offer
      ReadYourOwnDataRightTask$$FastClassByCGLIB$$2b453a69.invoke
      1. de.is24.offer.mongodb.evaluation.ReadYourOwnDataRightTask.countNumberOfInvalidResults(ReadYourOwnDataRightTask.java:34)
      2. de.is24.offer.mongodb.evaluation.ReadYourOwnDataRightTask$$FastClassByCGLIB$$2b453a69.invoke(<generated>)
      2 frames
    8. Spring Core
      MethodProxy.invoke
      1. org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
      1 frame
    9. Spring AOP
      AsyncExecutionInterceptor$1.call
      1. org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      3. org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:95)
      3 frames
    10. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:262)
      2. java.lang.Thread.run(Thread.java:744)
      2 frames