Exception in thread "main" java.lang.NullPointerException
at com.jbooktrader.platform.util.MessageDialog.showEx ception(MessageDialog.java:23)
at com.jbooktrader.platform.startup.JBookTrader.main( JBookTrader.java:62)
A NullPointerException occurs when you use a variable or expression as if it had a non null value (eg call a method on it) when it is really null.
The stack trace is saying that this happens on line 23 of MessageDialog.java, and what you have to do is find the variable or expression that is null. Guessing that problem occurs in the showException() method (I could be wrong) you would use System.out.println() to examine the values of variables and expressions you are "dereferencing" with method calls:
public static void showException(Throwable t) {
System.out.println("At showException t=" + t);
showError(t.getMessage());
System.out.println("Dispatcher instance is " + Dispatcher.getInstance());
System.out.println("Event report is " + Dispatcher.getInstance().getEventReport());
Dispatcher.getInstance().getEventReport().report(t);
}
Once you have found out which thing is null you need to go back through your code to where you thought you had given it a non null value and figure out why that didn't happen.
---
If I'm wrong in my guess, say which line 23 really is. But the approach remains the same: use System.out.println() to examine
everything that might possibly be null, then go back through your code to see how come it ended up null.