Details
Description
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.