2002 JI Open Discussion Posted August 19, 2006 Share Posted August 19, 2006 By: Joanne Corless - jocorless Failure to compile as a java class in Struts 2003-12-10 09:58 Hi, I've read all the samples and documentation and think I must be a bit thick but I am having trouble getting my ReportManager class to compile reports. The error I am getting is : 2003-12-10 12:33:20,928 DEBUG [org.apache.tomcat.util.threads.ThreadPool] Getting new thread data 2003-12-10 12:33:36,661 ERROR [sTDERR] D:jboss-3.2.2RC4inaudit_trail.java:4: package dori.jasper.engine does not exist 2003-12-10 12:33:36,801 ERROR [sTDERR] import dori.jasper.engine.*; 2003-12-10 12:33:36,801 ERROR [sTDERR] ^ 2003-12-10 12:33:36,811 ERROR [sTDERR] D:jboss-3.2.2RC4inaudit_trail.java:5: package dori.jasper.engine.fill does not exist 2003-12-10 12:33:36,811 ERROR [sTDERR] import dori.jasper.engine.fill.*; 2003-12-10 12:33:36,811 ERROR [sTDERR] ^ 2003-12-10 12:33:36,881 ERROR [sTDERR] D:jboss-3.2.2RC4inaudit_trail.java:17: cannot resolve symbol 2003-12-10 12:33:36,881 ERROR [sTDERR] symbol : class JRCalculator 2003-12-10 12:33:36,881 ERROR [sTDERR] location: class audit_trail 2003-12-10 12:33:36,881 ERROR [sTDERR] public class audit_trail extends JRCalculator 2003-12-10 12:33:36,881 ERROR [sTDERR] ^ 2003-12-10 12:33:36,881 ERROR [sTDERR] D:jboss-3.2.2RC4inaudit_trail.java:24: cannot resolve symbol 2003-12-10 12:33:36,881 ERROR [sTDERR] symbol : class JRFillParameter 2003-12-10 12:33:36,881 ERROR [sTDERR] location: class audit_trail 2003-12-10 12:33:36,881 ERROR [sTDERR] private JRFillParameter parameter_REPORT_CONNECTION = null; 2003-12-10 12:33:36,881 ERROR [sTDERR] ^ 2003-12-10 12:33:36,891 ERROR [sTDERR] D:jboss-3.2.2RC4inaudit_trail.java:25: cannot resolve symbol 2003-12-10 12:33:36,891 ERROR [sTDERR] symbol : class JRFillParameter 2003-12-10 12:33:36,921 ERROR [sTDERR] location: class audit_trail 2003-12-10 12:33:36,921 ERROR [sTDERR] private JRFillParameter parameter_REPORT_PARAMETERS_MAP = null; 2003-12-10 12:33:36,921 ERROR [sTDERR] ^ 2003-12-10 12:33:36,921 ERROR [sTDERR] D:jboss-3.2.2RC4inaudit_trail.java:26: cannot resolve symbol 2003-12-10 12:33:36,921 ERROR [sTDERR] symbol : class JRFillParameter 2003-12-10 12:33:36,921 ERROR [sTDERR] location: class audit_trail 2003-12-10 12:33:36,921 ERROR [sTDERR] private JRFillParameter parameter_REPORT_DATA_SOURCE = null; 2003-12-10 12:33:36,921 ERROR [sTDERR] ^ I simply just don't understand why I should get this problem as the jasper jar is in the WEB-INFlib directory of the webapp as well as being in the lib directory of the server in JBOSS. The code I am using is : String pathToFile = getFilePath(reportName); System.setProperty("jasper.reports.compile.temp", ApplicationProperties.getProperty("compiledReportDir")); JasperCompileManager.compileReportToFile(pathToFile); The path to the file is on my local drive as this is similar to how the report xml files are loaded within the production system. The idea is to allow users to be able to upload, compile and publish reports to other users based on user privileges. This will be run from within a workflow application built on struts. Therefore I need a java class that can have a struts action wrapper. Any clues as to my problem will be much appreciated Regards Jo Corless By: Honghai Zhang - haroldzhang RE: Failure to compile as a java class in Struts 2003-12-10 10:26 I have the same problem when I try to compile reports in a struts app deployed on Weblogic Server v6.1 By: Tom - tomage RE: Failure to compile as a java class in Struts 2003-12-10 15:29 Hi, Be sure to also set the classpath for the compilation: System.setProperty("jasper.reports.compile.class.path", reportClasspath); Tom By: Joanne Corless - jocorless RE: Failure to compile as a java class in Struts 2003-12-11 03:08 I've tried adding the classpath using an absolute reference but this doesn't seem to make any difference. Does it have anything to do with application context? I've noticed that both the relevant examples I've looked at (the Servlet and the JSP) both run the compile from within an application context whereas I will be compiling reports located in an external (to the Server) directory. Regards Jo Corless By: Tom - tomage RE: Failure to compile as a java class in Struts 2003-12-11 08:25 Hi Jo, I have been using an absolute reference. Here is the entry from my properties file: jasper.reports.compile.class.path=Q:SIMPLETRADE2libjasperreports-0.5.0.jar Tom By: Joanne Corless - jocorless RE: Failure to compile as a java class in Struts 2003-12-12 08:13 Thanks Guys for all your help, typically it was a stupid mistake that was causing my problem, I wasn't referencing the jar file correctly, I was only pointing to its directory rather than the file itself Jo Corless 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