christiaan_se Posted May 3, 2007 Share Posted May 3, 2007 Hi,we are migrating from version 1.2.6 to 1.3.3. When we try to compile a JasperDesign which was stored in 1.2.6 using JRSaver.saveObject() (to save the report to a stream) we get the following Nullpointer exception. Is this a bug or should we use a different approach?: java.lang.NullPointerException at net.sf.jasperreports.engine.design.JRDesignDataset.getSortFields(JRDesignDataset.java:521) at net.sf.jasperreports.engine.design.JRVerifier.verifySortFields(JRVerifier.java:708) at net.sf.jasperreports.engine.design.JRVerifier.verifyDataset(JRVerifier.java:2372) at net.sf.jasperreports.engine.design.JRVerifier.verifyDesign(JRVerifier.java:213) at net.sf.jasperreports.engine.design.JRVerifier.verifyDesign(JRVerifier.java:183) at net.sf.jasperreports.engine.design.JRAbstractCompiler.verifyDesign(JRAbstractCompiler.java:257) at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:144) at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:105) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:212) kind regards,Christiaan [file name=reportsaved.txt size=7857]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/reportsaved.txt[/file]Post edited by: christiaan_se, at: 2007/05/03 15:11 Link to comment Share on other sites More sharing options...
Teodor Danciu Posted May 3, 2007 Share Posted May 3, 2007 Hi, This is a bug. It will be solved in a future release.If you want to workaround it, you can use 1.2.6 to load the JasperDesign objects and then export them to JRXML format. Then with 1.3.3, you load them from JRXML and serialize again. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
christiaan_se Posted May 4, 2007 Author Share Posted May 4, 2007 Thanks. Btw, do you recommend saving JasperDesign to xml instead of serializing the object for compatibility reasons? kind regards,Christiaan Link to comment Share on other sites More sharing options...
Teodor Danciu Posted May 10, 2007 Share Posted May 10, 2007 Hi, Yes, I think storing JRXML it is safer. It is like keeping the source file. This bug was solved in the head version on SVN. Thank you,Teodor 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