I trying to bring a jruby application over to glassfishv3 and am a bit
confused on classloaders.
In Glassfish, when a jar is added to the domain/lib directory, that jar
on the classpath for applications on that domain. I was originally
expecting that I wouldn’t need to do a require for Jruby to access those
classes. However, it seems like I do. When I do a require, I think I’m
having a double loading problem. My situation: mylib points to log4j.
I tell jruby to require both mylib and log4j, i have casting problems
appears that log4j is doubly loaded as a subclass fails to be cast to
base class). When I tell jruby only to load mylib (which depends on
log4j–which should be on classpath), I get a failure to link.
Clearly, I’m don’t have the right model for how classpaths/loaders work
Jruby and Glassfish. Can someone point me to a good overview?
Currently running on java6u16/jruby1.4/glassfishv3ga