2004 IR Help Posted August 20, 2006 Share Posted August 20, 2006 By: Patrick J. Nolan, Jr. - patjnolan Problems compiling .jasper file 2005-03-04 08:50 The (on-the-fly) generated .java file ("DataSourceReport.java") cannot resolve the jasper imports. I have no idea why this is happening. The weird thing is, when I run a JUnit test that executes JasperCompileManager.compileReportToFile everything works beautifully. I get the errors below when I try to either 1) deploy the code with JasperCompileManager.compileReportToFile to the appserver and execute that code, and 2) take out the compilation code and make ant do the compilation. Both of these scenarios produce the package resolution exception shown below. I believe this is a classloading issue.. but not sure how to resolve it. Any ideas? Ant produces this error: C:eclipseworkspaceFPIFPIJavaSourcefpi-websitefpi-servicesrcjavacomfpiserviceimpljrxmlDataSourceReport.java:4: package net.sf.jasperreports.engine does not exist import net.sf.jasperreports.engine.*; ^ Here is the ant block for compiling the .jasper file: <jrc srcdir="${maven.src.dir}/java/com/fpi/service/impl/jrxml" destdir="${maven.src.dir}/java/com/fpi/service/impl/jrxml" keepjava="true" xmlvalidation="true" tempdir="${maven.src.dir}/java/com/fpi/service/impl/jrxml" compiler="net.sf.jasperreports.engine.design.JRJavacCompiler"> <src> <fileset dir="${maven.src.dir}/java/com/fpi/service/impl/jrxml"> <include name="**/*.jrxml"/> </fileset> </src> </jrc> 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