java.lang.NullPointerException

Atlassian JIRA | Brad Baker [Atlassian] | 4 years ago
  1. 0

    We have discovered a plugin reloadability problems in and around the SimpleLinkFactory code. Its seems it related to the case where UPM is self updated. After this the DefaultSimpleLinkFactory and its underlying DefaultPluginModuleTracker plugins code seems to hold onto a reference to the unloaded GH instance and does not contain a reference to the new instance. I hypothesize that it does not get the right "plugin event" and hence misses the opportunity to update itself and therefore has stale data. {code} [INFO] [talledLocalContainer] 2012-08-17 11:15:14,325 http-2990-6 ERROR admin 675x2100x1 1a03cus 127.0.0.1 /rest/api/1.0/menus/greenhopper_menu [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service [INFO] [talledLocalContainer] java.lang.NullPointerException [INFO] [talledLocalContainer] at com.atlassian.greenhopper.service.I18nFactoryServiceImpl.getI18n(I18nFactoryServiceImpl.java:84) [INFO] [talledLocalContainer] at com.atlassian.greenhopper.service.I18nFactoryServiceImpl.getI18n(I18nFactoryServiceImpl.java:61) [INFO] [talledLocalContainer] at com.atlassian.greenhopper.web.navigation.RapidViewHistoryLinkFactory.getLinks(RapidViewHistoryLinkFactory.java:56) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinks(DefaultSimpleLinkManager.java:161) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinksForSection(DefaultSimpleLinkManager.java:124) [INFO] [talledLocalContainer] at sun.reflect.GeneratedMethodAccessor282.invoke(Unknown Source) [INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:597) [INFO] [talledLocalContainer] at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$AbstractMultiTenantAwareInvocationHandler.invokeInternal(MultiTenantComponentFactoryImpl.java:181) [INFO] [talledLocalContainer] at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$MultiTenantAwareInvocationHandler.invoke(MultiTenantComponentFactoryImpl.java:211) {code} To reproduce do the following * Have JIRA 5.1.2 up with GH installed * The Agile menu should have a drop down of all available boards * In another tab goto plugin manager and "install plugin" a new version of UPM * Say https://maven.atlassian.com/content/repositories/atlassian-public/com/atlassian/upm/atlassian-universal-plugin-manager-plugin/2.4.1/atlassian-universal-plugin-manager-plugin-2.4.1.jar * Then go to the other tab and drop the GH Agile menu. * The call will fail and result in an exception on the server and a red error message for the user. (Try this a couple of times if you dont replicate. There seems to be some timing involved but not a lot since I was able to do it 3 times out of 4.) The problem is that because the "old implementation" is cached, it stays broken until JIRa restarts. The NullPointerException you see above is because the GH code that it is calling has already been torn down and hence goes pop when called. I think this is a UPM related thing because if I plugin reload GH then it all works as expected. I think its the UPM self update that is causing this problem. For the record GH has an optional dependency on UPM. (Licencing). When UPM goes down, then so does GH because of this now wired dep. GH comes back up once UPM is back up but the damage is donw and the internal JIRA SimpleLinkFactory cache is not cleared properly. This issue is the cause of GHS-5633. I think with the "increased propensity" for people to auto upgarde UPM, this is going to cause us a future support headache.

    Atlassian JIRA | 4 years ago | Brad Baker [Atlassian]
    java.lang.NullPointerException
  2. 0

    We have discovered a plugin reloadability problems in and around the SimpleLinkFactory code. Its seems it related to the case where UPM is self updated. After this the DefaultSimpleLinkFactory and its underlying DefaultPluginModuleTracker plugins code seems to hold onto a reference to the unloaded GH instance and does not contain a reference to the new instance. I hypothesize that it does not get the right "plugin event" and hence misses the opportunity to update itself and therefore has stale data. {code} [INFO] [talledLocalContainer] 2012-08-17 11:15:14,325 http-2990-6 ERROR admin 675x2100x1 1a03cus 127.0.0.1 /rest/api/1.0/menus/greenhopper_menu [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service [INFO] [talledLocalContainer] java.lang.NullPointerException [INFO] [talledLocalContainer] at com.atlassian.greenhopper.service.I18nFactoryServiceImpl.getI18n(I18nFactoryServiceImpl.java:84) [INFO] [talledLocalContainer] at com.atlassian.greenhopper.service.I18nFactoryServiceImpl.getI18n(I18nFactoryServiceImpl.java:61) [INFO] [talledLocalContainer] at com.atlassian.greenhopper.web.navigation.RapidViewHistoryLinkFactory.getLinks(RapidViewHistoryLinkFactory.java:56) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinks(DefaultSimpleLinkManager.java:161) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinksForSection(DefaultSimpleLinkManager.java:124) [INFO] [talledLocalContainer] at sun.reflect.GeneratedMethodAccessor282.invoke(Unknown Source) [INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:597) [INFO] [talledLocalContainer] at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$AbstractMultiTenantAwareInvocationHandler.invokeInternal(MultiTenantComponentFactoryImpl.java:181) [INFO] [talledLocalContainer] at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$MultiTenantAwareInvocationHandler.invoke(MultiTenantComponentFactoryImpl.java:211) {code} To reproduce do the following * Have JIRA 5.1.2 up with GH installed * The Agile menu should have a drop down of all available boards * In another tab goto plugin manager and "install plugin" a new version of UPM * Say https://maven.atlassian.com/content/repositories/atlassian-public/com/atlassian/upm/atlassian-universal-plugin-manager-plugin/2.4.1/atlassian-universal-plugin-manager-plugin-2.4.1.jar * Then go to the other tab and drop the GH Agile menu. * The call will fail and result in an exception on the server and a red error message for the user. (Try this a couple of times if you dont replicate. There seems to be some timing involved but not a lot since I was able to do it 3 times out of 4.) The problem is that because the "old implementation" is cached, it stays broken until JIRa restarts. The NullPointerException you see above is because the GH code that it is calling has already been torn down and hence goes pop when called. I think this is a UPM related thing because if I plugin reload GH then it all works as expected. I think its the UPM self update that is causing this problem. For the record GH has an optional dependency on UPM. (Licencing). When UPM goes down, then so does GH because of this now wired dep. GH comes back up once UPM is back up but the damage is donw and the internal JIRA SimpleLinkFactory cache is not cleared properly. This issue is the cause of GHS-5633. I think with the "increased propensity" for people to auto upgarde UPM, this is going to cause us a future support headache.

    Atlassian JIRA | 4 years ago | Brad Baker [Atlassian]
    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 com.atlassian.greenhopper.service.I18nFactoryServiceImpl.getI18n()
    2. com.atlassian.greenhopper
      RapidViewHistoryLinkFactory.getLinks
      1. com.atlassian.greenhopper.service.I18nFactoryServiceImpl.getI18n(I18nFactoryServiceImpl.java:84)
      2. com.atlassian.greenhopper.service.I18nFactoryServiceImpl.getI18n(I18nFactoryServiceImpl.java:61)
      3. com.atlassian.greenhopper.web.navigation.RapidViewHistoryLinkFactory.getLinks(RapidViewHistoryLinkFactory.java:56)
      3 frames
    3. com.atlassian.jira
      DefaultSimpleLinkManager.getLinksForSection
      1. com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinks(DefaultSimpleLinkManager.java:161)
      2. com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinksForSection(DefaultSimpleLinkManager.java:124)
      2 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor282.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    5. com.atlassian.multitenant
      MultiTenantComponentFactoryImpl$MultiTenantAwareInvocationHandler.invoke
      1. com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$AbstractMultiTenantAwareInvocationHandler.invokeInternal(MultiTenantComponentFactoryImpl.java:181)
      2. com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$MultiTenantAwareInvocationHandler.invoke(MultiTenantComponentFactoryImpl.java:211)
      2 frames