I am trying to create Jasper Report in Liferay portlet but I am getting below error:
Caused by: net.sf.jasperreports.engine.JRException: java.io.FileNotF
I think your .jasper file is not in your context path of application (Atleast the application is not finding it).
Are you sure the /report folder is in build path?? If not, add it to build path.
Otherwise try to use something like this JasperReport report = JasperCompileManager.compileReport("classpath:src/com/ztscorp/lms/reports/HibernateQueryDemoReport.jasper");
try this,
change
JasperReport report = JasperCompileManager.compileReport("src/com/ztscorp/lms/reports/HibernateQueryDemoReport.jrxml");
to
JasperReport report = JasperCompileManager.compileReport(new File("").getAbsolutePath()+"src/com/ztscorp/lms/reports/HibernateQueryDemoReport.jrxml");
Hope it helps,
-Anuj