Stack traces mysteriously disappear from Exceptions

I'm using Sun Java System Application Server Platform Edition 8.0.0_01 on Solaris 8 on a Sun-Fire machine. The problem is that some exceptions thrown in session beans make it to the presentation tier without their stack traces.
Here is a session bean method:
* @ejb.interface-method
public void generateException() throws SbankInternalException
try { System.exit(0); }
catch (Exception e) {
throw new SbankInternalException("Unexpected exception", e);
SbankInternalException is a simple wrapper on Exception:
public class SbankInternalException
extends Exception
public SbankInternalException() {}
public SbankInternalException(String message)
super(message);
public SbankInternalException(String message, Throwable cause)
super(message, cause);
public SbankInternalException(Throwable cause)
super(cause);
Here is the code that triggers the problem:
<h3>Exception testing:</h3>
<%
try {
maintenanceServices.generateException();
} catch (Exception E) {
Throwable e = (Throwable) E;
%>
<h3>Caught exception <%=E%></h3>
<pre>
<%
do {
%>CLASS: <%=e.getClass().getName()%>
MESSAGE: <%=e.getMessage()%><br><%
StackTraceElement se[] = e.getStackTrace();
if (se.length == 0) {
%> EMPTY STACK TRACE<br><br><%
} else {
for (int i = 0; i < se.length; i++) {
%> <%=se.toString()%><br><%
%> <br><br><%
e = e.getCause();
} while (e != null);
%>
</pre>
And here is what I get:
<h3>Exception testing:</h3>
     <h3>Caught exception sbank.services.SbankInternalException: Unexpected exception</h3>
     <pre>
CLASS: sbank.services.SbankInternalException
MESSAGE: Unexpected exception<br>
EMPTY STACK TRACE<br><br>
CLASS: java.security.AccessControlException
MESSAGE: access denied (java.lang.RuntimePermission exitVM)<br>
EMPTY STACK TRACE<br><br>
     </pre>
Server log does not contain any message about that.
This only seems to be the problem for exceptions declared in bean interface. When a RuntimeException is thrown in the bean, then it is properly logged to the server log (with strack trace), and I catch a nice RemoteException in the presentation layer, as expected (also with stack trace, though the top frame is somewhere in the demarshalling code of application server guts, so it's not very useful).
Is it my error, or a bug?
regards
Marcin

I'm not complaining that the exceptions declared to be thrown from session bean interface are not logged. AFAIR that is OK with the EJB spec.
I'm complaining that the stack traces are stripped from the exception on its way from the session bean to the client (presentation layer in this case).
I know that I could log the error in the session bean, that is just a workaround. I still would like to know why my exceptions are being broken? After all the whole point of exceptions is that they can be generated in one place, and investigated/displayed in another.
The only explanation I can think of that there is some silly optimization, that omits stack frames when serializing the exceptions, so that they propagate faster. If it is so, can I disable that?
Marcin

Similar Messages

  • Navionics app mysteriously disappeared from my iPhone

    I purchased Navionics and downloaded on my PC and sync'd across to my iPhone3. After a couple of months it mysteriously disappeared from my iPhone and would not sync back from laptop. I have since purchased another laptop and, in desperation REpurchased another copy of Navionics. It is sitting in  iTunes along with all the other (free) apps I have downloaded, but will not sync over. Also the "Sync" command only seems to be syncing 1 thing and is not updating bookmarks etc. What's going on?  Any suggestions appreciated!

    Sorry cannot help. I have Navionics on ipad2 purchased using my new iTunes account, but now I cannot update it because whenever I press update button, a pop-up of old account will appear and prevent me from updating. It is really annoying and disappointing.

  • My Notes mysteriously disappeared from my iPhone

    My notes mysteriously disappeared from my iPhone 4S - where did they go?
    I have not synced.  But if I did, where would they be on my computer?

    Try going into Notes, then tap Accounts at the top left, and then tap All Notes. You can also try going into all of your email account settings and make sure Notes are switched on for all (green side showing).

  • HT204266 my facetime app has mysteriously disappeared from my iphone screen I did not remove it can someone let me know is this common and can I still use facetime?

    My facetime app has disappeared from my iphone screen.  I did not do anything for it to disappear so what happened?

    On the iPhone there is no FaceTime app or icon for it.
    FaceTime is integrated into iOS.
    You access it through contacts.

  • I had about 20 Notes mysteriously disappear from my iPhone 5.

    I recently had most of my notes mysteriously disappear.  The only notes that remain on my phone are over 3 years old.  Trust me, I did not delete them. I have tried recovery software with no luck. A couple of the notes were business related and were my auto mileage records. Is there any way to recover the lost notes?

    Are you syncing with Outlook, iCloud, Yahoo, Gmail, etc. If so, which one.

  • Display of stack trace of uncaught exception

    Hello,
    on the mini SAP Web AS 6.40 SP11 that I have installed on my local Windows system, the server provides stack trace information for uncaught exceptions. First, a screen is shown saying that the request could not be processed and that the Administrator should be contacted. After pressing on a link "Get Details ...", the stack trace of the error is displayed. Everything is fine, so far.
    On the contrary, when I run on a server SAP Web AS SP12 on a UNIX system (SPARC, Sun OS 5.9), only the screen saying that the request could not be processed is shown, but no "Get Details ..." link appears.
    Does anybody know what I need to do to enable the display of detailed stack traces also on the Unix machine?
    Any help is appreciated!
    Regards, Nick.

    Is the flow of code to the point where exception occurs:
    1) Data saved in Db
    2) Navigated back
    3)Navigated to another page
    4) Method ListMenu() is called(as soon as navigated to page in step 3) to retrieve the saved data from db & exception occurs.
    Can you paste here the definition of ListMenu(), also does the exception occurs as soon as db is accessed inside this method or else.
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

  • CORBA properties, turning off stack trace on exception

    Is there a property when using the Sun ORB that will turn off the stack trace when a system exception occurs. I am already handling the system exceptions, so I really don't need the call stack from a 201 error.
    Thanks!
    evic

    Thank you for the clarification, Rob. I'll file an enhancement request
    right away.
    Christophe
    Rob Woollen wrote:
    WLS will log all transaction rollbacks. You'll have to file an enhancement
    request with [email protected] if you want to supress that behavior.
    -- Rob
    Christophe Warland wrote:
    A part of our architecture is based on rollbacks in an entity bean
    (RequiresNew) that we control from a stateless sessionbean
    (NotSupported). Everything works great, including the recovery mechanism
    inside the stateless sessionbean. We are very happy with that.
    However, WebLogic prints out an Exception stack trace everytime a
    rollback occurs, eventough our code in the SLSB is managing rollback and
    recovery by catching the RemoteException thrown by the container.
    So, how do I turn off that StackTrace without introducing transaction
    semantics inside my SLSB?
    Thanks,
    Christophe

  • Exception Handling and Stack Traces in JDK 1.1.8

    Hi,
    I'm presently maintain and upgrading a Web-Objects 4.5 application that uses the JDK 1.18. There are two constantly recurring exceptions that keep getting thrown, exceptions for which there are no stack traces. These are exceptions thrown by methods that do not presently have throws or try/catch code associated with them.
    My questions are:
    1) Why are there no stack traces available? Is it because the exception handling code is not there, or could there be another reason?
    2) Will the inclusion of exception-handling code ALWAYS lead to stack traces and messages becoming available (if I put a e.printStackTrace() in my catch(Excetion e) clause), or will there be situations where it will not be available?
    3) What is the best way for me to handle these types of exceptions in order to gain the most information possible about their root causes and possible solutions?
    Thanks for your help.

    I have never seen a case where there was no stack trace.
    I have seen cases where the stack trace does not provide line numbers. I have also seen cases where it is less than useful as it terminates on a native call (which is to be expected.)
    However, if you don't call printStackTrace() then you don't get it. And if you catch an exception an throw a different one you also loose information. So you might want to check those possibilities.

  • Custom exceptions and carrying forward stack trace

    Hi, I have a question on exception handling.
    I have written an application which has several custom exceptions. When an exception occurs, sometimes I throw it and then when its caught, wrapping it in another exception like so:
    } catch (Exception e){
    throw new CollectionFailedException(this.getName() + " could not get collection", e);
    This works fine, but when I output the stacktrace, it only goes as far as the new exception, making things more difficult to debug. Is there any way of incrementing the stack trace using the first exception?
    Many thanks for any help offered!
    Marc

    Marc, this is expected behaviour. When you throw a new exception, the stacktrace starts off at the new one. A really nice explanation and sample code for creating new Exceptions and extending the Exception class is located at:
    http://www.javaworld.com/javaworld/jw-09-2001/jw-0914-exceptions.html
    Good luck, fstream

  • Apps disappeared from my laptop, and app store says I have no purchases.  They are still on my ipad.  What do I do?

    All my apps have mysteriously disappeared from my itunes  on my laptop except for one that I purchased using my ipad last week.  I went into the apps store to retrieve them, but is say I have NO purchases (no even the one from last week).  My ipad still seems to show all the apps, even those for iphone/touch.  What do I do?

    Purchase History
    http://support.apple.com/kb/ht2727

  • My "Podcasts" Tab has disappeared from my phone (iTunes 11.0.4)?

    As you can see here, my "Podcasts" tab has mysteriously disappeared from my device. I've checked the other tabs but it's nowhere to be found.
    I want to switch out some played podcast episodes with some unplayed episodes but it won't let me to that. What do I need to do?

    command-5 (or go to Windows>Effects)

  • Config stack trace,insufficient privilledge and DB instance unavailbl error

    I am installing oracle 11.1.0.6 on windows xp professional[not the home edition].
    It installed successfully, but want to configure the EM Console manually. It shows the following 3 errors;
    Jan 16, 2011 3:35:31 PM oracle.sysman.emcp.util.CentralAgentUtil isCentralAgentConfigured
    CONFIG: Sid: orcl Host: don_h Node: null OH: D:\app\doN_H agentHome: null isCentral: false
    Jan 16, 2011 3:35:31 PM oracle.sysman.emcp.ParamsManager getParam
    CONFIG: No value was set for the parameter SYS_PWD.
    Jan 16, 2011 3:35:31 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
    CONFIG: SQLEngine connecting with SID: orcl, oracleHome: D:\app\doN_H, and user:
    Jan 16, 2011 3:35:36 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
    CONFIG: ORA-01031: insufficient privileges
    oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-01031: insufficient privileges
    at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1530)
    at oracle.sysman.assistants.util.sqlEngine.SQLEngine.connect(SQLEngine.java:853)
    at oracle.sysman.emcp.util.GeneralUtil.initSQLEngine(GeneralUtil.java:364)
    at oracle.sysman.emcp.DatabaseChecks.checkDbAvailabilityImpl(DatabaseChecks.java:106)
    at oracle.sysman.emcp.DatabaseChecks.checkDbAvailability(DatabaseChecks.java:148)
    at oracle.sysman.emcp.DatabaseChecks.isASMDb(DatabaseChecks.java:720)
    at oracle.sysman.emcp.EMConfigAssistant.getParamsWarnsList(EMConfigAssistant.java:1982)
    at oracle.sysman.emcp.EMConfigAssistant.getDisplayAndPromptWarnsParms(EMConfigAssistant.java:2725)
    at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1010)
    at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:519)
    at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:468)
    Jan 16, 2011 3:35:36 PM oracle.sysman.emcp.DatabaseChecks isASMDb
    CONFIG: Database instance unavailable.
    oracle.sysman.emcp.exception.DatabaseUnavailableException: Database instance unavailable.
    at oracle.sysman.emcp.DatabaseChecks.throwDBUnavailableException(DatabaseChecks.java:136)
    at oracle.sysman.emcp.DatabaseChecks.checkDbAvailabilityImpl(DatabaseChecks.java:129)
    at oracle.sysman.emcp.DatabaseChecks.checkDbAvailability(DatabaseChecks.java:148)
    at oracle.sysman.emcp.DatabaseChecks.isASMDb(DatabaseChecks.java:720)
    at oracle.sysman.emcp.EMConfigAssistant.getParamsWarnsList(EMConfigAssistant.java:1982)
    at oracle.sysman.emcp.EMConfigAssistant.getDisplayAndPromptWarnsParms(EMConfigAssistant.java:2725)
    at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1010)
    at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:519)
    at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:468)
    Jan 16, 2011 3:35:36 PM oracle.sysman.emcp.ParamsManager setFlag
    CONFIG: Flag 'asm_db' set to false
    Jan 16, 2011 3:35:43 PM oracle.sysman.emcp.ParamsManager setParam
    CONFIG: Setting param: PORT value: 1521
    Jan 16, 2011 3:35:53 PM oracle.sysman.emcp.ParamsManager getParam
    CONFIG: No value was set for the parameter SYS_PWD.
    Jan 16, 2011 3:35:53 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
    CONFIG: SQLEngine connecting with SID: orcl, oracleHome: D:\app\doN_H, and user: SYS
    Jan 16, 2011 3:35:54 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
    CONFIG: Waiting for service 'OracleDBConsoleorcl' to fully start
    Jan 16, 2011 3:45:48 PM oracle.sysman.emcp.util.PlatformInterface serviceCommand
    CONFIG: Waiting for service 'OracleDBConsoleorcl' to fully start
    Jan 16, 2011 3:45:58 PM oracle.sysman.emcp.EMConfig perform
    SEVERE: Error starting Database Control
    Refer to the log file at D:\app\doN_H\cfgtoollogs\emca\orcl\emca_2011_01_16_15_35_22.log for more details.
    Jan 16, 2011 3:45:58 PM oracle.sysman.emcp.EMConfig perform
    CONFIG: Stack Trace:
    oracle.sysman.emcp.exception.EMConfigException: Error starting Database Control
    at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:869)
    at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:250)
    at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:213)
    at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:235)
    at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:535)
    at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1215)
    at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:519)
    at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:468)
    Ur advice on how to solve this prob is highly needed pls

    I am installing oracle 11.1.0.6 on windows xp professional[not the home edition].
    NO Oracle version is ever supported on any HOME edition of Windows.
    when all else fails Read The Fine Manual
    http://www.oracle.com/pls/db111/portal.portal_db?selected=11&frame=#microsoft_windows_installation_guides
    Tens of THOUSANDS of folks have successfully install Oracle on Windows by RTFM, Installation Guide

  • My playlist appears in itunes, but the music files have mysteriously disappeared in my iTunes Media file. Is there a way to recover them? Tried searching and cannot find them.

    My playlist appears in itunes, but the music files have mysteriously disappeared from my iTunes Media file. Is there a way to recover them? Tried searching and cannot find them.

    This page might help: http://support.creative.com/kb/ShowArticle.aspx?sid=44083
    Older Zens don't support AAC, which is the format iTunes uses for songs.
    You can convert from AAC to MP3, which every media player under the sun will play.  Here's a tutorial: http://reviews.cnet.com/8301-12519_7-10096807-49.html

  • Errors;Insufficient priviledges, Config:DB instance, and Config:Stack trace

    I am installing oracle 11.1.0.6 on windows xp professional[not the home edition].
    It installed successfully, but want to configure the EM Console manually. It shows the following 3 errors;
    Jan 16, 2011 3:35:31 PM oracle.sysman.emcp.util.CentralAgentUtil isCentralAgentConfigured
    CONFIG: Sid: orcl Host: don_h Node: null OH: D:\app\doN_H agentHome: null isCentral: false
    Jan 16, 2011 3:35:31 PM oracle.sysman.emcp.ParamsManager getParam
    CONFIG: No value was set for the parameter SYS_PWD.
    Jan 16, 2011 3:35:31 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
    CONFIG: SQLEngine connecting with SID: orcl, oracleHome: D:\app\doN_H, and user:
    Jan 16, 2011 3:35:36 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
    CONFIG: ORA-01031: insufficient privileges
    oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-01031: insufficient privileges
         at oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1530)
         at oracle.sysman.assistants.util.sqlEngine.SQLEngine.connect(SQLEngine.java:853)
         at oracle.sysman.emcp.util.GeneralUtil.initSQLEngine(GeneralUtil.java:364)
         at oracle.sysman.emcp.DatabaseChecks.checkDbAvailabilityImpl(DatabaseChecks.java:106)
         at oracle.sysman.emcp.DatabaseChecks.checkDbAvailability(DatabaseChecks.java:148)
         at oracle.sysman.emcp.DatabaseChecks.isASMDb(DatabaseChecks.java:720)
         at oracle.sysman.emcp.EMConfigAssistant.getParamsWarnsList(EMConfigAssistant.java:1982)
         at oracle.sysman.emcp.EMConfigAssistant.getDisplayAndPromptWarnsParms(EMConfigAssistant.java:2725)
         at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1010)
         at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:519)
         at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:468)
    Jan 16, 2011 3:35:36 PM oracle.sysman.emcp.DatabaseChecks isASMDb
    CONFIG: Database instance unavailable.
    oracle.sysman.emcp.exception.DatabaseUnavailableException: Database instance unavailable.
         at oracle.sysman.emcp.DatabaseChecks.throwDBUnavailableException(DatabaseChecks.java:136)
         at oracle.sysman.emcp.DatabaseChecks.checkDbAvailabilityImpl(DatabaseChecks.java:129)
         at oracle.sysman.emcp.DatabaseChecks.checkDbAvailability(DatabaseChecks.java:148)
         at oracle.sysman.emcp.DatabaseChecks.isASMDb(DatabaseChecks.java:720)
         at oracle.sysman.emcp.EMConfigAssistant.getParamsWarnsList(EMConfigAssistant.java:1982)
         at oracle.sysman.emcp.EMConfigAssistant.getDisplayAndPromptWarnsParms(EMConfigAssistant.java:2725)
         at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1010)
         at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:519)
         at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:468)
    Jan 16, 2011 3:35:36 PM oracle.sysman.emcp.ParamsManager setFlag
    CONFIG: Flag 'asm_db' set to false
    Jan 16, 2011 3:35:43 PM oracle.sysman.emcp.ParamsManager setParam
    CONFIG: Setting param: PORT value: 1521
    Jan 16, 2011 3:35:53 PM oracle.sysman.emcp.ParamsManager getParam
    CONFIG: No value was set for the parameter SYS_PWD.
    Jan 16, 2011 3:35:53 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
    CONFIG: SQLEngine connecting with SID: orcl, oracleHome: D:\app\doN_H, and user: SYS
    Jan 16, 2011 3:35:54 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
    CONFIG: Waiting for service 'OracleDBConsoleorcl' to fully start
    Jan 16, 2011 3:45:48 PM oracle.sysman.emcp.util.PlatformInterface serviceCommand
    CONFIG: Waiting for service 'OracleDBConsoleorcl' to fully start
    Jan 16, 2011 3:45:58 PM oracle.sysman.emcp.EMConfig perform
    SEVERE: Error starting Database Control
    Refer to the log file at D:\app\doN_H\cfgtoollogs\emca\orcl\emca_2011_01_16_15_35_22.log for more details.
    Jan 16, 2011 3:45:58 PM oracle.sysman.emcp.EMConfig perform
    CONFIG: Stack Trace:
    oracle.sysman.emcp.exception.EMConfigException: Error starting Database Control
         at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:869)
         at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:250)
         at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:213)
         at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:235)
         at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:535)
         at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1215)
         at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:519)
         at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:468)
    Ur advice on how to solve this prob is highly needed pls

    Pl see you duplicate post here - Error trying to configure enterprise console
    Pl post the requested information in that thread.
    HTH
    Srini

  • Can't Redirect -classic thread dump/stack trace

    Hi,
    But how can you redirect the output so you can view it easily, instead of the info just scrolling by into oblivion? I'm using Win98 and JDK1.3.1_02, and w/ the default hotspot jvm, from the console, I could redirect the stack trace/thread dump from standard out (w/c it went into) into a file.
    But w/ the -classic option (from the SDK java version, not the JRE), the stack trace/thread dump does NOT seem to sent to standard out, because I can redirect standard out, but the trace/dump is STILL going to the screen. I have redirected standard err (from w/in my java program) as well, but still no dice!
    Help! TIA,
    Reggie

    Thanks for your reply guys! I also tried redirecting std err from inside my java app. My System.err outputs WERE redirected, but NOT the thread dump - that STILL went to the screen.
    Then I tried the "java 2>error.txt myclass" but win98 thought 2 was the name of my class and threw a NoClassDefFoundError ;-).
    Any more ideas? regards,
    Reggie

Maybe you are looking for