Forum: JRuby Calling overloaded Class Method

07426bc321f9f519e7545e650c6cbe3b?d=identicon&s=25 Frank Behrens (fbehrens)
on 2013-11-22 10:15
(Received via mailing list)
Hello !

I want to use Lotus Domino with JRUBY and have issues with calling

NotesFactory.createSession((String)null, (String) null, "pw");
(this is fro a working example)

from Jruby(1.7.8). When i call

NotesFactory.create_session(nil,nil,'pw')

other signatures are randomly (!) called.

I tried

NotesFactory.java_send(:create_session,[Java::string,Java::string,Java::string],nil,nil,'pw')
>(TypeError) cannot convert instance of class org.jruby.RubyModule to class
java.lang.Class

as well as

class NotesFactory
  class << self
    java_alias :create_local_session, :create_session,
[Java::string,Java::string,Java::string]
  end
end
NotesFactory.create_local_session(nil,nil,'pw')
>ArgumentError: wrong number of arguments calling `java_alias` (3 for 2)

Can anybody help out with suggestions ?
That would be very nice

Thank you

Frank
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.