LORDs_diakonos Posted April 27, 2007 Share Posted April 27, 2007 I am getting java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.CompilationResult.getErrors()at net.sf.jasperreports.engine.design.JRJdtCompiler$2.acceptResult(JRJdtCompiler.java:418) The report is throwing a compile error as it should but I shouldn't get the no such method. I am using jasperreports 1.3.2. I placed jdt-compiler-3.1.1.jar which is included in teh project downlaod in teh lib directory on my classpath. I am running in tomcat 5. Problem is cause it is a no suchmethod i cannot even catch it it just dies :-( Link to comment Share on other sites More sharing options...
Teodor Danciu Posted April 27, 2007 Share Posted April 27, 2007 Hi, Can you be more specific about the Tomcat version you are using?Tomcat comes with a JDT Java compiler of its own, which probably has priority within classpath. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
LORDs_diakonos Posted April 27, 2007 Author Share Posted April 27, 2007 5.0.28 It is a tomcat that is bundled with an older version of liferay. DO you know where th other jdt compiler would be. I looked but didn't see it. Also How else can i accomplish the building of the report? I have a jrxml and I am trying to compile and save a jasper file to the filesystem which is why I am using compiletofile(). The other compilers only have compile(JasperDesign)?? not to file. Link to comment Share on other sites More sharing options...
Teodor Danciu Posted April 27, 2007 Share Posted April 27, 2007 Hi, I looked into the official Tomcat 5.0.28 distribution and indeed does not seem to contain the JDT Java compiler (more recent versions do).However, this is clearly a JDT version mismatch problem caused by a different JDT present in the classpath somewhere.But first of all, you need to be sure you really want to compile report templates at runtime. Most of the times, you don't need that, since you can compile them at application build time and only deploy *.jasper files with your application, just like you deploy *.class files and not *.java files. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
LORDs_diakonos Posted April 27, 2007 Author Share Posted April 27, 2007 Well I did find another jar providing the jdt compiler. I want to store the jrxml and jasper files on my app. We are not using the jasperserver becuase we require tighter integration into our cms then is easily provided and I want to save teh jrxml in case people ever need access to it to modify it. Once I have a JasperReport object how can I save it to a file? Link to comment Share on other sites More sharing options...
Teodor Danciu Posted April 27, 2007 Share Posted April 27, 2007 Hi, You can serialize JasperReport objects to files on disk using the JRSaver class that comes with the library. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
LORDs_diakonos Posted April 27, 2007 Author Share Posted April 27, 2007 Very much thank you. I got the compilermanager to work though as fixing the classpath helped that. I appreciate your help here. Thank you 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