Bug 497986

Summary: pdftk throws java exception
Product: [Fedora] Fedora Reporter: Jiri Cerny <ji.cerny>
Component: pdftkAssignee: Jochen Schmitt <jochen>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: ji.cerny, jochen, oget.fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-29 16:34:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
add bcprov and bcmail to classpath none

Description Jiri Cerny 2009-04-28 09:26:49 UTC
On recent rawhide (pdftk-1.41-17.fc11.x86_64), I get the following error.

pdftk concentration.pdf cat output bla.ps
java.lang.NoClassDefFoundError: com.lowagie.text.pdf.PdfReader
   at java.lang.Class.initializeClass(libgcj.so.10)
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.cms.RecipientInformationStore not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/share/java/itext.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.Class.initializeClass(libgcj.so.10)
Error: Unexpected Exception in open_reader()
Error: Failed to open PDF file: 
   concentration.pdf
Errors encountered.  No output created.
Done.  Input errors, so no output created.

It is reproducible on all pdf files that I tried, so it should not be file specific.

Comment 1 Orcan Ogetbil 2009-04-28 15:34:41 UTC
Yes I confirm this. I first suspected the recent bouncycastle update. But it is not related, however wonder why it worked before.

The fix is replacing the pdftk-classpath.patch with the attached one. I added bcprov and bcmail to classpath.

Jochen, could you test it to verify?

Comment 2 Orcan Ogetbil 2009-04-28 15:35:45 UTC
Created attachment 341591 [details]
add bcprov and bcmail to classpath

Comment 3 Orcan Ogetbil 2009-04-29 03:09:51 UTC
Jiri,
Could you test this build that contains the updated patch? It works on my system but I just want to make sure. You can download the package for your arch from here:
   http://koji.fedoraproject.org/koji/taskinfo?taskID=1327384

Comment 4 Jiri Cerny 2009-04-29 09:35:56 UTC
The build from comment #3 fixes my problems. You can close this bug. Thanks a lot.

Comment 5 Jochen Schmitt 2009-04-29 16:34:46 UTC
I have create pdftk-1.41-18 for Rawhide and F-11. I create Ticket #1686 for tagging this release for F-11.

Comment 6 Orcan Ogetbil 2009-04-30 01:32:44 UTC
The new patch solves the issue, but I really don't understand why. The itext.jar file is only needed for font metrics. I also don't understand why it worked before, without these bouncycastle classpaths and why it stopped working now.

At least, I'm glad that the fix was easy.

But I do wonder if we will need to add other classpaths (for other itext dependencies) at some point in the future.