[
https://issues.apache.org/jira/browse/PDFBOX-2397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14562812#comment-14562812
]
Tilman Hausherr commented on PDFBOX-2397:
-----------------------------------------
That isn't a stack trace. A stack trace is something like at the beginning of
this issue. For example, this is a stack trace:
{code}
java.io.FileNotFoundException: fred.txt
at java.io.FileInputStream.<init>(FileInputStream.java)
at java.io.FileInputStream.<init>(FileInputStream.java)
at ExTest.readMyFile(ExTest.java:19)
at ExTest.main(ExTest.java:7)
{code}
However I realize it might be difficult to get in an applet. Here are some
links:
https://stackoverflow.com/questions/868111/how-do-you-debug-java-applets
http://www.rgagnon.com/javadetails/java-0597.html
http://alvinalexander.com/java/edu/pj/pj010009
Make also sure that the error is really in PDFBox. Thus change this line
{code}
PDDocument doc = PDDocument.load(new URL(pdfUrl));
{code}
to this:
{code}
URL url = new URL(pdfUrl);
InputStream is = url.openStream();
JOptionPane.showMessageDialog(null, "Before PDDocument.load");
PDDocument doc = PDDocument.load(is);
JOptionPane.showMessageDialog(null, "After PDDocument.load");
{code}
> Running within an Applet throws an AccessControlException
> ---------------------------------------------------------
>
> Key: PDFBOX-2397
> URL: https://issues.apache.org/jira/browse/PDFBOX-2397
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 1.8.7
> Environment: JRE 7u67 or JRE 6u45 (Windows 7 SP1 64bit)
> Reporter: Bertrand Gillis
>
> As soon as PDFBox is embedded in a signed applet, the following exception is
> thrown when I try to print a PDF document through PDFBox:
> {code}
> Caused by: java.security.AccessControlException: access denied
> ("java.util.PropertyPermission" "org.apache.pdfbox.ICC_override_color" "read")
> at java.security.AccessControlContext.checkPermission(Unknown Source)
> at java.security.AccessController.checkPermission(Unknown Source)
> at java.lang.SecurityManager.checkPermission(Unknown Source)
> at sun.plugin2.applet.AWTAppletSecurityManager.checkPermission(Unknown
> Source)
> at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
> at java.lang.System.getProperty(Unknown Source)
> at java.lang.Integer.getInteger(Unknown Source)
> at java.lang.Integer.getInteger(Unknown Source)
> at java.awt.Color.getColor(Unknown Source)
> at java.awt.Color.getColor(Unknown Source)
> at
> org.apache.pdfbox.pdmodel.graphics.color.PDColorState.<clinit>(PDColorState.java:50)
> {code}
> This issue was also in previous PDFBox versions for the following instruction:
> {code:title=BaseParser.java}
> FORCE_PARSING = Boolean.getBoolean("org.apache.pdfbox.forceParsing");
> {code}
> But it was fixed in later versions:
> {code:title=BaseParser.java}
> static {
> try {
> FORCE_PARSING = Boolean.getBoolean("org.apache.pdfbox.forceParsing");
> }
> catch (SecurityException e) {}
> }
> {code}
> This fixed is unfortunately not set for the current property:
> {code:title=PDColorState.java}
> private static volatile Color iccOverrideColor =
> Color.getColor("org.apache.pdfbox.ICC_override_color");
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]