godbole Posted January 14, 2009 Share Posted January 14, 2009 Hello,Very often I get a null pointer exception (pasted below), when opening files. If I close iReport (v3.1.1) and open the file in some other viewer and after some time open iReport again, the file opens up! I cannot understand what is going on... this happens even if I've properly saved files and closed iReport. Also sometimes when closing iReport, it shows me a dialog box that some files are unsaved even when I've no files open. I'm perplexed by this problem... Please help!!The following is the stack trace from the null pointer:Error loading the report template Message: net.sf.jasperreports.engine.JRException: java.lang.NullPointerExceptionLevel: SEVEREStack Trace:java.lang.NullPointerException net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243) net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226) net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214) com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:80) com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:485) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)Error at line 204 char 19: null org.apache.commons.digester.Digester.createSAXException(Digester.java:2919) org.apache.commons.digester.Digester.createSAXException(Digester.java:2945) org.apache.commons.digester.Digester.startElement(Digester.java:1364) com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source) com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) org.apache.commons.digester.Digester.parse(Digester.java:1647) net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:239) net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226) net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214) com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:80) com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:485) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)Many thanks! Link to comment Share on other sites More sharing options...
thanosk Posted January 14, 2009 Share Posted January 14, 2009 I am having an identical problem and it happens when I add Greek text to a static text field.Maybe some wierd UTF-8 conversion problem ?Any ideas how to avoid this ? Link to comment Share on other sites More sharing options...
ramandeep1980 Posted February 20, 2009 Share Posted February 20, 2009 Hi,I am also having this problem for not any good reason.I just transferred the working JRXML from one computer to another and when opened in that another computer i got this problem.Also it start giving same problem in previous computer also. So that JRXML is almost destroyed coz it is not working in either of the system.Any god reason for this ??I hope someone can rvert on this issue RegardsRaman Error loading the report template Message: net.sf.jasperreports.engine.JRException: java.lang.NullPointerExceptionLevel: SEVEREStack Trace:java.lang.NullPointerException net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243) net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226) net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214) com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:81) com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:488) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)Error at line 280 char 19: null org.apache.commons.digester.Digester.createSAXException(Digester.java:2919) org.apache.commons.digester.Digester.createSAXException(Digester.java:2945) org.apache.commons.digester.Digester.startElement(Digester.java:1364) com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source) com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) org.apache.commons.digester.Digester.parse(Digester.java:1647) net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:239) net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226) net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214) com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:81) com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:488) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) Link to comment Share on other sites More sharing options...
godbole Posted February 23, 2009 Author Share Posted February 23, 2009 Hi Raman,I've solved this problem (sort of), so that now 99% of the time, I do not get a null pointer exception. Here is what I did, In iReport, go to View > Toolbars > Memory. This turns on a button-like memory toolbar. Clicking on this toolbar, forces garbage collection to occur freeing up some memory and possibly some locks on files that were opened in that session (this is my guess). So I make it a habit to frequently run the garbage collect especially before closing the file and before opening a new one. This is also the first thing I do after starting up iReport.I found that this has considerably reduced the null pointers (99% things work fine now) and if there is still a null pointer, just close iReport and reopen after 15 mins or so (make sure to force garbage collection before closing and after opening). The file usually is not damaged, its just some sort of a lock on it that stops the file from opening in another application too.Hope this helps!Rajeshwari Link to comment Share on other sites More sharing options...
ramandeep1980 Posted February 23, 2009 Share Posted February 23, 2009 Hi Rajeshwari,Thank you for your help.I hope it will work :-).It was happening quite often on my system and some how after a while it start working.I think jasper people shud mention something about this problem.Regards,Raman 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