This also fixed my problem. I added the following code to my
initialize method for my admin client class:
JThread = java.lang.Thread
def initialize(nodemanager)
load_from_class =
Java::JavaClass.for_name('com.ibm.websphere.management.AdminClient')
class_loader =
load_from_class.java_class.java_method("getClassLoader").invoke(load_from_class)
JThread.currentThread().setContextClassLoader(class_loader)
<snip>
end
Chris
On Fri, Mar 14, 2008 at 11:58 AM, bemmi <
barbara.mcinnes@...> wrote:
>
> Bless you Lenny - you've just told me why I'm getting my error. Did you find
> out "is there a reason why JRuby doesn't set the current Java thread's
> contextClassLoader to the JRubyClassLoader?" Is it a bug or by design?
>
>
>
> Lenny Marks wrote:
> >
> > I had run into problems with things loading classes with
> > Thread.contextClassLoader(see below). Sounds like it could be a
> > similar issue for you.
> >
> >
http://www.ruby-forum.com/topic/127354#568081> >
> > -lenny
> >
>
> --
> View this message in context:
http://www.nabble.com/Dynamically-adding-to-classpath-tp15841856p16048584.html>
> Sent from the JRuby - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
>
>
> To unsubscribe from this list, please visit:
>
>
http://xircles.codehaus.org/manage_email>
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email