Jump to content
Changes to the Jaspersoft community edition download ×

JasperCompileManager compile bug


Recommended Posts

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

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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



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.


Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...