Sunay Shah [
http://community.jboss.org/people/sunay] created the discussion
"Re: couldn't get value for file 'classes/java/lang/bsh.class"
To view the discussion, visit:
http://community.jboss.org/message/575083#575083
--------------------------------------------------------------
I resolved the issue by my self, for those who are facing the same problem , i am writing
solution for them,
Actually In a decision handler when you try to initialize the beanshell engine , you have
ProcessContextClassLoader but actually you suppose to have webContextClassloader so it is
not able to load the BeanShellEngine because it is not able to find the relavent classes
that are available in a jar for beanshell. You actually have WebContextClass Loader ,
following code in decision handler will work
ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); // This code
will give you ProcessClassLoader
Thread.currentThread().setContextClassLoader(Thread.currentThread().getContextClassLoader().getParent());
//Above line will set WebContextClassLoader in current thread's classloader now you
can write you Beanshell related stuff
and finally in finally block you can set your class loader to
Thread.currentThread().setContextClassLoader(oldClassloader); // that is your
processClass Loader
Thanks
Sunay
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/575083#575083]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]