Issue Type: Bug Bug
Affects Versions: JRuby 1.7.0.RC2
Assignee: Thomas E Enebo
Created: 20/Oct/12 2:02 PM
Description:

I am getting a {ClassCastException} trying to inherit from {AbstractModule} (a Guice class). This probably isn't the simplest base case to reproduce, but it's still very simple code. I'm not sure which part is broken, so presenting here in context.

To reproduce, follow the "Getting Started" instructions in this example app:
https://github.com/xaviershay/jruby-guice/tree/abstract-module

INFO: An exception was caught and reported. Message: java.lang.ClassCastException: net.rhnh.ComplexModule cannot be cast to org.jruby.java.proxies.JavaProxy
java.lang.ClassCastException: net.rhnh.ComplexModule cannot be cast to org.jruby.java.proxies.JavaProxy
	at org.jruby.java.invokers.RubyToJavaInvoker.castJavaProxy(RubyToJavaInvoker.java:178)
	at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:58)
	at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:127)
	at org.jruby.runtime.callsite.SuperCallSite.cacheAndCall(SuperCallSite.java:366)
	at org.jruby.runtime.callsite.SuperCallSite.callBlock(SuperCallSite.java:192)
	at org.jruby.runtime.callsite.SuperCallSite.call(SuperCallSite.java:197)
	at org.jruby.runtime.callsite.SuperCallSite.callVarargs(SuperCallSite.java:108)
	at org.jruby.ast.ZSuperNode.interpret(ZSuperNode.java:104)
	at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
	at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
	at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182)
	at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:192)
	at org.jruby.RubyClass.finvoke(RubyClass.java:753)
	at org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:523)
	at net.rhnh.ComplexModule.configure(ComplexModule.java:104)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
	at com.google.inject.spi.Elements.getElements(Elements.java:101)
	at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
	at com.google.inject.Guice.createInjector(Guice.java:95)
	at com.google.inject.Guice.createInjector(Guice.java:72)
	at com.google.inject.Guice.createInjector(Guice.java:62)
	at net.rhnh.JrubyGuiceExample.complexExample(JrubyGuiceExample.java:19)
	at net.rhnh.JrubyGuiceExample.main(JrubyGuiceExample.java:9)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Environment: Mac OS X Lion 10.7.5
Project: JRuby
Priority: Minor Minor
Reporter: Xavier Shay
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to