Issue 47: Extensions loaded using wrong classloader #96

Open
consiliens opened this Issue Aug 26, 2011 · 0 comments

Projects

None yet

1 participant

@consiliens
Contributor

"Reported by project member rib...@google.com, Mar 29, 2011
What steps will reproduce the problem?

  1. Compile class "A" that defines a macro.
  2. Compile another file that references class A

Loading the extension class fails:
java.lang.NoClassDefFoundError: duby/lang/compiler/Macro (Mirah::InternalCompilerError)

The problem is in lib/mirah/jvm/types/intrinsics.rb. When loading extensions from disk it uses this code:
JRuby.runtime.jruby_class_loader.loadClass(class_name)

The problem is that class_name is likely in the system classpath, but it needs to be loaded from the JRubyClassLoader because that's where the mirah jars are.

We really need an isolated class loader that only includes the bootstrap classpath and the compilation classpath."
http://code.google.com/p/mirah/issues/detail?id=47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment