Link to home
Start Free TrialLog in
Avatar of Kit_
Kit_Flag for Russian Federation

asked on

Xerces XML parser in applet.

Hello!

I have found a problem with using Apache Xerces XML pasrer in applet.

I'm creating a control that uses xerces parser and can work as application or applet. When it works as application all is Ok. But when I try to start it as an applet then java.security.AccessControlException is thrown with the following description

java.security.AccessControlException: access denied ( java.util.PropertyPermission jaxp.debug read)

This error is throw during execution if instruction

javax.xml.parsers.DocumentBuilderFactory.newInstance().

What to do?
Avatar of ozymandias
ozymandias
Flag of United Kingdom of Great Britain and Northern Ireland image

This is tricky.
The DocumentBuilderFactory returns an object whose type is obviously dependent upon some system property. It may be OS dependent or language/locale dependent (I'm not sure).

Applets (as a rule) do not have priviledges to look at these system properties as they are "sandboxed" for security reasons.

I am not sure how to get round it but I am sure I have in the past.

Can you post your code please ?
Avatar of Kit_

ASKER

"jaxp.debug" - may be it is a debug option? As far as I understand I use xerces build with debug info.
ASKER CERTIFIED SOLUTION
Avatar of ozymandias
ozymandias
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kit_

ASKER

Ok, thanks. It's working!