|
> William Billingsley wrote:
> > I'm using Batik in a couple of applets I'm developing ( > > http://www.cl.cam.ac.uk/~whb21/svgDraw/svgCircuit.html is one example; the > > applet is near the foot of the page) > > > > At startup an AccessControlException occurs when Batik tries to create a > > Rhino Interpreter from the InterpreterPool (exception trace at foot of > > email). js.jar is included in the archive attribute for the applet on the > > page, and is available in the same directory as the applet. > >>From what I can see delving into the code, RhinoClassLoader specifically > > extends URLClassLoader, so I'm not sure if this a "can't find the class on > > the server and not allowed to look elsewhere" (as if I had not included > > js.jar) or if this exception is coming straight out of the way Batik is > > written, and will always produce this error if the applet is unsigned? > > I had what sounds like the same problem using Rhino in an unrelated project. > > The problem is that Rhino tries to 'compile' some of the functions from > _javascript_ into java as an optimization, and load it via a custom > ClassLoader. There is supposed to be a resource setting somewhere that > controls the optimization behavior, but I couldn't make it work. My > solution? Remove all the classes in org.mozilla._javascript_.optimizer > packages from js.jar. > > Hope this helps, > - josh I'm missing something. I ran "jar xf js.jar" to
extract the files, then deleted the org/mozilla/_javascript_/optimizer
directory. Then "jar cf js.jar org" to recreate js.jar (after copying
js.jar to js.jar.original). I also switched to Crimson.
I'm still getting:
java.security.AccessControlException: access denied
(java.lang.RuntimePermission createClassLoader)
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.checkCreateClassLoader(Unknown Source)
at java.lang.ClassLoader.<init>(Unknown Source)
at java.security.SecureClassLoader.<init>(Unknown Source)
at java.net.URLClassLoader.<init>(Unknown Source)
at org.apache.batik.script.rhino.RhinoClassLoader.<init>(Unknown
Source)
at org.apache.batik.script.rhino.RhinoInterpreter.<init>(Unknown
Source)
at
org.apache.batik.script.rhino.RhinoInterpreterFactory.createInterpreter(Unknown
Source)
at org.apache.batik.script.InterpreterPool.createInterpreter(Unknown
Source)
at org.apache.batik.bridge.BridgeContext.getInterpreter(Unknown Source)
at org.apache.batik.bridge.BaseScriptingEnvironment.getInterpreter(Unknown
Source)
at org.apache.batik.bridge.BaseScriptingEnvironment.loadScripts(Unknown
Source)
at org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(Unknown
Source)
at org.apache.batik.swing.svg.SVGLoadEventDispatcher.run(Unknown
Source)
It's not critical but I would like to enable
_javascript_ in Batik in an applet (without signing or changing policies).
Any ideas?
|
- Re: applet AccessControlException loading Rhino (js.jar is... ECS Engineering
- Re: applet AccessControlException loading Rhino (js.j... Thomas DeWeese
- Re: applet AccessControlException loading Rhino (... ECS Engineering
- Re: applet AccessControlException loading Rhino (js.j... PENPRAPA MUNKID
