Announcement Announcement Module
Collapse
No announcement yet.
Exceptions disappear in ApplicationLauncher Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exceptions disappear in ApplicationLauncher

    Hi,

    I discovered some strange behavior at startup of my application. After the splash screen became visible it suddenly disappeared and I did not see any exception.

    I discovered that the following piece of code was responsible for hiding any exceptions:

    Code:
        public ApplicationLauncher(String startupContextPath, String[] rootContextConfigLocations) {
            .....
            .....
            try {
                setRootApplicationContext(loadRootApplicationContext(rootContextConfigLocations, startupContext));
                launchMyRichClient();
            }
            finally {
                destroySplashScreen();
            }
        }
    I think this code is very wrong, because any exceptions in the try block would just be swallowed without showing an exception in your console or log file, so I added a catch block, like this:

    Code:
        public ApplicationLauncher(String startupContextPath, String[] rootContextConfigLocations) {
            .....
            .....
            try {
                setRootApplicationContext(loadRootApplicationContext(rootContextConfigLocations, startupContext));
                launchMyRichClient();
            }
            catch (Exception e) {
                logger.error("Application launcher", e);
            }
            finally {
                destroySplashScreen();
            }
        }
    After that I discovered I had some exceptions in my spring xml configuration.

    Maybe a good idea if any of the contributors/submitters would change this in SVN?
    I added it therefor in JIRA...

    Thanks in advance,

    Theo.
    Last edited by gulcher; Jul 26th, 2007, 08:51 AM. Reason: JIRA link
Working...
X