That's a JVM internal error. If the jar is of the same version and is not corrupt it's time to ask IBM what's going on.
Paulo ----- Original Message ----- From: "Feld, David E" <[EMAIL PROTECTED]> To: "Post all your questions about iText here" <[email protected]> Sent: Wednesday, May 09, 2007 6:22 AM Subject: Re: [iText-questions]ExceptionConverter:java.io.IOException:Thedocument has no pages. > So, I am finally able to see the full exception, you were right it was > the VerifyError that is being thrown and it is a Throwable and an > Exception therefore I wasn't catching it. So, here is the full stack > trace that I am getting. Now, I rebuilt the jar on the same server that > I am running this so the JDK levels should be the same. Is there > anything else I can look at? > > [5/8/07 19:20:12:390 CDT] 0000004a ServletWrappe E SRVE0068E: Could > not invoke the service() method on servlet PDFServlet. Exception thrown > : java.lang.VerifyError: (class: com/lowagie/text/pdf/PageResources, > method: translateName signature: > (Lcom/lowagie/text/pdf/PdfName;)Lcom/lowagie/text/pdf/PdfName;) > Expecting to find array of ints on stack > at com.lowagie.text.pdf.PdfDocument.initPage(Unknown Source) > at com.lowagie.text.pdf.PdfDocument.open(Unknown Source) > at com.lowagie.text.Document.open(Unknown Source) > at > gov.wisconsin.access.presentation.pdf.PrintMyInfo.buildByteArray(PrintMy > Info.java:191) > at > gov.wisconsin.access.management.util.PDFServlet.doProcess(PDFServlet.jav > a:93) > at > gov.wisconsin.access.management.util.PDFServlet.doGet(PDFServlet.java:39 > ) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja > va:1572) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap > per.java:762) > at > com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq > uestDispatcher.java:334) > at > gov.wisconsin.framework.presentation.controller.FwJSPServlet.doPost(FwJS > PServlet.java:420) > at > gov.wisconsin.framework.presentation.controller.FwJSPServlet.doGet(FwJSP > Servlet.java:262) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja > va:1572) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap > per.java:762) > at > com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheS > ervletWrapper.java:89) > at > com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:192 > 4) > at > com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:1 > 12) > at > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminatio > n(HttpInboundLink.java:472) > at > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformatio > n(HttpInboundLink.java:411) > at > com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpIC > LReadCallback.java:101) > at > com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueMa > nager.java(Compiled Code)) > at > com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager. > java(Compiled Code)) > at > com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager. > java(Compiled Code)) > at > com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager > .java(Compiled Code)) > at > com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code)) > > > Thanks, > > Dave > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Feld, David E > Sent: Monday, May 07, 2007 3:53 PM > To: Post all your questions about iText here > Subject: Re: > [iText-questions]ExceptionConverter:java.io.IOException:Thedocument has > no pages. > > I took the latest jar off the website which I believe was compiled using > 1.4. I have double checked via the following command the version that > is running on the deployed server: > java -fullversion > java full version "J2RE 1.4.2 IBM AIX build ca142-20060421 (SR5)" > > I am not sure what else I can check. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Paulo Soares > Sent: Monday, May 07, 2007 1:12 PM > To: Post all your questions about iText here > Subject: Re: > [iText-questions]ExceptionConverter:java.io.IOException:Thedocument has > no pages. > > That may happen if iText was compiled with jdk 1.4 but you are running > it > with 1.3. See http://itext.ugent.be/library/question.php?id=18. By the > way, > you are swallowing exceptions and that doesn't help, this is a > VerifyError > exception. > > Paulo > > ----- Original Message ----- > From: "Feld, David E" <[EMAIL PROTECTED]> > To: "Post all your questions about iText here" > <[email protected]> > Sent: Monday, May 07, 2007 6:20 PM > Subject: Re: > [iText-questions]ExceptionConverter:java.io.IOException:Thedocument has > no > pages. > > >> Ok, so I finally I am seeing the following exception text and this >> exception comes from with open() >> >> execeptionText=javax.servlet.ServletException: (class: >> com/lowagie/text/pdf/PageResources, method: translateName signature: >> (Lcom/lowagie/text/pdf/PdfName;)Lcom/lowagie/text/pdf/PdfName;) >> Expecting to find array of ints on stack >> >> Can anyone tell me what this means? >> >> Thanks, >> >> Dave >> >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of >> Paulo Soares >> Sent: Thursday, May 03, 2007 1:25 PM >> To: Post all your questions about iText here >> Subject: Re: >> [iText-questions]ExceptionConverter:java.io.IOException:Thedocument > has >> no pages. >> >> Try it with the code I proposed, don't complicate. Also make sure that >> you >> add something to the page like a doc.add(new Paragraph("hello")) after >> open. >> >> Paulo >> >> ----- Original Message ----- >> From: "Feld, David E" <[EMAIL PROTECTED]> >> To: "Post all your questions about iText here" >> <[email protected]> >> Sent: Thursday, May 03, 2007 6:18 PM >> Subject: Re: >> [iText-questions]ExceptionConverter:java.io.IOException:Thedocument > has >> no >> pages. >> >> >>> >>> This is what I have: >>> >>> try { >>> ... >>> Log..."Start Open" >>> try >>> { >>> doc.open(); >>> } >>> catch (Exception e) >>> { >>> Log..."Printing Stack Trace for doc.open" >>> e.printStackTrace(); >>> } >>> Log..."End Open" >>> ... >>> } >>> catch (Exception e) >>> { >>> Log..."Printing Stack Trace for overall method" >>> e.printStackTrace(); >>> } >>> finally { >>> Log..."Start Close" >>> try >>> { >>> doc.close(); >>> } >>> catch (Exception e) >>> { >>> Log..."Printing Stack Trace for doc.close" >>> e.printStackTrace(); >>> Log..."Printing exception info: "+e.toString() >>> } >>> } >>> >>> The output is the following: >>> ----------------------- >>> Start Open >>> Start Close >>> Printing Stack Trace for doc.close >>> Printing exception info: EXCEPTION INFO: ExceptionConverter: >>> java.io.IOException: The document has no pages. >>> ----------------------- >>> >>> I don't understand why the open does not produce any info in this >>> particular layout? What would be the difference if I do move the >> close() >>> to be right below it? >>> >>> Thanks, >>> >>> Dave >>> -----Original Message----- >>> From: [EMAIL PROTECTED] >>> [mailto:[EMAIL PROTECTED] On Behalf Of >>> Paulo Soares >>> Sent: Wednesday, May 02, 2007 7:02 PM >>> To: Post all your questions about iText here >>> Subject: Re: >>> [iText-questions]ExceptionConverter:java.io.IOException:Thedocument >> has >>> no pages. >>> >>> You have something like this: >>> >>> try { >>> ... >>> doc.open(); >>> ... >>> } >>> finally { >>> doc.close(); >>> } >>> >>> You should have: >>> >>> try { >>> ... >>> doc.open(); >>> ... >>> doc.close(); >>> } >>> catch (Exception e){ >>> e.printStackTrace(); >>> } >>> >>> Paulo >>> >>> ----- Original Message ----- >>> From: "Feld, David E" <[EMAIL PROTECTED]> >>> To: "Post all your questions about iText here" >>> <[email protected]> >>> Sent: Thursday, May 03, 2007 12:43 AM >>> Subject: Re: >>> [iText-questions]ExceptionConverter:java.io.IOException:Thedocument >> has >>> no >>> pages. >>> >>> >>>> > You are seeing the exception thrown by close but there was an >>>> exception >>>>> before that that caused the finally block. That's where the real >>> error >>>> is. >>>> That is correct. The original exception came from doc.open() which >> is >>>> what I stated earlier. >>>> >>>>> No. Unless you catch the original exception it will remain a >> mistery. >>>> I am catching the original exception. The exception text is >>>> "ExceptionConverter:java.io.IOException:Thedocument has no pages" > and >>> it >>>> has no stack trace associated with this exception. >>>> >>>> >>>> Thanks, >>>> >>>> Dave >>>> -----Original Message----- >>>> From: [EMAIL PROTECTED] >>>> [mailto:[EMAIL PROTECTED] On Behalf Of >>>> Paulo Soares >>>> Sent: Wednesday, May 02, 2007 6:02 PM >>>> To: Post all your questions about iText here >>>> Subject: Re: >>>> [iText-questions]ExceptionConverter:java.io.IOException:Thedocument >>> has >>>> no pages. >>>> >>>> >>>> ----- Original Message ----- >>>> From: "Feld, David E" <[EMAIL PROTECTED]> >>>> To: "Post all your questions about iText here" >>>> <[email protected]> >>>> Sent: Wednesday, May 02, 2007 11:15 PM >>>> Subject: Re: [iText-questions] >>>> ExceptionConverter:java.io.IOException:Thedocument has no pages. >>>> >>>> >>>>>I have a debug statement after every line of code and the last > debug >>>>> statement that gets printed out is the one right before doc.open() >>> and >>>>> the one right after it does not get printed. Part of our execption >>>>> handling is that we do close it in the finally block. So, the >>> close() >>>>> would get called but the exception still occurs at this line >>>> initially. >>>>> >>>> >>>> You are seeing the exception thrown by close but there was an >>> exception >>>> before that that caused the finally block. That's where the real >> error >>>> is. >>>> >>>>> Do you know the root cause of this exception? Is there an issue > with >>>> the >>>> >>>> No. Unless you catch the original exception it will remain a > mistery. >>>> >>>>> itext jar? >>>> >>>> iText 1.2 is more than two years old. There were 23 releases since >>> that. >>>> If >>>> there was an issue, nobody will remember. >>>> >>>> Paulo >>>> >>>>> >>>>> Thanks, >>>>> >>>>> Dave >>>>> >>>>> -----Original Message----- >>>>> From: [EMAIL PROTECTED] >>>>> [mailto:[EMAIL PROTECTED] On Behalf Of >>>>> Paulo Soares >>>>> Sent: Wednesday, May 02, 2007 4:52 PM >>>>> To: Post all your questions about iText here >>>>> Subject: Re: [iText-questions] ExceptionConverter: >>>>> java.io.IOException:Thedocument has no pages. >>>>> >>>>> That error can only occur at doc.close(). Check that you are not >>>>> ignoring >>>>> exceptions. >>>>> >>>>> Paulo >>>>> >>>>> ----- Original Message ----- >>>>> From: "Feld, David E" <[EMAIL PROTECTED]> >>>>> To: <[email protected]> >>>>> Sent: Wednesday, May 02, 2007 9:31 PM >>>>> Subject: [iText-questions] ExceptionConverter: java.io.IOException: >>>>> Thedocument has no pages. >>>>> >>>>> >>>>> >>>>> Hi, >>>>> >>>>> I am receiving the following error: >>>>> >>>>> ExceptionConverter: java.io.IOException: The document has no pages. >>>>> >>>>> When attempting to call the following code: >>>>> >>>>> ByteArrayOutputStream ba = new >>>>> ByteArrayOutputStream(); >>>>> Document doc = new Document(); >>>>> PdfWriter docWriter=PdfWriter.getInstance(doc, >>>>> ba); >>>>> PdfDocEvents events = new PdfDocEvents(); >>>>> docWriter.setPageEvent(events); >>>>> doc.setPageSize(PageSize.LETTER); >>>>> doc.setMargins(36, 36, 48, 36); >>>>> String imageFolder = >>>>> configuration.getEnvironmentProperty(FwConstants.IMAGE_FOLDER); >>>>> Image checkMark = Image.getInstance(imageFolder >>>>> + AppConstants.ICON_CHECK_PDF_IMG); >>>>> Image logo = Image.getInstance(imageFolder + >>>>> AppConstants.ACCESS_LOGO_IMG); >>>>> logo.setAlignment(Image.LEFT); >>>>> logo.scaleAbsoluteHeight(50); >>>>> logo.scalePercent(50); >>>>> SimpleDateFormat formatter = new >>>>> SimpleDateFormat("MM/dd/yyyy hh:mm a"); >>>>> Date toDay = new Date(); >>>>> Chunk chunk = new Chunk(logo,0,-45); >>>>> HeaderFooter header = new HeaderFooter(new >>>>> Phrase(chunk),false); >>>>> header.setAlignment(Element.ALIGN_LEFT); >>>>> header.setBorder(Rectangle.NO_BORDER); >>>>> doc.setHeader(header); >>>>> doc.open(); >>>>> >>>>> The error occurs when doc.open() is called. This is running in a >>>>> clustered environment on WAS 6.0. The itext jar is itext-1.2.jar >> and >>>> it >>>>> was placed in a shared library on the WAS server. We have no idea >>> why >>>>> this is happening. Please, let me know what I can look at or what > I >>>> am >>>>> doing wrong? >>>>> >>>>> This is not occuring on the local environment, it is only occuring >> on >>>>> this deployed environment. >>>>> >>>>> Thanks, >>>>> David Feld ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
