loiemilio / pdf-meta

Automatically exported from code.google.com/p/pdf-meta
Other
0 stars 0 forks source link

crash on OSX snow leopard #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
0. Using pdfmeta_20120418_bin.zip, 

    $ java -showversion
    java version "1.6.0_43"
    Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-10M4203)
    Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode)

1. Run program on OSX snowleopard using:

    $ java -jar pdfmeta_20120418.jar

(incidentally, same crash observed when I added '-Xmx512m' after 'java')

2. Produces file open dialog. Choose my pdf. (is it helpful if I attach that 
document to this issue? It's a 4.5Mb PDF textbook.)

3. Stack trace:
$ java -Xmx512m -jar pdfmeta_20120418.jar 
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: 
org/bouncycastle/asn1/ASN1OctetString
    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 com.btr.pdfmeta.GuiEditor.loadPdfFile(GuiEditor.java:222)
    at com.btr.pdfmeta.GuiEditor.access$2(GuiEditor.java:209)
    at com.btr.pdfmeta.GuiEditor$3.valueChanged(GuiEditor.java:145)
    at javax.swing.JList.fireSelectionValueChanged(JList.java:1795)
    at javax.swing.JList$ListSelectionHandler.valueChanged(JList.java:1809)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:167)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:147)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:194)
    at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:388)
    at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:398)
    at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:442)
    at javax.swing.JList.setSelectedIndex(JList.java:2209)
    at com.btr.pdfmeta.GuiEditor$6.run(GuiEditor.java:198)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:708)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:669)
    at java.awt.EventQueue$2.run(EventQueue.java:667)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:678)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.ClassNotFoundException: 
org.bouncycastle.asn1.ASN1OctetString
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 33 more
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: 
org/bouncycastle/asn1/ASN1OctetString
    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 com.btr.pdfmeta.GuiEditor.saveMetaData(GuiEditor.java:303)
    at com.btr.pdfmeta.GuiEditor.access$1(GuiEditor.java:286)
    at com.btr.pdfmeta.GuiEditor$2.actionPerformed(GuiEditor.java:134)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6382)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
    at java.awt.Component.processEvent(Component.java:6147)
    at java.awt.Container.processEvent(Container.java:2083)
    at java.awt.Component.dispatchEventImpl(Component.java:4744)
    at java.awt.Container.dispatchEventImpl(Container.java:2141)
    at java.awt.Component.dispatchEvent(Component.java:4572)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4619)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4280)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4210)
    at java.awt.Container.dispatchEventImpl(Container.java:2127)
    at java.awt.Window.dispatchEventImpl(Window.java:2489)
    at java.awt.Component.dispatchEvent(Component.java:4572)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:710)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:669)
    at java.awt.EventQueue$2.run(EventQueue.java:667)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
    at java.awt.EventQueue$3.run(EventQueue.java:683)
    at java.awt.EventQueue$3.run(EventQueue.java:681)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:680)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.ClassNotFoundException: 
org.bouncycastle.asn1.ASN1OctetString
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 45 more

Original issue reported on code.google.com by tart...@gmail.com on 8 Apr 2013 at 9:02

GoogleCodeExporter commented 8 years ago
Oh, and... original PDF file is moved to ".bak", but no new PDF file is created.

Original comment by tart...@gmail.com on 8 Apr 2013 at 9:05

GoogleCodeExporter commented 8 years ago
FYI, trying to edit the same PDF file using PDFInfo also crashes. The document 
is "Growing Object-Oriented Software, Guided by Tests", the only one in my 
collection of documents that's having these issues.

Original comment by tart...@gmail.com on 8 Apr 2013 at 9:10

GoogleCodeExporter commented 8 years ago
Hi,
The message indicates that the PDF file that you try to edit is encrypted (and 
perhaps password protected)
To open these files the bouncycastle crypto provider is needed to read 
encrypted PDF files. The error should be caught and handled more gracefully but 
in any way you will have no luck editing it because it is protected for editing.

if you like you can send the PDF to me and I will have a deeper look 

My mail is 

rosstauscher gmx de

Have fun,
- Rossi

Original comment by rosstaus...@googlemail.com on 8 Apr 2013 at 4:20

GoogleCodeExporter commented 8 years ago
Thanks for the response. I'm happy to send the PDF so if you'd like to chase up 
this issue for the sake of the pdf-meta, but personally I've found another 
solution now. I got a different PDF (0.5Mb bigger) of the same book from a 
different source and that works fine, so I'm happy.

Original comment by tart...@gmail.com on 8 Apr 2013 at 4:36

GoogleCodeExporter commented 8 years ago
Hi,
In this case it is already OK for me. I do not need the PDF for analysis. I 
know where the problem sits and will have a look at this. Thanks for reporting 
this and have fun reading.

- Rossi

Original comment by rosstaus...@googlemail.com on 10 Apr 2013 at 5:04