[
https://issues.apache.org/jira/browse/PDFBOX-3313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986945#comment-15986945
]
Tilman Hausherr commented on PDFBOX-3313:
-----------------------------------------
Files from my test set that fail when not using twelvemonkeys and not using
{{field.setAccessible(true)}}:
gs-bugzilla691650-1.pdf
PDFBOX-1348.pdf
PDFBOX-2700-JCS_YCCK.pdf
PDFBOX-2128-PORSCHE_CMYK.pdf
PDFBOX-2128-573636.pdf
PDFBOX-3156.pdf
InaccessibleObjectException does not exist pre JDK9, so we can't catch it,
unless we catch Exception... and then I thought, why not use brute force for
the few cases where getAdobeTransform() fails. And this worked :-) I'm also
catching NegativeArraySizeException, which is for the file from PDFBOX-3156. Of
course, this solution is the second best. The best is to use twelvemonkeys
(PDFBOX-2694).
After change the only one left is
PDFBOX-2128-573636.pdf
which has an error when reading.
> Java 9 InaccessibleObjectException
> ----------------------------------
>
> Key: PDFBOX-3313
> URL: https://issues.apache.org/jira/browse/PDFBOX-3313
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 2.0.0
> Reporter: simon steiner
> Labels: JDK9
> Attachments: expected.pdf
>
>
> java -jar ~/pdf-box-svn/app/target/pdfbox-app-2.1.0-SNAPSHOT.jar PDFToImage
> expected.pdf
> Exception in thread "main" java.lang.reflect.InaccessibleObjectException:
> Unable to make member of class com.sun.imageio.plugins.jpeg.JPEGImageReader
> accessible: module java.desktop does not export com.sun.imageio.plugins.jpeg
> to unnamed module @72d1ad2e
> at
> sun.reflect.Reflection.throwInaccessibleObjectException(java.base@9-ea/Reflection.java:420)
> at
> java.lang.reflect.AccessibleObject.checkCanSetAccessible(java.base@9-ea/AccessibleObject.java:174)
> at
> java.lang.reflect.Field.checkCanSetAccessible(java.base@9-ea/Field.java:170)
> at java.lang.reflect.Field.setAccessible(java.base@9-ea/Field.java:164)
> at org.apache.pdfbox.filter.DCTFilter.decode(DCTFilter.java:119)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]