2006 IR Open Dicussion Posted August 27, 2006 Share Posted August 27, 2006 By: teepee - tpatzner JDT internal compiler error at runtime 2006-07-05 18:31I'm a bit confused about this JDT compiler jar. When I don't have it in my WEB-INF/lib directory, I get the following error: package net.sf.jasperreports.engine does not exist When I have the jdt-compiler-3.1.1.jar in my WEB-INF/lib directory, I get the following: java.lang.NoSuchFieldError: org.eclipse.jdt.internal.compiler.ast.TypeReference: field VoidBinding not found at org.eclipse.jdt.internal.compiler.ast.TypeReference.baseTypeReference(TypeReference.java:40) at org.eclipse.jdt.internal.compiler.parser.Parser.getTypeReference(Parser.java:7863) at org.eclipse.jdt.internal.compiler.parser.Parser.consumeMethodHeaderName(Parser.java:3893) at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:4805) at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:8491) at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:8656) at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:8621) at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:7420) at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:289) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:315) at net.sf.jasperreports.engine.design.JRJdtCompiler.compileUnits(JRJdtCompiler.java:462) at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:190) at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:105) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:211) The error happens on this line of code: JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); I'm using JR 1.2.4 and jdk 1.4.2 Please help if you can. Many Thanks, TP By: Lucian Chirita - lucianc RE: JDT internal compiler error at runtime 2006-07-06 06:17It seems that you have two versions of the JDT classes on your classpath. Can you check your application's classpath for this? What server are you using? Regards, Lucian By: teepee - tpatzner RE: JDT internal compiler error at runtime 2006-07-09 21:41Thank You Lucian, You are correct. I had the jdt-compiler-3.1.1.jar in my WEB-INF/lib directory AND this in the classpath: C:/Program Files/IBM/WebSphere Studio/Application Developer/v5.1/eclipse/plugins/org.eclipse.jdt.source_2.1.1/src By: teepee - tpatzner RE: JDT internal compiler error at runtime 2006-07-10 01:00A more complete answer: When I took the extra jdt-compiler jar out of my WEB-INF/lib directory, I still had the "package net.sf.jasperreports.engine does not exist" error. This is because I am using WSAD and it's not good enough just to put your jasper jar into your WEB-INF/lib directory. I had to explicitly set the jasper.reports.compile.class.path system variable to point to my jasper jar. Then it worked, no worries! Link to comment Share on other sites More sharing options...
neian Posted January 23, 2007 Share Posted January 23, 2007 hello, I am also getting the same error as you did with WSAD. where did you set the jasper system variable classpath to recognize the jasper report jar files? is it also in WSAD? Link to comment Share on other sites More sharing options...
zoran_2 Posted November 27, 2014 Share Posted November 27, 2014 This is missing: String h = Constants.APPLICATION_WEB_INF_PATH;System.setProperty("jasper.reports.compile.class.path", h + "lib/jasperreports-0.6.1-processing.jar;" + h + "lib/commons-digester.jar;" + h + "classes;" + h + "lib/reports-web-src-0.1.8.jar;" + h + "lib/reports-common-src-0.1.8.jar;" + h + "lib/struts.jar;"+h+"lib/commons-lang-2.1.jar;");If you read:System.getProperty("jasper.reports.compile.class.path");you will get only jasper jar file, but if inside .jrxml you use other libraries, and you want to make compile on runtime (as me on websphere), you need to add all required libraries on above system property 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