java.lang.NullPointerException

Atlassian JIRA | David Currie [Atlassian] | 3 months ago
  1. 0

    h3. Summary When trying to start JIRA Service Desk, the application is not able to fully start. This results in partial functionality working. h3. Steps to Reproduce It is unknown how this the data got into this state, the problem occurred on a customer's instance after starting JIRA Service Desk. h3. Expected Results JSD starts without any problems. h3. Actual Results The below exception is thrown: {noformat} 2016-08-30 03:43:19,490 JIRA-Bootstrap ERROR [c.a.servicedesk.bootstrap.lifecycle] java.lang.NullPointerException at scala.Predef$.Long2long(Predef.scala:358) at com.atlassian.servicedesk.internal.feature.customer.request.requesttype.RequestType$.apply(RequestType.scala:73) at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSetting$.toModel(EmailChannelSetting.scala:28) at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager.com$atlassian$servicedesk$internal$feature$emailchannel$emailplatform$EmailChannelSettingManager$$toSettingModel(EmailChannelSettingManager.scala:124) at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager$$anonfun$getEmailChannelSettings$1.apply(EmailChannelSettingManager.scala:105) at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager$$anonfun$getEmailChannelSettings$1.apply(EmailChannelSettingManager.scala:105) at scala.collection.immutable.List.map(List.scala:273) at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager.getEmailChannelSettings(EmailChannelSettingManager.scala:105) at com.atlassian.servicedesk.bootstrap.lifecycle.SDMailChannelInitializer.updateSDMailChannels(SDMailChannelInitializer.java:48) at com.atlassian.servicedesk.bootstrap.lifecycle.SDMailChannelInitializer.enableSDMailChannels(SDMailChannelInitializer.java:41) at com.atlassian.servicedesk.bootstrap.lifecycle.PluginLifeCycle.runPluginStartupSideEffectsImpl(PluginLifeCycle.java:201) at com.atlassian.servicedesk.bootstrap.lifecycle.LifecycleLock.writeImpl(LifecycleLock.java:97) at com.atlassian.servicedesk.bootstrap.lifecycle.LifecycleLock.runOnStartup(LifecycleLock.java:75) at com.atlassian.servicedesk.bootstrap.lifecycle.PluginLifeCycle.onPluginStarted(PluginLifeCycle.java:126) at com.atlassian.servicedesk.bootstrap.lifecycle.Launcher.onStartCompleted(Launcher.java:75) at com.atlassian.servicedesk.bootstrap.lifecycle.Launcher.access$000(Launcher.java:23) at com.atlassian.servicedesk.bootstrap.lifecycle.Launcher$1$1.run(Launcher.java:42) at com.atlassian.pocketknife.api.util.runners.SealedRunner.checkSeals(SealedRunner.java:111) at com.atlassian.pocketknife.api.util.runners.SealedRunner.breakSeal(SealedRunner.java:68) at com.atlassian.servicedesk.bootstrap.lifecycle.Launcher.onStart(Launcher.java:68) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$4.consume(DefaultLifecycleManager.java:310) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$4.consume(DefaultLifecycleManager.java:306) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyLifecyleAware(DefaultLifecycleManager.java:344) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyOnStartIfStartedAndEnabled(DefaultLifecycleManager.java:304) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.access$300(DefaultLifecycleManager.java:50) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$3.evaluate(DefaultLifecycleManager.java:261) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$3.evaluate(DefaultLifecycleManager.java:257) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyLifecycleAwares(DefaultLifecycleManager.java:286) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyStartableLifecycleAwares(DefaultLifecycleManager.java:255) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.startIfApplicationSetup(DefaultLifecycleManager.java:241) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.start(DefaultLifecycleManager.java:230) at com.atlassian.sal.jira.lifecycle.JiraLifecycleManager.onJiraStart(JiraLifecycleManager.java:64) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:48) at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:107) at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160) at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79) at com.atlassian.plugin.event.impl.DefaultPluginEventManager.broadcast(DefaultPluginEventManager.java:73) at com.atlassian.jira.upgrade.PluginUpgradeLauncher.start(PluginUpgradeLauncher.java:30) at com.atlassian.jira.startup.ActiveServicesLauncher.start(ActiveServicesLauncher.java:51) at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$postTenantArrived$4(DefaultJiraLauncher.java:178) at com.atlassian.jira.startup.DefaultInstantUpgradeManager$StartupTask.run(DefaultInstantUpgradeManager.java:139) at com.atlassian.jira.startup.DefaultInstantUpgradeManager.runTask(DefaultInstantUpgradeManager.java:55) at com.atlassian.jira.startup.DefaultInstantUpgradeManager.doNowOrWhenInstanceBecomesActive(DefaultInstantUpgradeManager.java:42) at com.atlassian.jira.startup.DefaultJiraLauncher.postTenantArrived(DefaultJiraLauncher.java:171) at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$postDBActivated$3(DefaultJiraLauncher.java:159) at com.atlassian.jira.tenancy.DefaultTenantManager.doNowOrWhenTenantArrives(DefaultTenantManager.java:55) at com.atlassian.jira.startup.DefaultJiraLauncher.postDBActivated(DefaultJiraLauncher.java:156) at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$postDbLaunch$2(DefaultJiraLauncher.java:145) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:298) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseActivated(DatabaseConfigurationManagerImpl.java:194) at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:135) at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$start$0(DefaultJiraLauncher.java:101) at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:31) at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:99) at com.atlassian.jira.startup.LauncherContextListener.initSlowStuff(LauncherContextListener.java:149) at java.lang.Thread.run(Thread.java:745) {noformat} h3. Workaround This was fixed by identifying there was a missing icon for the JIRA Service Desk customer portal. the broken icon was identified with the below SQL: {code:SQL} select "ICON_ID", a.* from "AO_54307E_VIEWPORTFORM" vpf left outer join avatar a on a.id = vpf."ICON_ID" where a.id is null; {code} And then fixed by updating the database to point the icon to an existing icon (ie a record in the {{avatar}} table that exists), and then JSD was restarted and the Customer Portal updated.

    Atlassian JIRA | 3 months ago | David Currie [Atlassian]
    java.lang.NullPointerException
  2. 0

    h3. Problem After restoring backup from Cloud, viewing a Service Desk project will be restricted with message {{Snap! You can't view this page You need to be a Service Desk Agent to access this page}}. !settings.PNG|thumbnail! h3. Symptoms * You are restricted from viewing all Service Desk related project administration settings (Request types, Request security, Portal settings etc until Automation) despite you are an Agent and Admin who should be able to do so * In each Service Desk Project Permission Scheme, the *Service Desk Agent* project permission is missing. * Buttons for Queues, Customers, Reports etc are missing from the project navigation bar (left panel) * In {{JIRA Administration > Applications}}, the section for JIRA Service Desk's *Configuration* and *Email requests* is also missing * In {{atlassian-servicedesk.log}} or {{atlassian-jira.log}} while browsing the Service Desk project, error below is seen {code:java} 2016-08-31 19:03:16,901 JiraImportTaskExecutionThread-1 INFO admin 1136x5153x1 yt6xtk 0:0:0:0:0:0:0:1 /secure/admin/XmlRestore.jspa [servicedesk.bootstrap.lifecycle.PluginLifeCycle] Enabling ServiceDesk mail channels... 2016-08-31 19:03:17,169 JiraImportTaskExecutionThread-1 ERROR admin 1136x5153x1 yt6xtk 0:0:0:0:0:0:0:1 /secure/admin/XmlRestore.jspa [atlassian.servicedesk.bootstrap.lifecycle] java.lang.NullPointerException at scala.Predef$.Long2long(Predef.scala:358) at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSetting$.toModel(EmailChannelSetting.scala:30) at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager.com$atlassian$servicedesk$internal$feature$emailchannel$emailplatform$EmailChannelSettingManager$$toSettingModel(EmailChannelSettingManager.scala:124) at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager$$anonfun$getEmailChannelSettings$1.apply(EmailChannelSettingManager.scala:105) at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager$$anonfun$getEmailChannelSettings$1.apply(EmailChannelSettingManager.scala:105) at scala.collection.immutable.List.map(List.scala:273) at com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager.getEmailChannelSettings(EmailChannelSettingManager.scala:105) at com.atlassian.servicedesk.bootstrap.lifecycle.SDMailChannelInitializer.updateSDMailChannels(SDMailChannelInitializer.java:48) at com.atlassian.servicedesk.bootstrap.lifecycle.SDMailChannelInitializer.enableSDMailChannels(SDMailChannelInitializer.java:41) at com.atlassian.servicedesk.bootstrap.lifecycle.PluginLifeCycle.runPluginStartupSideEffectsImpl(PluginLifeCycle.java:201) {code} h3. Steps to Reproduce the Problem # Restore a backup from Cloud into JIRA 7.2.0 and Service Desk 3.2.0. # Navigate to an existing Service Desk project, or create a new Service Desk project. # Click on the Project Settings button and click to view Request types or other Service Desk related project administration settings. h3. Notes * This is also affecting instances that previously restored from Cloud to Server, then upgraded to 3.2.0 ** For example, restored from Cloud to JSD 3.1.9, and then upgraded to 3.2.0 *** It worked fine in JSD 3.1.9 after the restoration, but problem occurs in 3.2.0 after the upgrade   {panel:title=Atlassian Response 13 Sep 2016} Hi Everyone, This issue is the highest in our priority. We are aiming to ship the fix for the problem with the next maintenance releases that we are going to ship soon. Please don't hesitate to comment on the issue or reach me directly at [ialexeyenko@atlassian.com|mailto:ialexeyenko@atlassian.com] if you need clarifications or updates regarding the issue. Thanks, Ignat Alexeyenko JIRA Server Bugmaster.   {panel}    

    Atlassian JIRA | 3 months ago | Michelle Chin [Atlassian]
    java.lang.NullPointerException
  3. 0

    Why does Option.apply throw NPEs for boxed primitives?

    Stack Overflow | 2 years ago | Ian Phillips
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Option[Long] constructor throws a NullPointerException

    Stack Overflow | 1 year ago | akauppi
    java.lang.NullPointerException
  6. 0

    Reads2coverage NPEs on unmapped reads

    GitHub | 1 month ago | fnothaft
    java.lang.NullPointerException

    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 scala.Predef$.Long2long()
    2. Scala
      Predef$.Long2long
      1. scala.Predef$.Long2long(Predef.scala:358)
      1 frame
    3. com.atlassian.servicedesk
      EmailChannelSettingManager$$anonfun$getEmailChannelSettings$1.apply
      1. com.atlassian.servicedesk.internal.feature.customer.request.requesttype.RequestType$.apply(RequestType.scala:73)
      2. com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSetting$.toModel(EmailChannelSetting.scala:28)
      3. com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager.com$atlassian$servicedesk$internal$feature$emailchannel$emailplatform$EmailChannelSettingManager$$toSettingModel(EmailChannelSettingManager.scala:124)
      4. com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager$$anonfun$getEmailChannelSettings$1.apply(EmailChannelSettingManager.scala:105)
      5. com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager$$anonfun$getEmailChannelSettings$1.apply(EmailChannelSettingManager.scala:105)
      5 frames
    4. Scala
      List.map
      1. scala.collection.immutable.List.map(List.scala:273)
      1 frame
    5. com.atlassian.servicedesk
      Launcher$1$1.run
      1. com.atlassian.servicedesk.internal.feature.emailchannel.emailplatform.EmailChannelSettingManager.getEmailChannelSettings(EmailChannelSettingManager.scala:105)
      2. com.atlassian.servicedesk.bootstrap.lifecycle.SDMailChannelInitializer.updateSDMailChannels(SDMailChannelInitializer.java:48)
      3. com.atlassian.servicedesk.bootstrap.lifecycle.SDMailChannelInitializer.enableSDMailChannels(SDMailChannelInitializer.java:41)
      4. com.atlassian.servicedesk.bootstrap.lifecycle.PluginLifeCycle.runPluginStartupSideEffectsImpl(PluginLifeCycle.java:201)
      5. com.atlassian.servicedesk.bootstrap.lifecycle.LifecycleLock.writeImpl(LifecycleLock.java:97)
      6. com.atlassian.servicedesk.bootstrap.lifecycle.LifecycleLock.runOnStartup(LifecycleLock.java:75)
      7. com.atlassian.servicedesk.bootstrap.lifecycle.PluginLifeCycle.onPluginStarted(PluginLifeCycle.java:126)
      8. com.atlassian.servicedesk.bootstrap.lifecycle.Launcher.onStartCompleted(Launcher.java:75)
      9. com.atlassian.servicedesk.bootstrap.lifecycle.Launcher.access$000(Launcher.java:23)
      10. com.atlassian.servicedesk.bootstrap.lifecycle.Launcher$1$1.run(Launcher.java:42)
      10 frames
    6. com.atlassian.pocketknife
      SealedRunner.breakSeal
      1. com.atlassian.pocketknife.api.util.runners.SealedRunner.checkSeals(SealedRunner.java:111)
      2. com.atlassian.pocketknife.api.util.runners.SealedRunner.breakSeal(SealedRunner.java:68)
      2 frames
    7. com.atlassian.servicedesk
      Launcher.onStart
      1. com.atlassian.servicedesk.bootstrap.lifecycle.Launcher.onStart(Launcher.java:68)
      1 frame
    8. com.atlassian.sal
      JiraLifecycleManager.onJiraStart
      1. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$4.consume(DefaultLifecycleManager.java:310)
      2. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$4.consume(DefaultLifecycleManager.java:306)
      3. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyLifecyleAware(DefaultLifecycleManager.java:344)
      4. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyOnStartIfStartedAndEnabled(DefaultLifecycleManager.java:304)
      5. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.access$300(DefaultLifecycleManager.java:50)
      6. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$3.evaluate(DefaultLifecycleManager.java:261)
      7. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$3.evaluate(DefaultLifecycleManager.java:257)
      8. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyLifecycleAwares(DefaultLifecycleManager.java:286)
      9. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyStartableLifecycleAwares(DefaultLifecycleManager.java:255)
      10. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.startIfApplicationSetup(DefaultLifecycleManager.java:241)
      11. com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.start(DefaultLifecycleManager.java:230)
      12. com.atlassian.sal.jira.lifecycle.JiraLifecycleManager.onJiraStart(JiraLifecycleManager.java:64)
      12 frames