unable load jasperreports using java application
I have created a report using jasperassistant.
But i could'nt run the report using my java
application.below given is the code sgment to call the
report.
_______________________________________________
try{
String rFile="/root/Production.jasper";
HashMap rptHash=null;
FileInputStream fs=new FileInputStream(rFile);
System.out.println("loading report file , read " +fs.available());
JasperReport template=(JasperReport)JRLoader.loadObject(fs);
System.out.println("Successfully created the report");
JasperPrint report=JasperFillManager.fillReport(template,rptHash,conn);
System.out.println("Report filled with data");
}catch(JRException jex)
{
System.out.println("Jasper Exception :"+jex.getMessage());
System.out.println("Jasper Exception :"+jex.fillnStackTrace());
System.out.println("Jasper Exception :"+jex.getStackTrace());
System.out.println("Jasper Exception :"+jex.getLocalizedMessage());
}
___________________________________________________
While running this application ,it throws into the
exception section.
Out put of the program is
Loading report file ,read 15275
Jasper Exception : Error loading object from InputStream
Jasper Exception :net.sf.jasperreports.engine.JRException :Error loading object from InputStream Jasper Exception :[Ljava.lang.StackTraceElement;@e7b241
Jasper Exception :Error loading object from InputStream
I request you to go through my code and give me some help to solve this asap.
thanking you