2005 IR Help Posted August 27, 2006 Share Posted August 27, 2006 By: Krishna S - krishna_s Runtime crash of JVM 2002-11-15 09:38 Hi, I could not figure out the weird problem. Pls help. Sometime ( randomly) the JasperReports is crashing the JVM and I get the following messages on the console: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D3C94E8 Function=JVM_RegisterUnsafeMethods+0x12E01 Library=C:j2sdk1.4.0_01jrebinclientjvm.dll Current Java thread: at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.<init>(Throwable.java:180) at java.lang.Exception.<init>(Exception.java:29) at java.lang.RuntimeException.<init>(RuntimeException.java:32) at java.lang.NullPointerException.<init>(NullPointerException.java:36) at dori.jasper.engine.fill.JRCalculator.evaluate(JRCalculator.java:656)bti **************** Another exception has been detected while we were handling last error. Dumping information about last error: ERROR REPORT FILE = (N/A) PC = 0x6D3C94E8 SIGNAL = -1073741819 FUNCTION NAME = JVM_RegisterUnsafeMethods OFFSET = 0x12E01 LIBRARY NAME = C:j2sdk1.4.0_01jrebinclientjvm.dll Please check ERROR REPORT FILE for further information, if there is any. Good bye. Press any key to continue . . . ---------------------------------------------------- Part of the file c:/JasperReports/src/dori/jasper/engine/fill/JRCalculator.java is as follows: protected Object evaluate(JRExpression expression) throws JRException { Object value = null; try { value = this.evaluate(expression.getId()); } catch (NullPointerException e) { } catch (Exception e) { throw new JRException("Error evaluating expression value : " + expression.getName(), e); } return value; } Pls help. Rgds., By: supportsib - supportsib RE: Runtime crash of JVM 2004-05-05 23:12 how can i launch JVM using the -server can i set server as default By: Ashish - ashisharte RE: Runtime crash of JVM 2004-05-06 07:01 I traced the code and it seems to happen in one of the evaluate(JRExpression expression ) methods in JRCalculator.java even after you have added the null pointer check. I fixed it temporarily by add ae.printStackTrace() in the catch Null pointer exception so that when myreport gets into this state, it doesnt crash our web server Not sure whats the permenant solution. About how to start your jvm using -server option. java -server [your program]. -Ashish By: Mark - mbrownrx RE: Runtime crash of JVM 2004-06-22 14:26 One last update - Combined with the above changes, Also set the -Xms Parameter on the JVM to something so it doesn't have to allocate more memory on the fly. It seems to puke when it needs to allocate more memory. By: Teodor Danciu - teodord RE: Runtime crash of JVM 2004-04-30 03:20 Hi, Try to launch your JVM using the -server command line switch instead of the default which is -client. Thank you, Teodor By: Mark - mbrownrx RE: Runtime crash of JVM 2004-06-22 08:32 Oddly Enough - This is going to sound a little weird, but I noticed a signifigant increase in stability after: - Adding Null Checks in JRCalculator.java if (expression != null) value = evaluate(expression.getId()); - Removing 'this' from the calls 'this.<abstractMethodName>' in JRCalcualtor.java The Null Checks should help with performance - I counted over 4000 null exceptions when I ran a report. Creation of Exceptions is an expensive process. Removing 'this' seems to have really increased the stability - I used to run a report 2-7 times before the JVM crash. I've run it 50+ times now. Can anyone else confirm this? By: Bart Elberg - belberg RE: Runtime crash of JVM 2004-06-24 16:42 Teodor, It is still not clear to me whether this eliminates the problem or just makes it less frequent. Is there an explanation of why the Server VM does not experience this problem or is it just an observation? It would be a big help if someone would post a short bit of source code that generates this failure frequently. We've been trying to reproduce this error so that we can compare different solutions, but our application has not failed despite a solid week of running reports. Of course it doesn't fail when we want it to!!!! Thanks in advance for any help, Bart By: Mark - mbrownrx RE: Runtime crash of JVM 2004-06-29 12:37 Ack, it's still happening. I've noticed that it is definately worse under Java Web Start - I'm not sure why it is, but it occurs much more frequently when launched from a .jnlp. It seems rather unpredictable. It works fine lots of times, and other times it just crashes all the time. I'm not sure what it is, but I think that memory is being thrashed somehow.. Is anyone aware of jasper or any of the other required libs making JNI Calls? Are any of them creating objects in a weird way that could be bugging out the JVM's Garbage Collector? By: Bart Elberg - belberg RE: Runtime crash of JVM 2004-06-30 06:18 Mark, Thanks for digging into this problem. Do you have a test program that reliably reproduces the problem? Otherwise, how often does the problem occur? Does the -noclassgc or -server option eliminate the problem completely? Hopefully Sun will provide a solution quickly. There are several cases of similar JVM crashes that are affecting other applications. Maybe they are all related. Thanks again! Bart By: freezy - mimounl RE: Runtime crash of JVM 2004-07-02 06:07 Hello, it seems i have the same kind of problem, i have this exception when the jasper pdf generation process is long (and so i suppose when gc is garbaging) : ---------------------------------8<----------------------------- ExceptionConverter: java.lang.NullPointerException at com.lowagie.text.pdf.PdfDocument.newPage(Unknown Source) at com.lowagie.text.pdf.PdfDocument.close(Unknown Source) at com.lowagie.text.Document.close(Unknown Source) at dori.jasper.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java(Compiled Code)) at dori.jasper.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:230) at dori.jasper.engine.JasperExportManager.exportReportToPdf(JasperExportManager.java:190) ---------------------------------8<----------------------------- i make confidence that the problem will be solved if we turn the noclassgc option on but is there a risk of memory/performance problem ? Also, will the next jasper release mask the jvm problem ? Thanks in advance for your response, mimounl By: Mark - mbrownrx RE: Runtime crash of JVM 2004-06-30 05:56 I've found a bug in the jvm. The issue is that the child class of the JRCalculator is being garbage collected, and when the JRCalculator calls its abstract method, there's no child class to execute (hence the NULL on the abstract method call). I modified I'm working on an appropriate workaround. Until then, try running with the JVM option -Xnoclassgc.. I have a case open with Sun, and I'll try to post a code change that will get around the JVM bug today until Sun can make a fix. By: Ruben Misrahi - rnmisrahi RE: Runtime crash of JVM 2004-10-26 12:48 Is this patch going to be part of the new version of Jasper? Where exactly are we supposed to make the suggested changes (tweaking). On the jasper sources and then recompile? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now