I have a ServletContextListener that is creating an object in the contextInitialized() method. I know that an exception is being thrown in the creation of the object. However, it is encased in a try-catch block.
I then gave it a public string, called debug, and appended info to it as it was being initialized. Upon trying to retrieve that String from the object in the catch block after the exception was thrown, the server will not initialize. That doesn't suprise me given that the object was not fully initialized itself and I'm trying to use it. I then put the line of code that tries to retrieve the debug String in its own try-catch block to see what exception that would return. However, the code does not work and the application never starts up.
So I guess my main question is, how could it not be starting when everything is in try-catch blocks?
I just found out what the problem was. Though, I'm not yet sure what caused the problem. Apparently a jar file being used by the listener was not being updated when I was replacing it. Thus, the call to the new debug String I added was not allowing it to compile correctly.
Something seemed a little fishy so I thought I would ask, but it is working now. Thanks for the help.