File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes recieving this exception for iText Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "recieving this exception for iText" Watch "recieving this exception for iText" New topic
Author

recieving this exception for iText

ash chowdary
Greenhorn

Joined: Apr 23, 2009
Posts: 16
hi all,
am trying to display a pdf by adding few values to PDFForm. but am recieving this error.

java.lang.NoClassDefFoundError: com.itextpdf.text.pdf.PdfReader
at simplePDF.doPost(simplePDF.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)


i've added all required jars. can any one help on this???
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Do the Jars you have added contain the class com.itextpdf.text.pdf.PdfReader?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
ash chowdary
Greenhorn

Joined: Apr 23, 2009
Posts: 16
yes...when i run it in as stand alone java program its executing. but giving exception when am trying it in web application.
James Sabre
Ranch Hand

Joined: Sep 07, 2004
Posts: 781

ash chowdary wrote:
i've added all required jars. can any one help on this???


Where and how have you added the jars? They need to be in the WEB-INF/lib directory in your war file.


Retired horse trader.
 Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
Deepakkumar Devarajan
Ranch Hand

Joined: Apr 19, 2011
Posts: 54

ash chowdary wrote:yes...when i run it in as stand alone java program its executing. but giving exception when am trying it in web application.


I guess you added all Jar files to class path so wen you execute the file using command prompt it executes successfully.

I think you have not added the jar files to the Project Library so when you excute it as a web app, it throws error. If you are using eclipse Right clcik on the project, Select Properties,Select Java Build Path, Select Libaray Tab and then add all the required libraries.


Regards,
Deepakkumar Devarajan
ash chowdary
Greenhorn

Joined: Apr 23, 2009
Posts: 16
thanks...resolved.

previously, i didn't add libraries in lib folder. i just added them in class path. when i added them in lib, now am able to see the pdf opened. but what am doing is , am trying to pre fill values in pdf.


but, its not displaying the content which i added for city and state.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: recieving this exception for iText
 
Similar Threads
Error Urgent PleaseHelp
Getting error when migrated the was 5.1 to 6.1
OutOfMemoryError in WAS6.1
javax.xml.ws.WebServiceException: java.net.SocketTimeoutException: Async operation timed out
javax.xml.ws.WebServiceException: java.net.SocketTimeoutException: Async operation timed out