java.lang.NullPointerException

Pentaho BI Platform Tracking | Jens Bleuel | 9 years ago
  1. 0

    We catched almost all exceptions and inform the user in the right way. Thus we developers can track the issue down (mostly and correct it). There are special circumstances where the user is not informed and the exception is silently written to a log, often the user does not know how to find the reason for this special error. I have one example for this one: ERROR 21-11 20:43:49,816 (LogWriter.java:println:400) -Spoon - java.lang.NullPointerException at org.pentaho.di.trans.steps.databaselookup.DatabaseLookupMeta.getFields(DatabaseLookupMeta.java:489) at org.pentaho.di.trans.TransMeta.getThisStepFields(TransMeta.java:1704) at org.pentaho.di.trans.TransMeta.getStepFields(TransMeta.java:1559) at org.pentaho.di.trans.TransMeta.getStepFields(TransMeta.java:1493) at org.pentaho.di.trans.TransMeta.checkRowMixingStatically(TransMeta.java:5600) at org.pentaho.di.ui.spoon.Spoon.performNewTransHopChecks(Spoon.java:2633) at org.pentaho.di.ui.spoon.Spoon.newHop(Spoon.java:2569) at org.pentaho.di.ui.spoon.trans.TransGraph$4.mouseUp(TransGraph.java:429) at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source) at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source) at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source) at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:845) at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:5573) at org.pentaho.di.ui.spoon.Spoon.run(Spoon.java:5652) at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:375) INFO 21-11 20:43:50,022 (LogWriter.java:println:403) -Spoon - Spoon has ended. --> Well the reason for this is in an uncatched exception in a listener and another problem (will be treated in another Jira). We could add this exception handling there. But at another time we invent some new things and someone forget to add another exception handling. Spoon just dies and the user is mostly helpless and gets no message displayed. My proposal is to inform the user and show the ErrorDialog in method start after the two log entries: catch(Throwable e) { log.logError(toString(), Messages.getString("Spoon.Log.UnexpectedErrorOccurred")+Const.CR+e.getMessage());/ log.logError(toString(), Const.getStackTracker(e)); new ErrorDialog(shell, Messages.getString("Spoon.Log.UnexpectedErrorOccurred"), Messages.getString("Spoon.Log.UnexpectedErrorOccurred")+Const.CR+e.getMessage(), e); } There could be reasons when a normal shut down of the program could lead to an exception - but in my tests I got none of these. Any votes?

    Pentaho BI Platform Tracking | 9 years ago | Jens Bleuel
    java.lang.NullPointerException
  2. 0

    We catched almost all exceptions and inform the user in the right way. Thus we developers can track the issue down (mostly and correct it). There are special circumstances where the user is not informed and the exception is silently written to a log, often the user does not know how to find the reason for this special error. I have one example for this one: ERROR 21-11 20:43:49,816 (LogWriter.java:println:400) -Spoon - java.lang.NullPointerException at org.pentaho.di.trans.steps.databaselookup.DatabaseLookupMeta.getFields(DatabaseLookupMeta.java:489) at org.pentaho.di.trans.TransMeta.getThisStepFields(TransMeta.java:1704) at org.pentaho.di.trans.TransMeta.getStepFields(TransMeta.java:1559) at org.pentaho.di.trans.TransMeta.getStepFields(TransMeta.java:1493) at org.pentaho.di.trans.TransMeta.checkRowMixingStatically(TransMeta.java:5600) at org.pentaho.di.ui.spoon.Spoon.performNewTransHopChecks(Spoon.java:2633) at org.pentaho.di.ui.spoon.Spoon.newHop(Spoon.java:2569) at org.pentaho.di.ui.spoon.trans.TransGraph$4.mouseUp(TransGraph.java:429) at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source) at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source) at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source) at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:845) at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:5573) at org.pentaho.di.ui.spoon.Spoon.run(Spoon.java:5652) at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:375) INFO 21-11 20:43:50,022 (LogWriter.java:println:403) -Spoon - Spoon has ended. --> Well the reason for this is in an uncatched exception in a listener and another problem (will be treated in another Jira). We could add this exception handling there. But at another time we invent some new things and someone forget to add another exception handling. Spoon just dies and the user is mostly helpless and gets no message displayed. My proposal is to inform the user and show the ErrorDialog in method start after the two log entries: catch(Throwable e) { log.logError(toString(), Messages.getString("Spoon.Log.UnexpectedErrorOccurred")+Const.CR+e.getMessage());/ log.logError(toString(), Const.getStackTracker(e)); new ErrorDialog(shell, Messages.getString("Spoon.Log.UnexpectedErrorOccurred"), Messages.getString("Spoon.Log.UnexpectedErrorOccurred")+Const.CR+e.getMessage(), e); } There could be reasons when a normal shut down of the program could lead to an exception - but in my tests I got none of these. Any votes?

    Pentaho BI Platform Tracking | 9 years ago | Jens Bleuel
    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.pentaho.di.trans.steps.databaselookup.DatabaseLookupMeta.getFields()
    2. org.pentaho.di
      TransGraph$4.mouseUp
      1. org.pentaho.di.trans.steps.databaselookup.DatabaseLookupMeta.getFields(DatabaseLookupMeta.java:489)
      2. org.pentaho.di.trans.TransMeta.getThisStepFields(TransMeta.java:1704)
      3. org.pentaho.di.trans.TransMeta.getStepFields(TransMeta.java:1559)
      4. org.pentaho.di.trans.TransMeta.getStepFields(TransMeta.java:1493)
      5. org.pentaho.di.trans.TransMeta.checkRowMixingStatically(TransMeta.java:5600)
      6. org.pentaho.di.ui.spoon.Spoon.performNewTransHopChecks(Spoon.java:2633)
      7. org.pentaho.di.ui.spoon.Spoon.newHop(Spoon.java:2569)
      8. org.pentaho.di.ui.spoon.trans.TransGraph$4.mouseUp(TransGraph.java:429)
      8 frames
    3. RWT
      Display.readAndDispatch
      1. org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
      2. org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
      3. org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
      4. org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
      5. org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
      5 frames
    4. org.pentaho.di
      Spoon.main
      1. org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:845)
      2. org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:5573)
      3. org.pentaho.di.ui.spoon.Spoon.run(Spoon.java:5652)
      4. org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:375)
      4 frames