graderzhy Posted August 14, 2006 Share Posted August 14, 2006 I am using jasper report engin, my program works fine as the appplication, but if I put it as an applet then it throw out this exception. by the way, I am using Tomcat5.5.17 net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files/*^1 errors I added rt.jar in the archive list of applet, it does not work. Any other suggestion? Thanks Link to comment Share on other sites More sharing options...
graderzhy Posted August 14, 2006 Author Share Posted August 14, 2006 More detailed error information: network: Connecting socket://192.168.101.45:1496 with proxy=DIRECTnetwork: Connecting http://localhost:8180/myApp/java.class with proxy=DIRECTnet.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:1. The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files/*^1 errors at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193) at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:131) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:211) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:197) Link to comment Share on other sites More sharing options...
graderzhy Posted August 15, 2006 Author Share Posted August 15, 2006 fixed this issue, it is due to the JRE not compatiable. As long as you have same JRE , it will works fine.:laugh: Link to comment Share on other sites More sharing options...
graderzhy Posted September 1, 2006 Author Share Posted September 1, 2006 This issue happened again after I change my JVM from 1.4 to 5.0. Any suggestion? Thanks Link to comment Share on other sites More sharing options...
teodord Posted September 1, 2006 Share Posted September 1, 2006 Hi, Do you have the jdt-compile.jar in the classpath of your application?If you do, the report compilation process should not be JDK dependant anymore.The mentioned JAR can be found under the /lib directory of our project. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
graderzhy Posted September 1, 2006 Author Share Posted September 1, 2006 Thanks for reply. I do have jdt-compiler-3.1.1.jar under class path. The problem is that if my application run as stand application , it is working fine. If run as applet, all other part is working fine, only this issue. I already put all my jar files in archive list. Also If I add this line in my code: JRProperties.setProperty(JRProperties.COMPILER_CLASS,"net.sf.jasperreports.engine.design.JRJavacCompiler"); It will complain "net.sf.jasperreports.engine.*" can not find. Again, if unintall my jvm1.5, and use jvm1.4, it is working fine. Any other suggestion? Thanks Link to comment Share on other sites More sharing options...
graderzhy Posted September 2, 2006 Author Share Posted September 2, 2006 By the way, I found some one already opened a bug report for this issue, I am not sure if this has been fixed or not? http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=12&id=9333 Thanks:( Link to comment Share on other sites More sharing options...
lucianc Posted September 4, 2006 Share Posted September 4, 2006 According to the bug report, it's been fixed in JasperReports 1.2.4. Regards,Lucian Link to comment Share on other sites More sharing options...
graderzhy Posted September 5, 2006 Author Share Posted September 5, 2006 But it seems that this issue is still there. Is there any special requirement to make it works? Or could you please suggest possible problem or where should I pay attention? Thanks Link to comment Share on other sites More sharing options...
graderzhy Posted September 5, 2006 Author Share Posted September 5, 2006 :P Post edited by: graderzhy, at: 2006/09/05 15:57 By the way, I am using jasper 1.2.5 or 1.2.6, I am assuming it will be OK since 1.2.4 already fixed that issue. But the problem is still there. net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:1. The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files/*^1 errors at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193) at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:105) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:211) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:197) :( :(Post edited by: graderzhy, at: 2006/09/05 16:12 Link to comment Share on other sites More sharing options...
graderzhy Posted September 5, 2006 Author Share Posted September 5, 2006 If I add following code : Code:JRProperties.setProperty(JRProperties.COMPILER_CLASS,"net.sf.jasperreports.engine.design.JRJavacCompiler"«»); The java.lang.Object issue is gone, but it will throw out following error: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:C:Program FilesMozilla FirefoxAccRollupReportTemplateV1_1157473502610_148891.java:4: package net.sf.jasperreports.engine does not existimport net.sf.jasperreports.engine.*;^C:Program FilesMozilla FirefoxAccRollupReportTemplateV1_1157473502610_148891.java:5: package net.sf.jasperreports.engine.fill does not existimport net.sf.jasperreports.engine.fill.*;^C:Program FilesMozilla FirefoxAccRollupReportTemplateV1_1157473502610_148891.java:14: package net.sf.jasperreports.engine does not existimport net.sf.jasperreports.engine.*;^C:Program FilesMozilla FirefoxAccRollupReportTemplateV1_1157473502610_148891.java:15: package net.sf.jasperreports.engine.data does not existimport net.sf.jasperreports.engine.data.*;^C:Program FilesMozilla FirefoxAccRollupReportTemplateV1_1157473502610_148891.java:21: cannot find symbolsymbol: class JREvaluatorpublic class AccRollupReportTemplateV1_1157473502610_148891 extends JREvaluator ^...... ^C:Program FilesMozilla FirefoxAccRollupReportTemplateV1_1157473502610_148891.java:160: cannot find symbolsymbol : class JRFillVariablelocation: class AccRollupReportTemplateV1_1157473502610_148891 variable_positionPRTTotal = (JRFillVariable)vm.get("positionPRTTotal"); ^100 errors at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193) at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:105) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:211) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:197) aPost edited by: graderzhy, at: 2006/09/05 17:04 Link to comment Share on other sites More sharing options...
graderzhy Posted September 5, 2006 Author Share Posted September 5, 2006 Then I have to put jasperreport.jar file in the ext subdirectory of java_home/jre/lib/ But doing this is is not a solution for applet. Since the only way to put jar files for applet is by ac=rhive list. what confuse me here is that I have jasper1.2.6 jar in the archive list and I can see it downloaded to the local. But for some reason it can not be found by the jasper enginee. I know we can supply a class path to jaser by : System.setProperty("jasper.reports.compile.class.path",compile_path); But if it is applet, then how it works? Any help or suggestion will be apprecaited. Thanks:( :( Post edited by: graderzhy, at: 2006/09/05 22:43Post edited by: graderzhy, at: 2006/09/05 22:49 Link to comment Share on other sites More sharing options...
graderzhy Posted September 6, 2006 Author Share Posted September 6, 2006 By the way this is my archive jar list of my applet which is related to report <applet archive="./jar/report/jasperreports-1.2.6.jar,./jar/report/commons-javaflow-20060411.jar,./jar/report/groovy-all-1.0-beta-10.jar,./jar/report/jakarta-bcel-20050813.jar,./jar/report/jrpl.jar,./jar/report/xml-apis.jar,./jar/report/commons-beanutils-1.5.jar,./jar/report/commons-collections-2.1.jar,./jar/report/commons-digester-1.7.jar,./jar/report/hsqldb-1.7.1.jar,./jar/report/itext-1.3.1.jar,./jar/report/jcommon-1.0.0.jar,./jar/report/jdt-compiler-3.1.1.jar,./jar/report/jfreechart-1.0.0.jar,./jar/report/poi-2.0-final-20040126.jar,./jar/report/servlet.jar,./jar/report/xalan.jar,./jar/report/xercesImpl.jar,./jar/report/ant-1.5.1.jar,./jar/report/jasperreports-1.2.6-applet.jar,...... Link to comment Share on other sites More sharing options...
lucianc Posted September 6, 2006 Share Posted September 6, 2006 The fix you mentioned was for the JDT report compiler, you shouldn't use the javac compiler as it requires a classpath, while the JDT compiler uses the context class loader. This seems to be caused by something else. Don't actually know what. Check your applet for older JR jars. Also delete the applet cache. Regards,Lucian Link to comment Share on other sites More sharing options...
graderzhy Posted September 6, 2006 Author Share Posted September 6, 2006 I found the issue, I have fixed it. ThanksPost edited by: graderzhy, at: 2006/09/06 18:33Post edited by: graderzhy, at: 2006/09/06 19:00 Link to comment Share on other sites More sharing options...
maewonline Posted September 10, 2006 Share Posted September 10, 2006 What is the solution??? Thanks In Advance Link to comment Share on other sites More sharing options...
maewonline Posted September 10, 2006 Share Posted September 10, 2006 Please can you clarify how you have solved it Thanks Link to comment Share on other sites More sharing options...
isucic Posted September 25, 2006 Share Posted September 25, 2006 I'm facing the same problem. Can you please post the solution?Tnx! Link to comment Share on other sites More sharing options...
isucic Posted September 26, 2006 Share Posted September 26, 2006 Can you please explain how to solve this?I have the same problem and it is pretty urgent!:( Thnx! Link to comment Share on other sites More sharing options...
isucic Posted September 27, 2006 Share Posted September 27, 2006 Can you please explain how to solve this? I have the same problem and it is pretty urgent!:( :( :( :( Thnx! Link to comment Share on other sites More sharing options...
totalylouco Posted November 30, 2006 Share Posted November 30, 2006 I also Have this problem, in my jsp/html, I include the jdtcompiler-3.1.1 and Im Using Java 5 and When I try to run the applet directly from a HTML (by double click) it works just fine, when I put the location in the browser and it goes trought the apache tomcat 5.5 server I the the error:JRException. Errors were encountered when compiling report expressions class file: I would really apreciate some help, Im geting desperate. thanks Link to comment Share on other sites More sharing options...
aboaventura Posted May 26, 2007 Share Posted May 26, 2007 Hi ! One more member joinning "type java.lang.Object cannot be resolved" Club ! :) Did anyone else solve this problem ? Or, perhaps, our friend graderzhy can help us. Thank you. Link to comment Share on other sites More sharing options...
mcorsen Posted September 6, 2007 Share Posted September 6, 2007 Signing all of your jars is one solution that works for us. Link to comment Share on other sites More sharing options...
mcorsen Posted September 6, 2007 Share Posted September 6, 2007 graderzhy, you're an inconsiderate $#%@*!. Link to comment Share on other sites More sharing options...
NickyDavid Posted December 4, 2007 Share Posted December 4, 2007 Can you please tell us what the solution to this problem is? Thanks. 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