You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jruby 9.0.0.0-SNAPSHOT (2.2.0p0) 2015-01-22 0dae5d1 Java HotSpot(TM) 64-Bit Server VM 24.72-b04 on 1.7.0_72-b14 +jit [linux-amd64]
AR-JDBC's native RubyJdbcConnection.java class (historically) includes multiple versions of a table ruby method based on argument count. this worked fine on JRuby 1.7/1.6 but is no longer the case on 9K (guessing the last one with IRubyObject[] args "replaces" previous ones) :
... as it has never been supported by JRuby and remain the case on 9K :
java.lang.RuntimeException: Invalid specific-arity number of arguments (4) on method arjdbc.jdbc.RubyJdbcConnection.tables
at org.jruby.internal.runtime.methods.InvocationMethodFactory$DescriptorInfo.<init>(InvocationMethodFactory.java:675)
at org.jruby.internal.runtime.methods.InvocationMethodFactory.getAnnotatedMethodClass(InvocationMethodFactory.java:841)
at org.jruby.internal.runtime.methods.InvocationMethodFactory.getAnnotatedMethod(InvocationMethodFactory.java:785)
at org.jruby.RubyModule.defineAnnotatedMethod(RubyModule.java:816)
at org.jruby.anno.TypePopulator$DefaultTypePopulator.populate(TypePopulator.java:104)
at org.jruby.RubyModule.defineAnnotatedMethodsIndividually(RubyModule.java:808)
at org.jruby.RubyModule.defineAnnotatedMethods(RubyModule.java:709)
at arjdbc.jdbc.RubyJdbcConnection.createJdbcConnectionClass(RubyJdbcConnection.java:138)
at arjdbc.jdbc.AdapterJavaService.basicLoad(AdapterJavaService.java:38)
The text was updated successfully, but these errors were encountered:
kares
changed the title
native extension incompatibility on 9K
native extension method overloading incompatibility on 9K
Jan 28, 2015
This is why it is 2 for 4 error. We have gotten lucky internally that we do not have a JRubyMethod signature like this (with required + rest) and we have made all IRubyObject[] args signatures always work for any submitted arity. This signature makes it clear we should just get this done properly.
Do not specify required = 4 in the IRubyObject[] version. That forces all calls using that path to have at least 4 values. In general, the IRubyObject[] versions of methods should be able to handle all possible argument signatures.
We have run into this a few times before and there's really no good solution. We could make the invokers for [] try to redispatch specific-arity to the right paths but it's a lot more code generation in invoker generation.
jruby 9.0.0.0-SNAPSHOT (2.2.0p0) 2015-01-22 0dae5d1 Java HotSpot(TM) 64-Bit Server VM 24.72-b04 on 1.7.0_72-b14 +jit [linux-amd64]
AR-JDBC's native RubyJdbcConnection.java class (historically) includes multiple versions of a
table
ruby method based on argument count. this worked fine on JRuby 1.7/1.6 but is no longer the case on 9K (guessing the last one withIRubyObject[] args
"replaces" previous ones) :on the Ruby side using this as
@connection.tables(nil, current_schema)
ends up with :is this a bug or a feature (in terms of native extension refactoring) on 9K ?
UPDATE:
also one can not work-around this using the following signature :
... as it has never been supported by JRuby and remain the case on 9K :
The text was updated successfully, but these errors were encountered: