Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Applet and XML trouble

0 views
Skip to first unread message

Clinton Hyde

unread,
Feb 1, 2002, 3:56:48 PM2/1/02
to
I've written an application making heavy use of xml. works great from
command-line.

trying to migrate it to be an applet.

AppletViewer starts ok, I have a button to load my app, I get this
error:

Exception occurred during event dispatching:
java.lang.ExceptionInInitializerError:
java.security.AccessControlException: access denied (java.uti
l.PropertyPermission jaxp.debug read)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java,
Compiled Co
de)
at
java.security.AccessController.checkPermission(AccessController.java,
Compiled Code)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java, Compiled
Code)
at
java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java,
Compiled Code)
at java.lang.System.getProperty(System.java, Compiled Code)
at
javax.xml.parsers.DocumentBuilderFactory.<clinit>(DocumentBuilderFactory.java:322)

at mainFrame.<clinit>(mainFrame.java:223)
at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1066)

at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1101)

at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)

at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:204)

at java.awt.Component.processMouseEvent(Component.java:3160)
at java.awt.Component.processEvent(Component.java:2999)
at java.awt.Container.processEvent(Container.java:990)
at java.awt.Component.dispatchEventImpl(Component.java, Compiled
Code)
at java.awt.Container.dispatchEventImpl(Container.java, Compiled
Code)
at java.awt.Component.dispatchEvent(Component.java, Compiled
Code)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2043)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:1827)
at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:1730)
at java.awt.Container.dispatchEventImpl(Container.java, Compiled
Code)
at java.awt.Component.dispatchEvent(Component.java, Compiled
Code)
at java.awt.EventQueue.dispatchEvent(EventQueue.java, Compiled
Code)
at
java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java,
Compiled Code)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:92)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:83)

"mainFrame" is my JFrame/app.

question is: why is DocumentBuilderFactory breaking here? (and it AIN'T
on mainFrame.java line 223, that's nowhere near where I instantiate the
Factory) what system Property is it looking for? where's the source code
for the Factory that I might investigate it in detail?

please reply direct to: <a href="mailto:ch...@bbn.com">reply to
me</a>
as I can't keep up with my reading

-- clint


Clinton Hyde

unread,
Feb 1, 2002, 5:23:42 PM2/1/02
to
forgot to mention that I am using Xerces 1.4.3

I did finally find the source-code, and it has some apparently not-good debug code in it,
which is not present in V 1.4.4, which I will be trying next week.

the misbehaving property is "jaxp.debug", it doesn't seem to be one I can set as a <PARAM>,
I tried and that got a different error.

-- clint

Brian

unread,
Feb 4, 2002, 9:41:21 PM2/4/02
to
I'm no expert but from first look at the trace I think you've hit upon an
Applet Security issue.
On load the JVM will verify the Applet Byte Code to determine if there is
anything that violates Sandbox rules.

As a test you might want to try creating a jar of your applet package and
then using jarsigner to digitally sign the applet. Although this is only a
test Digital Certificate it will be enough for you to test if the Applet
Security Sandbox was the problem.

B

"Clinton Hyde" <ch...@bbn.com> wrote in message
news:3C5B01AE...@bbn.com...

Ingo Pakleppa

unread,
Feb 5, 2002, 12:18:07 AM2/5/02
to
You are right. Looking at the stack a bit more, it seems that the XML
parser was trying to get a system property, which is not legal in an
applet. I'm not sure which system property it needs, maybe there is a
way to supply that property directly to the parser?
0 new messages