Skip to content

JDom2 not usable within applet #93

Description

@robert-E

hi,
since jdom2 using jdom in an applet is not possible anymore because it accesses system properties for which the sandbox does not grant access. I found the following 2 cases:

Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission org.jdom2.output.LineSeparator read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at org.jdom2.output.LineSeparator.getDefaultLineSeparator(LineSeparator.java:163)
at org.jdom2.output.LineSeparator.(LineSeparator.java:156)
... 22 more
Exception: java.lang.RuntimeException: java.lang.ExceptionInInitializerError

Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission org.jdom2.xpath.XPathFactory read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at org.jdom2.xpath.XPathFactory.(XPathFactory.java:101)
... 22 more
Exception: java.lang.RuntimeException: java.lang.ExceptionInInitializerError

The problem is, that both calls of the System.getProperty(..) are made in the declaration of attributes of that classes.

I know that the permissions for the sandbox can be changed but that must be done by each user using that applet. Most users are not allowed to change that permissions by their company rules, so this is no possible solution in my case.

cu,
robert.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions