You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by de...@geronimo.apache.org on 2004/07/13 04:36:20 UTC

[jira] Commented: (GERONIMO-264) exceptions being swallowed at startup

The following comment has been added to this issue:

     Author: Jeremy Boynes
    Created: Mon, 12 Jul 2004 7:36 PM
       Body:
It shouldn't really be logged in Configuration as whatever started it may be able to handle the cause. Instead I added a print in the top level startup (Daemon) so prevent them getting swallowed - it worked for a problem I had so can you let me know if this works for your case as well.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/GERONIMO-264?page=comments#action_36621

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/GERONIMO-264

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: GERONIMO-264
    Summary: exceptions being swallowed at startup
       Type: Improvement

     Status: Unassigned
   Priority: Minor

    Project: Apache Geronimo
 Components: 
             deployment
   Versions:
             1.0-M2

   Assignee: 
   Reporter: toby cabot

    Created: Mon, 12 Jul 2004 1:06 PM
    Updated: Mon, 12 Jul 2004 7:36 PM
Environment: fedora core 2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)


Description:
some exceptions that are thrown during startup are swallowed and don't show up in the logs.

i'm at the 'monkey and typewriter' stage of the geronimo learning curve so i'm a good randomness injector.  i had a problem where geronimo would try to start up and then go directly to shutdown for no apparent reason.  actually, i think i've had a few:

15:50:17,290 DEBUG [GBeanMBean] geronimo.config:name="skeleton/RA" State changed from stopped to starting
15:50:17,292 DEBUG [Configuration] ClassPath for skeleton/RA resolved to [file:/home/tcabot/try/incubator-geronimo/target/config-store/8/connector/skeleton-ra.jar]
ra test setting configParameter to NewStringValue
15:50:17,737 DEBUG [SpreadManagedConnectionFactory] BaseManagedConnectionFactory()
15:50:17,737 DEBUG [SpreadManagedConnectionFactory] SpreadManagedConnectionFactory()
15:50:18,425 DEBUG [GBeanMBean] geronimo.config:name="skeleton/RA" State changed from starting to failed
15:50:18,426 INFO  [Kernel] Starting kernel shutdown

i'll include a patch that logs the problem in the catch clause in Configuration.doStart().  There might be better places to do this, but as long as it gets done *somewhere* i'm happy.

regards,
toby



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (GERONIMO-264) exceptions being swallowed at startup

Posted by toby cabot <to...@caboteria.org>.
Hi Jeremy,

On Mon, Jul 12, 2004 at 07:36:20PM -0700, dev@geronimo.apache.org wrote:
>      Author: Jeremy Boynes
>     Created: Mon, 12 Jul 2004 7:36 PM
>        Body:
> It shouldn't really be logged in Configuration as whatever started it may be able to handle the cause. Instead I added a print in the top level startup (Daemon) so prevent them getting swallowed - it worked for a problem I had so can you let me know if this works for your case as well.

Jira appears to be down at the moment, I'll add a comment in the
morning, but in the mean time...

Thanks for looking at this.  The stack trace I was getting does get
printed to the console, but chronologically out of order (i.e. it's
after the shutdown process).  Would it be more clear to print the
stack trace before starting the shutdown process, ie

            } catch (Exception e) {
                e.printStackTrace();
                try {
                    kernel.shutdown();
                } catch (Exception e1) {
                    e1.printStackTrace();
                }
                System.exit(3);
                throw new AssertionError();
            }

Then the output on the screen would appear in the order in which
things happen.  Don't know about others but I tend to focus on the
first unexpected event in the logs, and in my case there were stack
traces from the shutdown that appeared before the root cause.

Also, it looks like Daemon.java doesn't use logging at all so
printStackTrace() is better than nothing but it would be cool if the
stack trace made it to the logs.

Thanks,
Toby