a.merghani Posted May 19, 2015 Share Posted May 19, 2015 Dears,I have nested java project which use jasper report to generate some reports. The project structure is like this:-WebProject (web application)-JasperProject(java application)I added the JasperProject to build path. I test the JasperProject and it works perfect.When I tried to test the same functinality from WebProject it throw this exception:May 18, 2015 8:33:56 PM org.apache.catalina.core.StandardWrapperValve invokeSEVERE: Servlet.service() for servlet [sd.nctr.e15.gui.AJAX_Data] in context with path [/E15] threw exceptionjava.lang.NullPointerException at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:517) at sd.nctr.e15.generator.JasperReportFill.filler(JasperReportFill.java:89) at sd.nctr.e15.generator.access.ReceiptData.generate(ReceiptData.java:152) at sd.nctr.e15.gui.IssuingReceipt.generateE15(IssuingReceipt.java:256) at sd.nctr.e15.gui.AJAX_Data.doPost(AJAX_Data.java:309) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722)I tried to make the JasperProject withen WebProject as one project but the same exception. My question is: Is there any problem the Jasper report to work from Web Application or from Servlet?? Link to comment Share on other sites More sharing options...
abc.hegde Posted May 19, 2015 Share Posted May 19, 2015 As per my knowledge, it works in web projects as well. I suspect, it is not finding the template to fill. Where you have kept the template? Link to comment Share on other sites More sharing options...
a.merghani Posted May 19, 2015 Author Share Posted May 19, 2015 Thanks for your reply. The template kept in the JasperProject. As mentioned before, I have nested projects. I have Web application that call JasperProjectto do the generation. Again, it works within the JasperProject which is stand alone java application. Link to comment Share on other sites More sharing options...
hozawa Posted May 20, 2015 Share Posted May 20, 2015 You probably didn't setup the web.xml correctly.There also should be a "caused by" clause further down your log. Check what it says. Link to comment Share on other sites More sharing options...
Solution a.merghani Posted May 20, 2015 Author Solution Share Posted May 20, 2015 Dears all,Thanks to all for your replies After painfull tracing of the peroblem, finally, I solved the prolem. It was casued by conflict in the included library in the WebProject. There was 2 lib for jasper with deff version.regards 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