Forum: JRuby Calling overloaded Class Method

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
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
This topic is locked and can not be replied to.