This post originated from an RSS feed registered with Java Buzz
by Anthony Eden.
Original Post: JBoss, BSF, BeanShell and ClassLoading
Feed Title: All Things
Feed URL: http://allthings.mp/
Feed Description: Blogging about Java, Python, technology and generally anything which is of interest to me.
I am having a helluva time with JBoss, BSF and BeanShell. You see, JBoss version 3.2.1 includes a copy of the BeanShell JAR as well as a BeanShell deployer. If I try to deploy JPublish (which uses BSF to allow actions to be written in any supported scripting language) and the scripting language of choice is BeanShell then I am getting all IllegalAccessErrors. It appears that a classloader (either JBoss or BSF) is improperly trying to load some BeanShell classes from one of the JARs and some from the other. Suffice to say that this is resulting in things not working properly.
One solution for the moment is to remove the BeanShell JAR which is found in the lib directory (i.e. $JBOSS_HOME/server/default/lib/ ). However this only gets rid of the IllegalAccessErrors but there is still another problem: none of the JARs in the WAR's WEB-INF/lib directory are available to the scripts.