2004 IR Help Posted August 22, 2006 Share Posted August 22, 2006 By: mraees - mraees_vk Unable run jasperreports using java applicati 2005-06-11 00:24 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 give me the asap. thanking you 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