Re: Problems with addClassPath() and access control permissions
Wade Chandler <hwadechandler-beanshell-/[email protected]> Sat, 29 Apr 2006 10:43:50 -0700 (PDT)
| Newsgroups | gmane.comp.java.beanshell.devel |
|---|---|
| Message-ID | <[email protected]> |
--- Helio Perroni Filho <xperroni-/[email protected]> wrote: > Straight to the point > --------------------- > > Hello all. My name is Helio, I use BeanShell a lot, > but I am getting some bugs with the dynamic class > loading mechanism. I can fix them if no one else is > working on it. > > Now for the more articulated version > ------------------------------------ > > Hello all, > > My name is Helio, and I am a great BeanShell fan. > Besides using it in my own projects, I always take > advantage of its embedding into jEdit to test Java > code fragments and perform complex > search-and-replace > tasks. Unfortunately, I have run into two problems > with the dynamic class loading mechanism, which are > limiting my ability to use BeanShell the way I want: > > 1 - When I invoke the addClassPath() method several > times in a script, only the first invokation works > -- > the following ones just get ignored; Not sure here. Sounds like a bug the way you describe it. Just to aid someone else as I don't know: Do you mean you are calling like: addClassPath("somejar.jar"); addClassPath("anotherjar.jar"); and only somejar.jar is being added? or addClassPath("somejar.jar"); later addClassPath("somejar.jar"); and it is not reloading? If this case then see if reloadClasses("some.package.name.in.the.jar") will reload them. That might help someone track it down. Please report your findings or let the list know which instance or use case it is. > > 2 - When running from an unsigned applet, > instantiating the bsh.Interpreter class throws an > AccessControlException, due to insufficient > privileges > to call the getContextClassLoader() method (I can > send > an exception trace if anyone is interested). Nothing to fix here I don't imagine. It should be getting the context class loader. There will be other dynamic class loading sections which will be affected by security constraints as well. To get around this you need to sign your applet as one must sign a web start application as well. > > Have these issues been identified before, and is > anyone working on them? Otherwise, I can fix it. > > -- > Ja mata ne. > Helio Perroni Filho Wade ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642