my dog learned polymorphism*
The moose likes JSF and the fly likes failed to generate excel report using jasper report and JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "failed to generate excel report using jasper report and JSF " Watch "failed to generate excel report using jasper report and JSF " New topic
Author

failed to generate excel report using jasper report and JSF

Gazol Chand
Greenhorn

Joined: Jul 26, 2011
Posts: 2
Hi All,

I have a problem regarding generating Excel report using Jasper report and JSF. I am sending the error which I found in my code.

javax.faces.FacesException: #{backing_AdminReportAction.getJasperReport}: javax.faces.el.EvaluationException: java.lang.NoSuchMethodError: org.apache.poi.hssf.usermodel.HSSFWorkbook.getCreationHelper()Lorg/apache/poi/ss/usermodel/CreationHelper;
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:103)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:250)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:207)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:161)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)



my code to generate the excel report..

vpath = ctx.getRealPath("/reports/Report1.jrxml");
spath = ctx.getRealPath("/reports/Report1.xls");
jasperReport = JasperCompileManager.compileReport(vpath);
jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, connection);
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
OutputStream outputfile= new FileOutputStream(new File(spath));
JRXlsExporter exporterXLS = new JRXlsExporter();
exporterXLS.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporterXLS.setParameter(JRExporterParameter.OUTPUT_STREAM, outputfile);
exporterXLS.exportReport();

I am using Jarper report 3.7.6..

I am using the JAR Files

poi 3.6.jar
jxl-2.6.jar

I think there is a method that is not found in the poi jar. Can anyone tell me what is the problem???what is the exact jar files I have to include???which jar files are dependent with the poi jar file and their exact version???

My excel file is being created but with no data.....Help needed as early as possible....


Thanks & Regards
Swarup Choudhury
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: failed to generate excel report using jasper report and JSF
 
Similar Threads
Error loading the index.jsp with OC4J
bothersome ServletException
possible Reasons for following Error
How to Reterive Row Data in JSF
getting nullPointerException on line upload.parseRequest(request);