[jdom-interest] security exception using applet

Laurent Bihanic laurent.bihanic at atosorigin.com
Tue Nov 6 00:44:46 PST 2001


John Cartwright wrote:

> Hello All,
> 
> I'm trying to use JDOM in a applet and the following exception is
> getting thrown:
> 
> java.lang.ExceptionInInitializerError:
> java.security.AccessControlException: access denied
> (java.util.PropertyPermission jaxp.debug read)
> 

This is apparently a JAXP problem: JAXP uses the "jaxp.debug" system property 
to activate debug traces.  Comments in code say it should be removed in the 
next releases.

OK, that does not solves your problem!

I'm no Java security expert but if you want to bypass the problem without 
requiring the applet user to modify their Java security policy file, the best 
way to do is not to use JAXP!

If you know which SAX parser you want to use, just configure SAXBuilder with 
the SAX parser class name using new SAXBuilder(<classname>).
For example:
  - for Crimson: org.apache.crimson.parser.XMLReaderImpl
  - for Xerces:  org.apache.xerces.parsers.SAXParser

And don't forget to send a bug report to Sun!

Hope this helps,

Laurent




More information about the jdom-interest mailing list