2004 IR Help Posted August 23, 2006 Share Posted August 23, 2006 By: Dmitry Beransky - dberansky webstart 2005-05-13 12:39 I'm using the latest version of jasperreports which is supposed to use current context's classloader for compiling reports. Though, I'm still getting errors like: SEVERE: java.lang.RuntimeException: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: C:Documents and SettingsdberanskyDesktopiap_payee_by_mg_div.java:4: package net.sf.jasperreports.engine does not exist import net.sf.jasperreports.engine.*; when running my app via WebStart. What am I missing? Thanks Dmitry By: Yosh - yosh_ger RE: webstart 2005-08-11 10:39 Is anything signed correctly and did it work before? Maybe you should try to load all jars regarding jasper as "eager" in the jnlp... (it is at least worth a try). AND: Did you add or upgrade the depending jars also if you're doing compiling on the webstart application??? Some version numbers changed ... see the -project.zip file! By: Tom Jahncke - tjahncke RE: webstart 2005-08-11 11:58 Thank you for the quick reply. Everything is signed correctly. My jars are being downloaded as "eager" I believe if I had a .jasper file instead of starting with the .jrxml this would work. However, I am dynamically building the .jrxml so start with the .jasper is not an option. I am not sure what you meant by: "Did you add or upgrade the depending jars also if you're doing compiling on the webstart application??? Some version numbers changed ... see the -project.zip file!" I have the japserReports.jar listed in the .jnlp file. Here are some more details of my error: JRException Errors were encountered when compiling report expressions class file: D:wmswmsSEwebstartTemplateReport.java:4: package net.sf.jasperreports.engine does not exist import net.sf.jasperreports.engine.*; ^ Any help is greatly appreicated. By: Yosh - yosh_ger RE: webstart 2005-08-11 12:09 hmmm... sounds weird then. What I meant was, that usually xml-compiling etc. needs alot more libraries plus itext etcetc.... so I thought, that this error maybe is some kind of hidden, nasted stuff... webstart SOMETIMES lies about truth - that's what I realized in my current project... but anyway... Did the webstart - Application run before with an earlier verison of Jasper? And ... how does it come, that your Webstart-Path is non windows-sun-standard... you customized the path? And finally: what kind of .java is it... is this .java NOT from webstart but out of your project??? :-) Questions over questions... :-) Thorsten By: Tom Jahncke - tjahncke RE: webstart 2005-08-11 12:35 Hi Thorsten, I do have itext.jar and the other dependant jars for jasper in the jnlp. It has not worked in the past. This aspect of the project is pretty new development. My path is not the standard path because for my quick testing I don't really have a web server running I just have the jnlp file on my harddrive and point to this through I.E. The .java file I believe is generated from jasper when I compile the xml file I have created. It seems that when jasper compile this file it normally has the classpath of the application, however, for some reason with webstart it is not able to use the same classpath. Thanks, Tom By: C-Box - c-box RE: webstart 2005-08-17 22:56 Hi guys... if the JAVAC compiling is your only problem why don't you switch to JDTCompiler that doesn't create any temporary files... should work. It's much faster, even! just try it. hth C-Box By: Tom Jahncke - tjahncke RE: webstart 2005-08-11 08:53 I am getting the exact same error. I am wondering if when running webstart if dynamically creating and compiling classes is not allowed. It appears that at a minimum the jasperReports.jar is not in the classpath when trying to compile the temporary file that was created. By: Yosh - yosh_ger RE: webstart 2005-08-17 13:28 hehe... this runs into some WebStart-Problems I struggled about just some weeks before. If this is "connected" to compiling there's indeed a security block regarding dynamic compiling with javac... Some things to check: - set the SecurityManager to (null) right before. How is the created class loded or does it not compile (!) at all... Webstart sometimes seems to be a BEAST (ok - some call it SECURITY :-) ) regarding classloading, class compiling etcetc... Hints could also lead to URL-Stuff or similar... Thorsten By: Frank - tbk666 RE: webstart 2005-10-19 05:41 I arrived at the same problem today, I cannot compile a report with an application deployed via Webstart. Does any solution for this problem exist right now? Help is urgently needed, please! By: Tom Jahncke - tjahncke RE: webstart 2005-10-19 05:54 If you use the Jdt compiler instead of javac this works. Here is the line to set this: System.setProperty("jasper.reports.compiler.class", "net.sf.jasperreports.engine.design.JRJdtCompiler"); Will will also need to distribute the jdt-compiler.jar with your application. - Tom By: Frank - tbk666 RE: webstart 2005-10-19 07:20 Thank you very much for your fast answer! 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