Run jasper report from servlet

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 invoke SEVERE: Servlet.service() for servlet [sd.nctr.e15.gui.AJAX_Data] in context with path [/E15] threw exception java.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??

--------------
Ahmed Merghani
0918010995
LVL 8
Ahmed MerghaniSoftware EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ahmed MerghaniSoftware EngineerAuthor Commented:
Dears all,

Thanks to all for your replies After painful tracing of the problem, finally, I solved the problem. It was caused by conflict in the included library in the WebProject. There was 2 lib for jasper with deff version.

regards

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.