Hi,

I am using the JSVGCanvas within an applet which is
embedded in a HTML page, and I have the following
problem:

Most of the time when I interrupt the applet, e.g. by
clicking on a link which loads a different HTML page
in the frame were, previously, the appled resided, I
get this exception:

java.security.AccessControlException: access denied
(java.lang.RuntimePermission modifyThread)
        at
java.security.AccessControlContext.checkPermission(Unknown
Source)
        at
java.security.AccessController.checkPermission(Unknown
Source)
        at java.lang.SecurityManager.checkPermission(Unknown
Source)
        at sun.applet.AppletSecurity.checkAccess(Unknown
Source)
        at java.lang.Thread.checkAccess(Unknown Source)
        at java.lang.Thread.interrupt(Unknown Source)
        at
org.apache.batik.bridge.UpdateManager$3.run(Unknown
Source)
        at org.apache.batik.util.RunnableQueue.run(Unknown
Source)
        at java.lang.Thread.run(Unknown Source)
        
I am using Java 1.4.2_03, and the problem occurs with
Mozilla Suite 1.6 and Internet Explorer 6.0. I use
Batik 1.5.1, but the problem also occurs with 1.5.
What confuses me is that it does not occur all the
time (but maybe 8 out of 10 times), and I cannot
really trace what happens, as I cannot simulate a
"page change" in the Eclipse Debugger/Appletviewer in
order to get more detailed information on where
exactly the exception occurs. If I simply interrupt
the applet in the Eclipse Debugger/Appletviewer,
nothing unusual happens, the applet terminates fine. I
strongly suspect that the
org.apache.batik.bridge.UpdateManager.dispatchSVGUnLoadEvent()
method is responsible, though I cannot provide any
proof.

The destroy() method in the applet looks as follows...
        public void destroy() {
                if (appletCanvas != null) {
                        appletCanvas.stopProcessing();
                }               
        }
...where appletCanvas is the JSVGCanvas.

Since it is a security exception, I have signed the
applet, with the following results:
- if I sign only my applet jar file, the exception
still occurs.
- if I sign only the batik-all.jar file, the exception
does not occur.
- if I sign all jar files, the exception does not
occur.
The basic problem with signing is the fact that it
slows down the loading process to an inacceptable
performance. The applet will be in production use, so
this is a crucial pitfall.

Help would be greatly appreciated. Thanks,

Chris
--
Chris Cruzdal

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to