xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From josh <jo...@speakeasy.net>
Subject Re: applet AccessControlException loading Rhino (js.jar is in archive)
Date Wed, 04 Jun 2003 17:16:53 GMT
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



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message