hi,
im trying to integrate JasperReport with portlet. when i try to execute my portlet on server (portal server 5.1) i get foolowing error:
org.apache.commons.logging.LogConfigurationException:
java.lang.ClassCastException: com.ibm.ws.commons.logging.TrLogFactory
Code ::
public void processAction(ActionRequest request, ActionResponse response) throws PortletException, java.io.IOException {
String realPath = getPortletContext().getRealPath("/WEB-INF/report/HelloWorld.jrxml");
if (realPath == null)
throw new IOException("Cannot access war file content");
File file = new File(realPath);
if (!file.exists())
throw new IOException("File " + "/WEB-INF/report/HelloWorld.jrxml" + " does not exist");
else{
JasperDesign jasperDesign = null;
System.out.println("Try");
JasperReport jasperReport = null;;
try {
jasperDesign = JRXmlLoader.load(new FileInputStream(file));
jasperReport = jasperCompileManager.compileReport(jasperDesign);
} catch (Exception e) {
// TODO Auto-generated catch block
System.out.println("error1 " + e);}
if ( jasperReport == null)
System.out.println("Not Complied");
else{HashMap parameterMap = new HashMap();
System.out.println("Poonam");
try {
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameterMap , new JREmptyDataSource());
JasperViewer.viewReport(jasperPrint,false);} catch (Exception e) {
System.out.println("error2 " + e);
}
}
//createReport(request,jasperPrint );
}
}