java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • This NPE is caused by a element-lookup that failed. The UndoEntry stores element-ids only, and if another action removes a element without adding a corresponding undo-entry, the state of the Undo system becomes invalid. Task: Find the action that caused the rouge element removal, and you'll no longer see the bug. Task(2): Change the code of the MassElementStyleUndoEntry to give a cleaner error message. Do not simply ignore this error condition, by checking for null and ignoring the invalid id afterwards, as this will not fix the deep cause of the bug. java.lang.NullPointerException at org.pentaho.reporting.designer.core.util.undo.MassElementStyleUndoEntry.undo(MassElementStyleUndoEntry.java:46) at org.pentaho.reporting.designer.core.util.undo.UndoManager.undo(UndoManager.java:144) at org.pentaho.reporting.designer.core.actions.report.UndoAction.actionPerformed(UndoAction.java:71) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.AbstractButton.doClick(AbstractButton.java:334) at javax.swing.AbstractButton.doClick(AbstractButton.java:282) at javax.swing.plaf.basic.BasicMenuItemUI$Actions.actionPerformed(BasicMenuItemUI.java:1020) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1576) at javax.swing.JComponent.processKeyBinding(JComponent.java:2772) at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:656) at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:664) at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:664) at javax.swing.JMenuBar.processKeyBinding(JMenuBar.java:640) at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:255) at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:242) at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2849) at javax.swing.JComponent.processKeyBindings(JComponent.java:2841) at javax.swing.JComponent.processKeyEvent(JComponent.java:2735) at java.awt.Component.processEvent(Component.java:5379) at java.awt.Container.processEvent(Container.java:2010) at java.awt.Component.dispatchEventImpl(Component.java:4068) at java.awt.Container.dispatchEventImpl(Container.java:2068) at java.awt.Component.dispatchEvent(Component.java:3903) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1826) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:681) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:938) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:810) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:645) at java.awt.Component.dispatchEventImpl(Component.java:3941) at java.awt.Container.dispatchEventImpl(Container.java:2068) at java.awt.Window.dispatchEventImpl(Window.java:1801) at java.awt.Component.dispatchEvent(Component.java:3903) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    via by Thomas Morgner,
  • This NPE is caused by a element-lookup that failed. The UndoEntry stores element-ids only, and if another action removes a element without adding a corresponding undo-entry, the state of the Undo system becomes invalid. Task: Find the action that caused the rouge element removal, and you'll no longer see the bug. Task(2): Change the code of the MassElementStyleUndoEntry to give a cleaner error message. Do not simply ignore this error condition, by checking for null and ignoring the invalid id afterwards, as this will not fix the deep cause of the bug. java.lang.NullPointerException at org.pentaho.reporting.designer.core.util.undo.MassElementStyleUndoEntry.undo(MassElementStyleUndoEntry.java:46) at org.pentaho.reporting.designer.core.util.undo.UndoManager.undo(UndoManager.java:144) at org.pentaho.reporting.designer.core.actions.report.UndoAction.actionPerformed(UndoAction.java:71) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.AbstractButton.doClick(AbstractButton.java:334) at javax.swing.AbstractButton.doClick(AbstractButton.java:282) at javax.swing.plaf.basic.BasicMenuItemUI$Actions.actionPerformed(BasicMenuItemUI.java:1020) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1576) at javax.swing.JComponent.processKeyBinding(JComponent.java:2772) at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:656) at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:664) at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:664) at javax.swing.JMenuBar.processKeyBinding(JMenuBar.java:640) at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:255) at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:242) at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2849) at javax.swing.JComponent.processKeyBindings(JComponent.java:2841) at javax.swing.JComponent.processKeyEvent(JComponent.java:2735) at java.awt.Component.processEvent(Component.java:5379) at java.awt.Container.processEvent(Container.java:2010) at java.awt.Component.dispatchEventImpl(Component.java:4068) at java.awt.Container.dispatchEventImpl(Container.java:2068) at java.awt.Component.dispatchEvent(Component.java:3903) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1826) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:681) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:938) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:810) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:645) at java.awt.Component.dispatchEventImpl(Component.java:3941) at java.awt.Container.dispatchEventImpl(Container.java:2068) at java.awt.Window.dispatchEventImpl(Window.java:1801) at java.awt.Component.dispatchEvent(Component.java:3903) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    via by Thomas Morgner,
    • java.lang.NullPointerException at org.pentaho.reporting.designer.core.util.undo.MassElementStyleUndoEntry.undo(MassElementStyleUndoEntry.java:46) at org.pentaho.reporting.designer.core.util.undo.UndoManager.undo(UndoManager.java:144) at org.pentaho.reporting.designer.core.actions.report.UndoAction.actionPerformed(UndoAction.java:71) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.AbstractButton.doClick(AbstractButton.java:334) at javax.swing.AbstractButton.doClick(AbstractButton.java:282) at javax.swing.plaf.basic.BasicMenuItemUI$Actions.actionPerformed(BasicMenuItemUI.java:1020) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1576) at javax.swing.JComponent.processKeyBinding(JComponent.java:2772) at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:656) at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:664) at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:664) at javax.swing.JMenuBar.processKeyBinding(JMenuBar.java:640) at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:255) at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:242) at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2849) at javax.swing.JComponent.processKeyBindings(JComponent.java:2841) at javax.swing.JComponent.processKeyEvent(JComponent.java:2735) at java.awt.Component.processEvent(Component.java:5379) at java.awt.Container.processEvent(Container.java:2010) at java.awt.Component.dispatchEventImpl(Component.java:4068) at java.awt.Container.dispatchEventImpl(Container.java:2068) at java.awt.Component.dispatchEvent(Component.java:3903) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1826) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:681) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:938) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:810) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:645) at java.awt.Component.dispatchEventImpl(Component.java:3941) at java.awt.Container.dispatchEventImpl(Container.java:2068) at java.awt.Window.dispatchEventImpl(Window.java:1801) at java.awt.Component.dispatchEvent(Component.java:3903) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    No Bugmate found.