java.lang.NullPointerException

Appcelerator JIRA | Michael Xia | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    When the Titanium Studio > Titanium preference page is opened on Linux, the following exception is generated in the log: {code} !ENTRY com.appcelerator.titanium.ui.ide 4 0 2012-09-04 13:01:14.789 !MESSAGE (Build 2.1.2.201208301612) [ERROR] Failed to load BlackBerry device password !STACK 0 java.lang.NullPointerException at com.appcelerator.titanium.ui.preferences.TitaniumPreferencePage.initialize(TitaniumPreferencePage.java:153) at org.eclipse.jface.preference.FieldEditorPreferencePage.createContents(FieldEditorPreferencePage.java:233) at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:232) at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1501) at org.eclipse.jface.preference.PreferenceDialog$14.run(PreferenceDialog.java:1258) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1252) at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:674) at org.eclipse.jface.preference.PreferenceDialog$10.run(PreferenceDialog.java:708) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:704) at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:888) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:886) at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1726) at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1139) at org.eclipse.jface.preference.PreferenceDialog.selectSavedItem(PreferenceDialog.java:1054) at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.selectSavedItem(FilteredPreferenceDialog.java:729) at org.eclipse.jface.preference.PreferenceDialog$4.run(PreferenceDialog.java:375) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.preference.PreferenceDialog.createContents(PreferenceDialog.java:371) at org.eclipse.jface.window.Window.create(Window.java:431) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089) at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.createDialogOn(WorkbenchPreferenceDialog.java:102) at org.eclipse.ui.dialogs.PreferencesUtil.createPreferenceDialogOn(PreferencesUtil.java:192) at org.eclipse.ui.dialogs.PreferencesUtil.createPreferenceDialogOn(PreferencesUtil.java:116) at com.appcelerator.titanium.ui.ide.tiappEditor.TiAppDeployTargetsSection$2.linkActivated(TiAppDeployTargetsSection.java:278) at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:233) at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(AbstractHyperlink.java:327) at org.eclipse.ui.forms.widgets.AbstractHyperlink.access$2(AbstractHyperlink.java:311) at org.eclipse.ui.forms.widgets.AbstractHyperlink$4.handleEvent(AbstractHyperlink.java:125) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at com.appcelerator.titanium.rcp.IDEApplication.start(IDEApplication.java:125) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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:616) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410) {code} This is because we are only creating BlackBerry fields on Mac and Windows. Think we should instead always create the fields but then hide them using GridData.exclude according to the OS; that way we don't have to check if a field is null all over the place.

    Appcelerator JIRA | 5 years ago | Michael Xia
    java.lang.NullPointerException
  2. 0

    When the Titanium Studio > Titanium preference page is opened on Linux, the following exception is generated in the log: {code} !ENTRY com.appcelerator.titanium.ui.ide 4 0 2012-09-04 13:01:14.789 !MESSAGE (Build 2.1.2.201208301612) [ERROR] Failed to load BlackBerry device password !STACK 0 java.lang.NullPointerException at com.appcelerator.titanium.ui.preferences.TitaniumPreferencePage.initialize(TitaniumPreferencePage.java:153) at org.eclipse.jface.preference.FieldEditorPreferencePage.createContents(FieldEditorPreferencePage.java:233) at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:232) at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1501) at org.eclipse.jface.preference.PreferenceDialog$14.run(PreferenceDialog.java:1258) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1252) at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:674) at org.eclipse.jface.preference.PreferenceDialog$10.run(PreferenceDialog.java:708) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:704) at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:888) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:886) at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1726) at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1139) at org.eclipse.jface.preference.PreferenceDialog.selectSavedItem(PreferenceDialog.java:1054) at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.selectSavedItem(FilteredPreferenceDialog.java:729) at org.eclipse.jface.preference.PreferenceDialog$4.run(PreferenceDialog.java:375) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.preference.PreferenceDialog.createContents(PreferenceDialog.java:371) at org.eclipse.jface.window.Window.create(Window.java:431) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089) at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.createDialogOn(WorkbenchPreferenceDialog.java:102) at org.eclipse.ui.dialogs.PreferencesUtil.createPreferenceDialogOn(PreferencesUtil.java:192) at org.eclipse.ui.dialogs.PreferencesUtil.createPreferenceDialogOn(PreferencesUtil.java:116) at com.appcelerator.titanium.ui.ide.tiappEditor.TiAppDeployTargetsSection$2.linkActivated(TiAppDeployTargetsSection.java:278) at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:233) at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(AbstractHyperlink.java:327) at org.eclipse.ui.forms.widgets.AbstractHyperlink.access$2(AbstractHyperlink.java:311) at org.eclipse.ui.forms.widgets.AbstractHyperlink$4.handleEvent(AbstractHyperlink.java:125) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at com.appcelerator.titanium.rcp.IDEApplication.start(IDEApplication.java:125) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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:616) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410) {code} This is because we are only creating BlackBerry fields on Mac and Windows. Think we should instead always create the fields but then hide them using GridData.exclude according to the OS; that way we don't have to check if a field is null all over the place.

    Appcelerator JIRA | 5 years ago | Michael Xia
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.appcelerator.titanium.ui.preferences.TitaniumPreferencePage.initialize()
    2. com.appcelerator.titanium
      TitaniumPreferencePage.initialize
      1. com.appcelerator.titanium.ui.preferences.TitaniumPreferencePage.initialize(TitaniumPreferencePage.java:153)
      1 frame
    3. JFace
      PreferenceDialog$14.run
      1. org.eclipse.jface.preference.FieldEditorPreferencePage.createContents(FieldEditorPreferencePage.java:233)
      2. org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:232)
      3. org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1501)
      4. org.eclipse.jface.preference.PreferenceDialog$14.run(PreferenceDialog.java:1258)
      4 frames
    4. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    5. Eclipse UI
      JFaceUtil$1.run
      1. org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
      1 frame
    6. JFace
      PreferenceDialog.showPage
      1. org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
      2. org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1252)
      2 frames
    7. Workbench
      FilteredPreferenceDialog.showPage
      1. org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:674)
      1 frame
    8. JFace
      PreferenceDialog$10.run
      1. org.eclipse.jface.preference.PreferenceDialog$10.run(PreferenceDialog.java:708)
      1 frame
    9. RWT
      BusyIndicator.showWhile
      1. org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
      1 frame
    10. JFace
      StructuredViewer$3.run
      1. org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:704)
      2. org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:888)
      2 frames
    11. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    12. Eclipse UI
      JFaceUtil$1.run
      1. org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
      1 frame
    13. JFace
      PreferenceDialog.selectSavedItem
      1. org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
      2. org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:886)
      3. org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1726)
      4. org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1139)
      5. org.eclipse.jface.preference.PreferenceDialog.selectSavedItem(PreferenceDialog.java:1054)
      5 frames
    14. Workbench
      FilteredPreferenceDialog.selectSavedItem
      1. org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.selectSavedItem(FilteredPreferenceDialog.java:729)
      1 frame
    15. JFace
      PreferenceDialog$4.run
      1. org.eclipse.jface.preference.PreferenceDialog$4.run(PreferenceDialog.java:375)
      1 frame
    16. RWT
      BusyIndicator.showWhile
      1. org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
      1 frame
    17. JFace
      Dialog.create
      1. org.eclipse.jface.preference.PreferenceDialog.createContents(PreferenceDialog.java:371)
      2. org.eclipse.jface.window.Window.create(Window.java:431)
      3. org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
      3 frames
    18. Workbench
      WorkbenchPreferenceDialog.createDialogOn
      1. org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.createDialogOn(WorkbenchPreferenceDialog.java:102)
      1 frame
    19. Eclipse UI
      PreferencesUtil.createPreferenceDialogOn
      1. org.eclipse.ui.dialogs.PreferencesUtil.createPreferenceDialogOn(PreferencesUtil.java:192)
      2. org.eclipse.ui.dialogs.PreferencesUtil.createPreferenceDialogOn(PreferencesUtil.java:116)
      2 frames
    20. com.appcelerator.titanium
      TiAppDeployTargetsSection$2.linkActivated
      1. com.appcelerator.titanium.ui.ide.tiappEditor.TiAppDeployTargetsSection$2.linkActivated(TiAppDeployTargetsSection.java:278)
      1 frame
    21. Eclipse Forms
      AbstractHyperlink$4.handleEvent
      1. org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:233)
      2. org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(AbstractHyperlink.java:327)
      3. org.eclipse.ui.forms.widgets.AbstractHyperlink.access$2(AbstractHyperlink.java:311)
      4. org.eclipse.ui.forms.widgets.AbstractHyperlink$4.handleEvent(AbstractHyperlink.java:125)
      4 frames
    22. RWT
      Display.readAndDispatch
      1. org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      2. org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
      3. org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
      4. org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
      4 frames
    23. Eclipse UI
      Workbench$7.run
      1. org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
      2. org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
      3. org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
      4. org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
      4 frames
    24. Databinding
      Realm.runWithDefault
      1. org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      1 frame
    25. Eclipse UI
      Workbench.createAndRunWorkbench
      1. org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
      1 frame
    26. Eclipse UI
      PlatformUI.createAndRunWorkbench
      1. org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      1 frame
    27. com.appcelerator.titanium
      IDEApplication.start
      1. com.appcelerator.titanium.rcp.IDEApplication.start(IDEApplication.java:125)
      1 frame
    28. Equinox Container
      EclipseAppHandle.run
      1. org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      1 frame
    29. Eclipse OSGi
      EclipseStarter.run
      1. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      2. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      3. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
      4. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
      4 frames
    30. 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:616)
      4 frames
    31. Equinox
      Main.run
      1. org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
      2. org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
      3. org.eclipse.equinox.launcher.Main.run(Main.java:1410)
      3 frames