This content has been marked as final. Show 4 replies
Does getDataSource() of a non-initialized instance really work? Does it return null by any chance? Or throw an exception?
I found a bug in my own code. I can't believe I missed it :(
It returned null. Anyways I found the problem and it has nothing to do with the listener. I had a bug in my code.
I would have expected you to find stuff in your log then. I wonder if:
this is actually useful; I'm assuming you're passing null for the log message here, I wonder if the logger will actually do something with a null message. Make it a habit of just logging "SomethingOrAnother didn't work so well!" when you only want to log a caught exception, just in case.
Logger.getLogger(DatabaseInit.class.getName()).log(Level.SEVERE, null, ex);
(btw: use \
tags to post code or anything else that you want to have formatted neatly)