Poonam Pose

Greenhorn
+ Follow
since Dec 25, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Poonam Pose

Did you find any soultion for the same??
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 );

}
}
14 years ago