Adam Joel Richards created PDFBOX-1933:
------------------------------------------

             Summary: PDFParser loops infinitely when loaded by JSP instead of 
NetBeans
                 Key: PDFBOX-1933
                 URL: https://issues.apache.org/jira/browse/PDFBOX-1933
             Project: PDFBox
          Issue Type: Bug
          Components: Parsing
    Affects Versions: 1.8.4
         Environment: Apache Tomcat 7, NetBeans 7.4, Windows 8.1
            Reporter: Adam Joel Richards
            Priority: Minor


I wrote a class to split large PDF files into segments, using NetBeans.  When I 
run it as a local project, it works perfectly.  It uses PDFParser to read the 
file input stream and output the document, so I can strip annotations and other 
stuff out and upload it to my database.  The code is as follows:

PDFParser pdfParser = new PDFParser( inputStream );
pdfParser.parse();
return pdfParser.getDocument();

The PDFParser works when I run it as a standalone Java package.  As soon as I 
embed it in a JSP, it loops forever.  I get no error messages of any kind, but 
I can see that my Java processes are increasing in size, and that the file I'm 
working on (the original PDF) is locked by the OS.  I have to shut down Java 
altogether to delete or rename it.

I have no idea what the difference is when it is when it is run by a JSP 
calling the class file.  If there is a simple solution and this is a repeat of 
the old infinite loop bug, could someone point me in the right direction?  I 
have scoured the net looking for solutions, but I've had no luck.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to