Resolution: Not A Bug
Affects Version/s: JRuby 1.6.7
Fix Version/s: None
Component/s: Java Integration
Environment:Mac OS X 10.7.3
Java(TM) SE Runtime Environment (build 1.6.0_31-b04-415-11M3635)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-415, mixed mode)
Number of attachments :
In some specific circumstances, methods defined on Java classes are not callable from JRuby. I have observed this happening when the following things come together:
- the instantiated class is a subclass of another Java class,
- the superclass has default visibility,
- the superclass has a generic type parameter, and
- a method is defined on the superclass whose return type is the generic type parameter.
In these circumstances, JRuby thinks that this method does not exist. (It's particularly curious that if the method has a non-generic return type, the method is callable from JRuby!)
Example, using JRuby installed via Maven:
The same exception occurs when trying to call get_proto or getProto.