You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Antony Scerri (JIRA)" <ji...@apache.org> on 2010/06/25 22:07:54 UTC

[jira] Created: (DAEMON-165) Uncaught exceptions in main methods are being obscured

Uncaught exceptions in main methods are being obscured
------------------------------------------------------

                 Key: DAEMON-165
                 URL: https://issues.apache.org/jira/browse/DAEMON-165
             Project: Commons Daemon
          Issue Type: Bug
          Components: Procrun
    Affects Versions: 1.0.2
         Environment: Procrun running on windows with any java release
            Reporter: Antony Scerri


Inside the__apxJavaWorkerThread method in javajni.c the following line just after the call to execute the main method:

    JVM_EXCEPTION_CLEAR(lpJava);

is making any uncaught exception in the main method simply disappear. This can make diagnoising startup and/or shutdown issues in applications over which you have no direct control (ie third party apps for which you dont have sourcecode). I had this where a classpath error was causing some issues and later some other exceptions, all were completely hidden until I removed this line.

Two solutions I believe are possible.

1) Simply remove this line, the VM will then handle the exception by outputting it to standard error in which case it will appear in the service stderr log file.

2) Check for and then obtain any exception and log appropriately

The second would give greater control to procrun and be more prominant in the main log rather than the stderr logs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DAEMON-165) Uncaught exceptions in main methods are being obscured

Posted by "Mladen Turk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DAEMON-165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mladen Turk resolved DAEMON-165.
--------------------------------

    Fix Version/s: 1.0.3
       Resolution: Fixed

Fixed in the SVN. Will be part of 1.0.4

> Uncaught exceptions in main methods are being obscured
> ------------------------------------------------------
>
>                 Key: DAEMON-165
>                 URL: https://issues.apache.org/jira/browse/DAEMON-165
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.2
>         Environment: Procrun running on windows with any java release
>            Reporter: Antony Scerri
>             Fix For: 1.0.3
>
>
> Inside the__apxJavaWorkerThread method in javajni.c the following line just after the call to execute the main method:
>     JVM_EXCEPTION_CLEAR(lpJava);
> is making any uncaught exception in the main method simply disappear. This can make diagnoising startup and/or shutdown issues in applications over which you have no direct control (ie third party apps for which you dont have sourcecode). I had this where a classpath error was causing some issues and later some other exceptions, all were completely hidden until I removed this line.
> Two solutions I believe are possible.
> 1) Simply remove this line, the VM will then handle the exception by outputting it to standard error in which case it will appear in the service stderr log file.
> 2) Check for and then obtain any exception and log appropriately
> The second would give greater control to procrun and be more prominant in the main log rather than the stderr logs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DAEMON-165) Uncaught exceptions in main methods are being obscured

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DAEMON-165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated DAEMON-165:
------------------------

        Fix Version/s: 1.0.4
                           (was: 1.0.3)
    Affects Version/s: 1.0.3

> Uncaught exceptions in main methods are being obscured
> ------------------------------------------------------
>
>                 Key: DAEMON-165
>                 URL: https://issues.apache.org/jira/browse/DAEMON-165
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.2, 1.0.3
>         Environment: Procrun running on windows with any java release
>            Reporter: Antony Scerri
>             Fix For: 1.0.4
>
>
> Inside the__apxJavaWorkerThread method in javajni.c the following line just after the call to execute the main method:
>     JVM_EXCEPTION_CLEAR(lpJava);
> is making any uncaught exception in the main method simply disappear. This can make diagnoising startup and/or shutdown issues in applications over which you have no direct control (ie third party apps for which you dont have sourcecode). I had this where a classpath error was causing some issues and later some other exceptions, all were completely hidden until I removed this line.
> Two solutions I believe are possible.
> 1) Simply remove this line, the VM will then handle the exception by outputting it to standard error in which case it will appear in the service stderr log file.
> 2) Check for and then obtain any exception and log appropriately
> The second would give greater control to procrun and be more prominant in the main log rather than the stderr logs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.