[jdom-interest] JAXP Error in Applet

Laurent Bihanic laurent.bihanic at atosorigin.com
Thu Apr 5 02:15:37 PDT 2001


This problem is not due to JDOM but to JAXP1.1ea2.
At initialization, in JAXP1.1ea2, the SAXParserFactory tries to read the 
jaxp.debug system property. But this access is not protected against security 
exceptions. So the exception goes up strait to the application.
This property is no longer used in JAXP1.1 and the rest of the factory code 
catches SecurityExceptions.

For your applet, you should try with JAXP1.1 or, if you dont want to upgrade, 
change the local Java policy file to grant read permission on properties 
jaxp.* and javax.xml.*.


Kevin Baynes wrote:

> I'm getting a JAXP error using JAXP1.1ea2 with Crimson and JDOMb6 in an
> Applet.
> When I call SAXBuilder() from within my applet, I get the following error.
> BTW, I'm not accessing the client disk - I'm building a document from an URL
> connection. The servlet that the applet is communicating with is also using
> JAXP1.1/Crimson/JDOMb6 and works fine.
> java.lang.ExceptionInInitializerError: java.security.AccessControlException:
> access denied (java.util.PropertyPermission jaxp.debug 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
> javax.xml.parsers.SAXParserFactory.<clinit>(SAXParserFactory.java:208) 	at
> java.lang.Class.forName0(Native Method) 	at java.lang.Class.forName(Unknown
> Source) 	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:273)
> I was reading some chats with Duncan where he said that there was a bug in
> JAXP1.0 causing a permission error when called from an applet (but that it
> should be fixed by 1.0.1).
> Does anyone have any experience with this? JDOMb6 should use JAXP by
> default, right? I don't need to pass anything into SAXBuilder() do I?
> Thanks,
> --------------------
> Kevin Baynes
> Software Engineer
> kbaynes at renex.com
> 703-393-2191
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com


                 (o o)
Laurent Bihanic           | Tel: +33 (0)1  (Direct line)
Atos Origin               |      +33 (0)1
Intégration - e-Business  | Fax: +33 (0)1
Les Miroirs - Bat. C      |
18, avenue d'Alsace       |
F-92926 La Defense Cedex  | e-Mail: laurent.bihanic at atosorigin.com

"Your mouse has moved, Windows must be restarted for changes to take

More information about the jdom-interest mailing list