Bug 497986 - pdftk throws java exception
Summary: pdftk throws java exception
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pdftk
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jochen Schmitt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-28 09:26 UTC by Jiri Cerny
Modified: 2009-04-30 01:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-29 16:34:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
add bcprov and bcmail to classpath (1.29 KB, patch)
2009-04-28 15:35 UTC, Orcan Ogetbil
no flags Details | Diff

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.


Note You need to log in before you can comment on or make changes to this bug.