Hi All,
Google has shown me several workarounds for not using Class.forName, but
I
just spent a day and a half figuring out that the reason a java library
I
was consuming fails under JRuby but works fine with a similar java test
program is that it makes a call to
org.yaml.snakeyaml.constructor.Constructor’s getClassForName(String
name)
method:
protected Class<?> getClassForName(String name)
throwsClassNotFoundException {
return Class.forName(name);
}
In JRuby, this causes a ClassNotFoundException which baffled myself and
the
titan and cassandra user groups for a while (because it’s working for
everyone else, but everyone else is consuming it through a plain old
java
program). What do you guys do in situations like this? Monkey-patch
org.yaml.snakeyaml.constructor.Constructor? Is that easy to
do/possible?
Thanks!
Mark