NullPointerException without stack trace

The Java stack trace can be very suitable to find the error path. However, I get NullPointerExceptions without a stack trace! If I catch a Throwable in my main() method I can print the exception, but the stack trace is empty:
try {
} catch (Throwable t) {
System.out.println("ERROR: "+t); //does print "java.lang.NullPointerException"
t.printStackTrace(); //also just prints 1 line with "java.lang.NullPointerException"
}I thought, a stack trace is always available?

When I want to add a comment to this "RFE" (!!!), I just get a "We encountered an unexpected error. Please try back again. " ... there are "fixed" bug ID links:
Release Fixed 1.4.2_05(Bug ID:2120657) , tiger-beta2(Bug ID:2120658)
But I use 1.4.2_05 and it happend there ...

Similar Messages

  • no stack trace available

    Hi,
    Does anyone out there recognize it and know what to do with it ?
    Pt maj 18 14:45:32 GMT+02:00 2001:<E> <ServletContextManager> Servlet
    request terminiated with RuntimeException
    java.lang.NullPointerException
    <<no stack trace available>>
    It happens every time we overload BEA WebLogic Server 5.1.0 + Service
    Pack 8 on HP-UX 11.0 with JDK 1.2.2.07. It means that as we start
    running 10 or more concurrent users (using web stres tool) the error
    shows up.
    Jacek Laskowski

    Possibly running out of file descriptors.
    Mike
    Jacek Laskowski <[email protected]> wrote:
    Hi,
    Does anyone out there recognize it and know what to do with it ?
    Pt maj 18 14:45:32 GMT+02:00 2001:<E> <ServletContextManager> Servlet
    request terminiated with RuntimeException
    java.lang.NullPointerException
    <<no stack trace available>>
    It happens every time we overload BEA WebLogic Server 5.1.0 + Service
    Pack 8 on HP-UX 11.0 with JDK 1.2.2.07. It means that as we start
    running 10 or more concurrent users (using web stres tool) the error
    shows up.
    Jacek Laskowski

  • Make java run without printing the stack trace

    I have a GUI program which appears to work for all test cases. Basically what it does is prints out data from a linked list allowing the user to traverse the list with Next and Previous buttons which call a list iterator next/previous method call, and then display the current item in the list. The original problem arose when dealing with alternating calls to next and previous, which since list iterator does not have a current pointer, returned the same element ad infinitum. I modified the method to check for alternating button presses, and it seems to work, except for cases where there are two elements in the list. In this case it still works, printing the correct element, but it also prints to the command line an Exception in Thread AWT...NoSuchElementException. My question is, is there any way to tell the program to not print out this stack trace and just keep running quietly through the Exception?

    I'm not an expert at error handling, but wouldn't it work to put the code that throws the exception in a try/catch block?
    like
    try {
        //code that causes exception
    } catch (NoSuchElementException e) {
        //do nothing
    }Might not work, but it's worth a try...

  • Exception stack trace while opening the file in JDevloper

    Hi,
    When I want to open .jsp file from Application Navigator to Editor then this error appeared
    Exception stack trace:
    java.lang.NullPointerException
         at oracle.jdevimpl.webapp.design.util.InvisibleJspElementsUtil.applyInvisibleJSPElements(InvisibleJspElementsUtil.java:108)
         at oracle.jdevimpl.webapp.design.util.InvisibleJspElementsUtil.applyInvisibleJSPElements(InvisibleJspElementsUtil.java:78)
         at oracle.jdevimpl.webapp.design.util.InvisibleJspElementsUtil.applyInvisibleJSPElements(InvisibleJspElementsUtil.java:47)
         at oracle.jdevimpl.webapp.design.view.DesignTimeFixedViewDocument.rebuildTree(DesignTimeFixedViewDocument.java:162)
         at oracle.jdevimpl.webapp.model.content.dom.view.proxy.ProxyViewDocument.initialize(ProxyViewDocument.java:80)
         at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.rebuildViewDocument(AbstractWebAppEditor.java:686)
         at oracle.jdevimpl.webapp.editor.html.HtmlEditor.rebuildViewDocument(HtmlEditor.java:621)
         at oracle.jdevimpl.webapp.editor.jsp.JspEditor.rebuildViewDocument(JspEditor.java:209)
         at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.createDocuments(AbstractWebAppEditor.java:1206)
         at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.open(AbstractWebAppEditor.java:393)
         at oracle.jdevimpl.webapp.editor.html.HtmlEditor.open(HtmlEditor.java:172)
         at oracle.jdevimpl.webapp.editor.jsp.JspEditor.open(JspEditor.java:113)
         at oracle.ideimpl.editor.EditorState.openEditor(EditorState.java:239)
         at oracle.ideimpl.editor.EditorState.createEditor(EditorState.java:147)
         at oracle.ideimpl.editor.EditorState.getOrCreateEditor(EditorState.java:90)
         at oracle.ideimpl.editor.SplitPaneState.canSetEditorStatePos(SplitPaneState.java:231)
         at oracle.ideimpl.editor.SplitPaneState.setCurrentEditorStatePos(SplitPaneState.java:194)
         at oracle.ideimpl.editor.TabGroupState.createSplitPaneState(TabGroupState.java:103)
         at oracle.ideimpl.editor.TabGroup.addTabGroupState(TabGroup.java:275)
         at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1261)
         at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1196)
         at oracle.ideimpl.editor.EditorManagerImpl.openEditor(EditorManagerImpl.java:1131)
         at oracle.ideimpl.editor.EditorManagerImpl.whenOpenEditor(EditorManagerImpl.java:2332)
         at oracle.ideimpl.editor.EditorManagerImpl.handleDefaultAction(EditorManagerImpl.java:1893)
         at oracle.ide.controller.ContextMenu.fireDefaultAction(ContextMenu.java:343)
         at oracle.ideimpl.explorer.BaseTreeExplorer.fireDefaultAction(BaseTreeExplorer.java:1576)
         at oracle.ideimpl.explorer.BaseTreeExplorer.dblClicked(BaseTreeExplorer.java:1913)
         at oracle.ideimpl.explorer.BaseTreeExplorer.mouseReleased(BaseTreeExplorer.java:1934)
         at oracle.ideimpl.explorer.CustomTree.processMouseEvent(CustomTree.java:176)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    What is the problem in my JDevloper 10.1.3.2?
    Regards,
    Rajendar.
    Edited by: Rajendar Are on Nov 28, 2008 1:28 AM

    I don't have that version.Please tell me why this problem is occurring?
    For rectifying this error I stopped all processes in JDeveloper and restarted.Still it gives me error alert.
    Regards,
    Rajendar.

  • How to get Java source in applet stack trace to debug Java security manager

    How can I get line numbers for Java source in stack traces for my applet? I'm having a problem with my code-signing certificate. On one of my applets, I consistently get a NullPointerException inside the security dialog code in the JDK. As a result, either the "trust this applet" dialog never appears, or even though it appears, it defaults to untrusted because of the exception, so I can't access any local files (and that's a bit of a problem for an applet whose sole purpose is to upload files to our server). I unzipped src.zip in my JDK directory and set the debug flag for my Ant <javac> task as well as set debuglevel to "lines." Anything else? Here's the trace that I'm getting so far. See that after the NullPointerException it assumes that the user has denied permission. If I could read this Java source maybe I could figure out why it hates my code-signing certificate (jarsigner, BTW, never complains when I verify my jar).
    security: Blacklist file not found or revocation check is disabled
    security: Accessing keys and certificate in Mozilla user profile: null
    security: Loading Root CA certificates from D:\Program Files (x86)\Java\jre6\lib\security\cacerts
    security: Loaded Root CA certificates from D:\Program Files (x86)\Java\jre6\lib\security\cacerts
    security: Loading Deployment certificates from C:\Users\Rich\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs
    security: Loaded Deployment certificates from C:\Users\Rich\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Validate the certificate chain using CertPath API
    security: Obtain certificate collection in Root CA certificate store
    security: Obtain certificate collection in Root CA certificate store
    security: Start to check whether root CA is replaced
    security: The root CA has been replaced
    security: No timestamping info available
    security: Found jurisdiction list file
    security: Start checking trusted extension for this certificate
    security: Start comparing to jurisdiction list with this certificate
    security: The CRL support is disabled
    security: The OCSP support is disabled
    security: This OCSP End Entity validation is disabled
    security: Checking if certificate is in Deployment denied certificate store
    security: Checking if certificate is in Deployment permanent certificate store
    security: Checking if certificate is in Deployment session certificate store
    java.lang.NullPointerException
         at com.sun.deploy.ui.UIFactory.showSecurityDialog(Unknown Source)
         at com.sun.deploy.security.TrustDeciderDialog.showDialog(Unknown Source)
         at com.sun.deploy.security.X509Util.showSecurityDialog(Unknown Source)
         at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.isTrustedByTrustDecider(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.getTrustedCodeSources(Unknown Source)
         at com.sun.deploy.security.CPCallbackHandler$ParentCallback.strategy(Unknown Source)
         at com.sun.deploy.security.CPCallbackHandler$ParentCallback.openClassPathElement(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$700(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    security: User has denied the priviledges to the code
    security: Adding certificate in Deployment denied certificate store
    security: Added certificate in Deployment denied certificate store
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Validate the certificate chain using CertPath API
    security: Obtain certificate collection in Root CA certificate store
    security: Obtain certificate collection in Root CA certificate store
    security: Start to check whether root CA is replaced
    security: The root CA has been replaced
    security: No timestamping info available
    security: Found jurisdiction list file
    security: Start checking trusted extension for this certificate
    security: Start comparing to jurisdiction list with this certificate
    security: The CRL support is disabled
    security: The OCSP support is disabled
    security: This OCSP End Entity validation is disabled
    security: Checking if certificate is in Deployment denied certificate store
    security: Checking if certificate is in Deployment denied certificate store

    Rats, now that I look at the stack trace and compare to what's in the JDK srce.zip, it appears that most of this code is not part of the JDK source. I don't see any com/sun/deploy, etc.

  • Overloaded methods in stack trace

    There is a thing I thinking about.
    When I have overloaded methods and I want to check a stack trace where one of these overloaded methods take part I cannot decide which method was in the frame, unless I have the source and have debug information in the class file.
    It's not so painful because in most cases people have source code and compile with debug option if they need it, and so the method can be looked up.
    Although, it makes harder to implement runtime test or error processing tools, which works upon stack trace elements. Methods could be annotated with version, author, date and other pieces of information. Runtime test or error processing tools could read and process these annotations.
    Current StackTraceElement implementation makes this possible by using Reflection, while there are no overloaded methods in the stack trace.
    It would be great to include some method into the StackTraceElement which return types of parameters of the stacked methods.
    What's your opinion about this?
    Here is a short source which demonstrates the problem:
    public class Test {
         public void a() { throw new NullPointerException(); }
         public void a(int i) { throw new NullPointerException(); }
         public static void main(String[] a) {
               Test t = new Test();
               Random r = new Random(System.currentTimeMillis());
               if(r.nextBoolean()) t.a(); else t.a(0);
    }I can't decide if a() or a(int) was invoked if I dont' have the source or haven't got debug info (line numbers).

    I guess it would be quite useful in certain cases.
    Let's say we make (runtime readable) annotations on methods with author, version and modification date information.
    When we have an exception stack trace with exact information about concerned methods, we have all information to create and dispatch automatically an error report to the responsible persons based on annotations.

  • ER for jdev1013: JSP line number in exception stack trace

    I'd like to have the JSP line number back in the exception stack trace like in jdev 9052 (and before)
    Sample code to force an exception:
    <%
    request.getParameter("x").length();
    %>
    Output running in JDev 9.0.5.2:
    500 Internal Server Error
    java.lang.NullPointerException
    at default.jspService(default.jsp:2)
    [default.jsp]
    at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:139)
    Output running in JDev 10.1.3 (SU5):
    500 Internal Server Error
    java.lang.NullPointerException
    at default.jspService(_default.java:40)
    [default.jsp]
    at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:60)
    ...

    Hi,
    can you work with customer support to file a bug?
    Thanks
    Frank

  • Instrument stack trace on config.xml

    I upgraded my aplication from weblogic 6.1 to 8.1,
    "instrument stack trace" is working fine with 6.1.
    it is not making any difference with 8.1,(i.e)
    i could't see any server side exception stack trace from the client when application got deployed on 8.1.
    what should i do in order to see the stack trace

    Hi,
    have you checked that whether InstrumentStackTraceEnabled is true or not ?
    With this attribute enabled, if a client issues an RMI call to a server subsystem or to a module running within the server, and if the subsystem or module generates an exception that includes a stack trace, the server will return the exception as well as the stack trace. With this attribute disabled, the server will return exceptions without the stack trace details.
    Regards
    Anilkumar kari

  • Analysis of stack trace

    Hi Experts,
    i have an null pointer exception error in a message on adapter engine level.
    It's allways the same message what occurs this error.
    The message content in netweaver message monitoring contains following error:
    Application error occurred during request processing.
      Details:   Error [javax.servlet.ServletException: null], with root cause [java.lang.NullPointerException: null].
    Exception id: [0019B9F3058800A2000005E400001834000496E2E17B13EF]
    I have read the sap note 859465. There is recommended to take a look in the stack trace.
    Now i want to analyse the stack trace of the pi.
    But i have no idea where to find that stack trace.
    Can somebdy help me?
    Many thanks!!!

    if you are using PI 7.1, then use NWA and Java system reports/log viewer link to get details
    or by default you can find them - /usr/sap/<SID>/DVEBGS001/j2ee/cluster/server0/log.

  • Crystal Reports "Unknown Source" Stack Trace after report generation

    Getting java.lang.NullPointerException with Crystal ReportViewer.W(UnKnown Source)  stack trace... 
    java.lang.NullPointerException
    at com.crystaldecisions.report.web.viewer.CrystalReportViewer.goto(Unknown Source)
    at com.crystaldecisions.report.web.ServerControl.a(Unknown Source)
    at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source)
    at jsp_servlet._crystalviewer.__viewer._jspService(__viewer.java:105)
    We are running in to this issue only after the report is generated and during performing a search or navigating to different page...
    Any help to resolve this will be greately appriciated....
    Thanks
    ND

    The ODBC datasource must be configured as a System datasource.  The database was configured as a User datasource so it was only visible on the local computer.  That's why Business Views Manager could access the database.

  • General Stack Trace and Exception Question

    I hope this is the correct forum to post to ... well here goes...
    The Big Picture:
    I�m using the org.xml.sax package (along with their subsequent �helper� and �ext� packages) to parse huge XML files.
    Some references:
    DefaultHandler -> org.xml.sax.DefaultHandler (Default base class for SAX2 event handlers)
    CustomHandler -> mypackage.CustomHandler (which extends the above DefaultHandler)
    SAXException -> org.xml.sax.SAXException (thrown by many methods defined in the DefaultHandler)
    The story:
    I�ve made a class which extends the DefaultHandler class; (CustomHandler). The DefaultHandler class has a bunch of methods declared in it that I overwrite, which all claim to throw these SAXExceptions. My overwritten methods defined in CustomHandler had also been written to throw those SAXExceptions.
    My Overwritten Methods: (you�ll see why the �throw� part is commented a little later)
    //Methods in SAX DocumentHandler
        public void startDocument(){//throws SAXException{
        public void endDocument(){//throws SAXException{
        public void startElement(String uri, String localName, String qName, Attributes attrs){//throws SAXException{
        public void endElement(String uri, String localName, String qName){//throws SAXException{
        public void characters(char buf[], int offset, int len){//throws SAXException{
    The Code Executes like This:
    try{
         File xmlFile = new File(getFileName());
         CustomHandler myHandler = new CustomHandler();
         saxParser.parse(xmlFile, myHandler); //<- Important Line
         myHandler.reportSomeXmlInfoAboutTheFile(); //<- Ignore this command
    }catch(ParserConfigurationException pce){
                pce.printStackTrace();       
    }catch(SAXException sax){
                sax.printStackTrace();
    }catch(IOException ioe){
                ioe.printStackTrace();
    }Sample Stack Trace: (The ArrayIndexOutOfBoundsException was set up to be thrown for the sake of discussion)
    java.lang.ArrayIndexOutOfBoundsException: 5
    at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:691)
    at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
    at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:281)
    at saxparserexercise.DriverClass.exercise(DriverClass.java:58) //<- Last (un Native to ME � not java) execution stack point
    at saxparserexercise.Main.<init>(Main.java:38)
    at saxparserexercise.Main.main(Main.java:59)
    The Problem:
    Its about my stack traces� they all map through the above noted �Important Line� instead of through my overwritten methods in CustomHandler (where I cause the ArrayIndexOutOfBoundsException) So, therefore I thought I�d try commenting out those �throws SAXException� parts in the method declarations of my CustomHandler class� Diddn�t change a thing. Thus my question is�
    The Question:
    What changes or modifications can I make such that the Stack Trace I receive will map to exactly where the problem occurs in my code� does that make sense?

    I suspect it may be because your version of Catalina was compiled without debugger support. From what I remember this strips line numbers from generated class files.
    You'll need to download either a debug-enabled version of Catalina, or pull down the source and rebuild the system.
    Unless I'm barking up the wrong tree.
    J

  • How to get Line numbers in KVM stack traces

    Hello!
    I am fairly new to kvm programming and might have missed the obvious. When my program dumps a stack trace under kvm it gives me an offset (I dont know what the number corresponds to) from the method but not source line numbers like I am used to seeing under J2SE. I complie the code using -g and run it using kvm_g. For example, I see soemething like
    java.lang.NullPointerException
    at myclass.mymethod(+5)
    at parentclass.parentmethod(+10)
    Where I dont know what the +5 or +10 stand for as it relates to my source code.
    Can somebody help with trying to correlate the stack trace to my source code.
    Thanks.
    Ranga.

    I would like to know too. Has anyone found an answer?

  • FlexUnit 4 assert failures have "explosive" stack traces

    With FlexUnit 4 in Flash Builder 4 Plugin Beta, I created 1 suite with 1 class with 1 default failing test method. When I ran it, the assert failure had a call stack 60 methods high. Is this a bug?
    The stack trace has several "async" methods, e.g. applyExplosivelyAsync(). This seems strange because  I'm not using async at all. Is this intended behavior?
    Robert
    Test method Not yet implemented
           at flexunit.framework::Assert$/
    fail()[C:\Users\mlabriola\Documents\workspaces\net\digitalprimates\opensource\fluint\FlexU nit1Lib\src\flexunit\framework\Assert.as:370]
            at WidgetTest/testWidget()[C:\Users\robert.penner\Adobe Flash Builder
    Plug-in Beta 2\TestProject\src\WidgetTest.as:20]
            at Function/http://adobe.com/AS3/2006/builtin::apply()
            at flex.lang.reflect::Method/apply()[C:\Users\mlabriola\Documents\workspaces\net\digitalprim ates\opensource\flexunit\FlexUnit4\src\flex\lang\reflect\Method.as:124]
            at ReflectiveCallable/run()[C:\Users\mlabriola\Documents\workspaces\net\digitalprimates\open source\flexunit\FlexUnit4\src\org\flexunit\runners\model\FrameworkMethod.as:214]
            at org.flexunit.runners.model::FrameworkMethod/applyExplosivelyAsync()[C:\Users\mlabriola\Do cuments\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit\runn ers\model\FrameworkMethod.as:121]
            at org.flexunit.runners.model::FrameworkMethod/invokeExplosivelyAsync()[C:\Users\mlabriola\D ocuments\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit\run ners\model\FrameworkMethod.as:132]
            at org.flexunit.internals.runners.statements::InvokeMethod/evaluate()[C:\Users\mlabriola\Doc uments\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit\inter nals\runners\statements\InvokeMethod.as:52]
            at org.flexunit.internals.runners.statements::StackAndFrameManagement/evaluate()[C:\Users\ml abriola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\fle xunit\internals\runners\statements\StackAndFrameManagement.as:94]
            at org.flexunit.internals.runners.statements::StatementSequencer/executeStep()[C:\Users\mlab riola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexu nit\internals\runners\statements\StatementSequencer.as:62]
            at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[C:\Users\mlabriola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit 4\src\org\flexunit\internals\runners\statements\StatementSequencer.as:82]
            at org.flexunit.token::AsyncTestToken/sendResult()[C:\Users\mlabriola\Documents\workspaces\n et\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit\token\AsyncTestToken.as: 70]
            at org.flexunit.internals.runners.statements::AsyncStatementBase/sendComplete()[C:\Users\mla briola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flex unit\internals\runners\statements\AsyncStatementBase.as:44]
            at org.flexunit.internals.runners.statements::StatementSequencer/sendComplete()[C:\Users\mla briola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flex unit\internals\runners\statements\StatementSequencer.as:103]
            at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[C:\Users\mlabriola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit 4\src\org\flexunit\internals\runners\statements\StatementSequencer.as:86]
            at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[C:\Users\mlabrio la\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit \internals\runners\statements\StatementSequencer.as:68]
            at org.flexunit.internals.runners.statements::StatementSequencer/executeStep()[C:\Users\mlab riola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexu nit\internals\runners\statements\StatementSequencer.as:62]
            at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[C:\Users\mlabriola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit 4\src\org\flexunit\internals\runners\statements\StatementSequencer.as:82]
            at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[C:\Users\mlabrio la\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit \internals\runners\statements\StatementSequencer.as:68]
            at org.flexunit.runners::BlockFlexUnit4ClassRunner/runChild()[C:\Users\mlabriola\Documents\w orkspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit\runners\Block FlexUnit4ClassRunner.as:104]
            at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[C:\Users\mlabriola\Doc uments\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit\inter nals\runners\ChildRunnerSequencer.as:49]
            at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[C:\Users\mlabriola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit 4\src\org\flexunit\internals\runners\statements\StatementSequencer.as:82]
            at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[C:\Users\mlabrio la\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit \internals\runners\statements\StatementSequencer.as:68]
            at org.flexunit.internals.runners.statements::StatementSequencer/executeStep()[C:\Users\mlab riola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexu nit\internals\runners\statements\StatementSequencer.as:62]
            at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[C:\Users\mlabriola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit 4\src\org\flexunit\internals\runners\statements\StatementSequencer.as:82]
            at org.flexunit.token::AsyncTestToken/sendResult()[C:\Users\mlabriola\Documents\workspaces\n et\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit\token\AsyncTestToken.as: 70]
            at org.flexunit.internals.runners.statements::AsyncStatementBase/sendComplete()[C:\Users\mla briola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flex unit\internals\runners\statements\AsyncStatementBase.as:44]
            at org.flexunit.internals.runners.statements::StatementSequencer/sendComplete()[C:\Users\mla briola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flex unit\internals\runners\statements\StatementSequencer.as:103]
            at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[C:\Users\mlabriola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit 4\src\org\flexunit\internals\runners\statements\StatementSequencer.as:86]
            at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[C:\Users\mlabrio la\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit \internals\runners\statements\StatementSequencer.as:68]
            at org.flexunit.internals.runners.statements::StatementSequencer/executeStep()[C:\Users\mlab riola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexu nit\internals\runners\statements\StatementSequencer.as:62]
            at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[C:\Users\mlabriola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit 4\src\org\flexunit\internals\runners\statements\StatementSequencer.as:82]
            at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[C:\Users\mlabrio la\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit \internals\runners\statements\StatementSequencer.as:68]
            at org.flexunit.runners::ParentRunner/run()[C:\Users\mlabriola\Documents\workspaces\net\digi talprimates\opensource\flexunit\FlexUnit4\src\org\flexunit\runners\ParentRunner.as:315]
            at org.flexunit.runners::Suite/runChild()[C:\Users\mlabriola\Documents\workspaces\net\digita lprimates\opensource\flexunit\FlexUnit4\src\org\flexunit\runners\Suite.as:59]
            at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[C:\Users\mlabriola\Doc uments\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit\inter nals\runners\ChildRunnerSequencer.as:49]
            at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[C:\Users\mlabriola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit 4\src\org\flexunit\internals\runners\statements\StatementSequencer.as:82]
            at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[C:\Users\mlabrio la\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit \internals\runners\statements\StatementSequencer.as:68]
            at org.flexunit.internals.runners.statements::StatementSequencer/executeStep()[C:\Users\mlab riola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexu nit\internals\runners\statements\StatementSequencer.as:62]
            at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[C:\Users\mlabriola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit 4\src\org\flexunit\internals\runners\statements\StatementSequencer.as:82]
            at org.flexunit.token::AsyncTestToken/sendResult()[C:\Users\mlabriola\Documents\workspaces\n et\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit\token\AsyncTestToken.as: 70]
            at org.flexunit.internals.runners.statements::AsyncStatementBase/sendComplete()[C:\Users\mla briola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flex unit\internals\runners\statements\AsyncStatementBase.as:44]
            at org.flexunit.internals.runners.statements::StatementSequencer/sendComplete()[C:\Users\mla briola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flex unit\internals\runners\statements\StatementSequencer.as:103]
            at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[C:\Users\mlabriola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit 4\src\org\flexunit\internals\runners\statements\StatementSequencer.as:86]
            at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[C:\Users\mlabrio la\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit \internals\runners\statements\StatementSequencer.as:68]
            at org.flexunit.internals.runners.statements::StatementSequencer/executeStep()[C:\Users\mlab riola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexu nit\internals\runners\statements\StatementSequencer.as:62]
            at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[C:\Users\mlabriola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit 4\src\org\flexunit\internals\runners\statements\StatementSequencer.as:82]
            at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[C:\Users\mlabrio la\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit \internals\runners\statements\StatementSequencer.as:68]
            at org.flexunit.runners::ParentRunner/run()[C:\Users\mlabriola\Documents\workspaces\net\digi talprimates\opensource\flexunit\FlexUnit4\src\org\flexunit\runners\ParentRunner.as:315]
            at org.flexunit.runner::FlexUnitCore/beginRunnerExecution()[C:\Users\mlabriola\Documents\wor kspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit\runner\FlexUnit Core.as:177]
            at org.flexunit.token::AsyncListenersToken/sendReady()[C:\Users\mlabriola\Documents\workspac es\net\digitalprimates\opensource\flexunit\FlexUnit4\src\org\flexunit\token\AsyncListeners Token.as:59]
            at org.flexunit.runner.notification.async::AsyncListenerWatcher/sendReadyNotification()[C:\U sers\mlabriola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\ org\flexunit\runner\notification\async\AsyncListenerWatcher.as:87]
            at org.flexunit.runner.notification.async::AsyncListenerWatcher/handleListenerReady()[C:\Use rs\mlabriola\Documents\workspaces\net\digitalprimates\opensource\flexunit\FlexUnit4\src\or g\flexunit\runner\notification\async\AsyncListenerWatcher.as:97]
            at flash.events::EventDispatcher/dispatchEventFunction()
            at flash.events::EventDispatcher/dispatchEvent()
            at flexunit.flexui::FlexUnit4TestRunner/handleConnect()[C:\work\flex\ide_builder\com.adobe.f lexbuilder.flexunit\flexunitframework\src\flexunit\flexui\FlexUnit4TestRunner.as:296]
            at flash.events::EventDispatcher/dispatchEventFunction()
            at flash.events::EventDispatcher/dispatchEvent()
            at flash.net::XMLSocket/reflectEvent()

    Not a bug and fully expected behavior.
    FlexUnit 4 is really just a collection of runners that can handle just about anything that is thrown at it as well as handle any pluggable runners that others write. The level of extensibility comes with some complexity. So, by the time that single method of yours is executed, there are actually probably a hundreds methods in the framework for getting everything setup, inspected and ready to go.
    The stacktrace always looks up the stack from your failure to the last point where a particular chunk of code execution began, so the 60 is basically just that number of methods. There isn't a whole lot that can be done about it save for eventually provinding filtering to eliminate showing some of our stuff and making the track more legible.
    Regarding the async thing, your method isn't async but FlexUnit4 is. Inside of the Flash Player we are operating on frames. We don't have the luxury of threads and the like that Java has, so we have to handle the possibility that something might be async on a much deeper level. We also do something called green threading where we actually watch how much time we take in execution. Once we have taken 90% ish of the time available in a given frame, we wait until the next one before we begin executing again. This allows us to run long and compelx test suites without getting a timeout from the flash player (which happens if any single frame takes longer than 15 seconds to execute). So, even though your method isn't doing anything async, all of these other pieces have to account for the chance that something will be. Hence the reason that you see async pieces in the stack trace.
    Hope that helps,
    Mike

  • 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

  • Tracking down an NPE in an entirely unhelpful stack trace

    Hi, all:
    My model runs like a champ now; it does everything I want it to. Now, I want it to run in batch mode and iterate over parameters, so that I can generate data from it. In a single run, it works perfectly. When I try to run it in batch mode, I get this stack trace:
    Exception in thread "Thread-4" java.lang.NullPointerException
         at uchicago.src.sim.engine.BatchController.setupRecorder(Unknown Source)
         at uchicago.src.sim.engine.BatchController.start(Unknown Source)
         at uchicago.src.sim.engine.BatchController$1.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    The source code is here: http://snipurl.com/2zdgn [www_koders_com]
    And the API for the class is here: http://snipurl.com/2zdi2
    [supportweb_cs_bham_ac_uk]
    I will be damned if I can figure out either what the problem is, or where to even start looking. The library I'm using is RePast; it's for agent-based simulations. This isn't a problem I've encountered before; BatchController is just supposed to work as part of the RePast library for running multiple simulations. I don't even have an intelligent question to ask; do you know where I should start?

    Either there's a bug in that library, or, more likely, you passed something as null or left something unset when you created or started your thread.
    I'm not going to follow a link to see your source code, so I can't say any more than that.

Maybe you are looking for