Bug#687692: examples

Alberto Fernández infjaf at gmail.com
Wed Dec 12 00:04:48 UTC 2012


Hi Tobias

Here's a testcase.
In sid it works fine, but if I use the jars provided in testing it
fails.


Important: the pdf file is "protected" , so it's necesary bouncycastle
to decrpyt it. Normal pdf files don't fail because they don't need
bouncycastle.

Attached sample pdf and sample java that counts the pages of a pdf. 



Sid. It prints the expected output 

pages = 1





In Testing: throws this exception:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/bouncycastle/asn1/ASN1ObjectIdentifier
	at com.lowagie.text.pdf.PdfEncryption.<init>(Unknown Source)
	at com.lowagie.text.pdf.PdfReader.readDecryptedDocObj(Unknown Source)
	at com.lowagie.text.pdf.PdfReader.readDocObj(Unknown Source)
	at com.lowagie.text.pdf.PdfReader.readPdf(Unknown Source)
	at com.lowagie.text.pdf.PdfReader.<init>(Unknown Source)
	at com.lowagie.text.pdf.PdfReader.<init>(Unknown Source)
	at Main.main(Main.java:17)
Caused by: java.lang.ClassNotFoundException:
org.bouncycastle.asn1.ASN1ObjectIdentifier
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	... 7 more
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example2.pdf
Type: application/pdf
Size: 4024 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-java-maintainers/attachments/20121212/32a2465c/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Main.java
Type: text/x-java
Size: 488 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-java-maintainers/attachments/20121212/32a2465c/attachment-0001.java>


More information about the pkg-java-maintainers mailing list