Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#792676: libpdfbox-java: pdfannotextractor.pl fails to find org.pdfbox.cos.ICOSVisitor class

10 views
Skip to first unread message

Álvaro Herrera

unread,
Jul 17, 2015, 8:30:03 AM7/17/15
to
Package: libpdfbox-java
Version: 1:1.8.7+dfsg-1
Severity: important

Dear Maintainer,

I am trying to apply the solution proposed in this answer
http://tex.stackexchange.com/a/48118/82119 but on following the first
step, the pdfannotextractor.pl dies with:

$ /usr/share/texlive/texmf-dist/scripts/pax/pdfannotextractor.pl capturing-ddl.pdf
PDFAnnotExtractor 0.1l, 2012/04/18 - Copyright (c) 2008, 2011, 2012 by Heiko Oberdiek.
Exception in thread "main" java.lang.NoClassDefFoundError: org/pdfbox/cos/ICOSVisitor
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
at java.lang.Class.getMethod0(Class.java:2856)
at java.lang.Class.getMethod(Class.java:1668)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.pdfbox.cos.ICOSVisitor
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:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more

I have no idea how to fix this problem. Maybe I need to specify a
classpath or something? I looked at the .pl file itself and there's a
--install option, but on running it, it says the PDFBox "is already
found":

$ /usr/share/texlive/texmf-dist/scripts/pax/pdfannotextractor.pl
--install
PDFAnnotExtractor 0.1l, 2012/04/18 - Copyright (c) 2008, 2011, 2012 by Heiko Oberdiek.
* Nothing to do, because PDFBox is already found:
/usr/share/java/pdfbox.jar

Not quite sure what to do next. Maybe it's just missing a dependency?


-- System Information:
Debian Release: 8.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=es_CL.utf8, LC_CTYPE=es_CL.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libpdfbox-java depends on:
ii libfontbox-java 1:1.8.7+dfsg-1

libpdfbox-java recommends no packages.

libpdfbox-java suggests no packages.

-- no debconf information


--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

gregor herrmann

unread,
Jul 17, 2015, 9:10:03 AM7/17/15
to
Control: reassign -1 texlive-latex-extra
Some observations:

* /usr/share/texlive/texmf-dist/scripts/pax/pdfannotextractor.pl would
download PDFBox-0.7.3.zip from Sourceforge. That's a quite old
version (in Debian in oldoldstable).
* Looking at
pdfbox/src/main/java/org/apache/pdfbox/cos/ICOSVisitor.java (in the
PDFBox source), I guess that this class is called
org.apache.pdfbox.cos (and not org.pdfbox.cos) by now.
A diff in the git repo (upstream tags) shows the same. Pseudo-diff:

diff --git a/current/src/org/pdfbox/cos/ICOSVisitor.java b/current/src/org/pdfbox/cos/ICOSVisitor.java
deleted file mode 100644
index 04b7542..0000000
--- a/current/src/org/pdfbox/cos/ICOSVisitor.java
+++ /dev/null

-package org.pdfbox.cos;
-public interface ICOSVisitor

diff --git a/pdfbox/src/main/java/org/apache/pdfbox/cos/ICOSVisitor.java b/pdfbox/src/main/java/org/apache/pdfbox/cos/ICOSVisitor.java
new file mode 100644
index 0000000..1a09c38
--- /dev/null
+++ b/pdfbox/src/main/java/org/apache/pdfbox/cos/ICOSVisitor.java

+package org.apache.pdfbox.cos;
+public interface ICOSVisitor


My conclusion is that /usr/share/texlive/texmf-dist/scripts/pax/pax.jar
(in texlive-latex-extra) needs to be adjusted to a "recent" version of PDFBox.

Reassigning the bug.


As a workaround it might work to
- download the old PDFBox zip, put the .jar in some directory and
- run the script as
CLASSPATH=/path/to/PDFBox-0.7.3.jar /usr/share/texlive/texmf-dist/scripts/pax/pdfannotextractor.pl capturing-ddl.pdf
(or something similar)


Cheers,
gregor

--
.''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
: :' : Debian GNU/Linux user, admin, and developer - https://www.debian.org/
`. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
`- NP: Crosby Stills & Nash: Teach Your Children Well
signature.asc

Norbert Preining

unread,
Jul 17, 2015, 9:20:03 AM7/17/15
to
Hi all,

> * /usr/share/texlive/texmf-dist/scripts/pax/pdfannotextractor.pl would
> download PDFBox-0.7.3.zip from Sourceforge. That's a quite old
> version (in Debian in oldoldstable).
> * Looking at
> pdfbox/src/main/java/org/apache/pdfbox/cos/ICOSVisitor.java (in the
> PDFBox source), I guess that this class is called
> org.apache.pdfbox.cos (and not org.pdfbox.cos) by now.
> A diff in the git repo (upstream tags) shows the same. Pseudo-diff:

Can this please reported to upupstream Heiko Oberdiek - otherwise
there will be no fix.

Thanks

Norbert

------------------------------------------------------------------------
PREINING, Norbert http://www.preining.info
JAIST, Japan TeX Live & Debian Developer
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
------------------------------------------------------------------------

Preuße@buxtehude.debian.org,

unread,
Jul 23, 2015, 5:20:04 PM7/23/15
to
severity 670040 important
merge 670040 792676
stop

On 17.07.2015 14:59, gregor herrmann wrote:
> Control: reassign -1 texlive-latex-extra
>
> On Fri, 17 Jul 2015 15:18:44 +0300, Álvaro Herrera wrote:
>
>> I am trying to apply the solution proposed in this answer
>> http://tex.stackexchange.com/a/48118/82119 but on following the first
>> step, the pdfannotextractor.pl dies with:
>>
Known issue. Merging.

H.
--
http://www.hilmar-preusse.de.vu/ #206401 http://counter.li.org
0 new messages