Getting Constructor Not Found (Ruby Java Bridge, RJB)

Discussion in 'Ruby' started by Anukul Singhal, Mar 9, 2010.

  1. Hi,

    I am a newbie to using RJB gem, and this is the issue I am facing.
    Following is my code:

    require 'rjb'

    classpath = "<jar file path>"
    Rjb::load(classpath, ["-DMC_HOME=<dir>"])

    selenium_import =
    Rjb::import('com.thoughtworks.selenium.DefaultSelenium')

    selenium_obj =
    selenium_import.new_with_sig("Ljava.lang.String;Ljava.lang.Integer;Ljava.lang.String;Ljava.lang.String;",
    "localhost", 4444, "*iexplore", "http://www.google.com")

    selenium_obj.open("/")
    selenium_obj.type("q", "rubyist")

    When I run this code, I get the following error:

    RuntimeError: Constructor not found in new_with_sig

    I checked the constructor details of DefaultSelenium java class in
    http://svn.openqa.org/fisheye/brows...om/thoughtworks/selenium/DefaultSelenium.html,
    and matched the sig accordingly, but still I get the constructor error
    everytime.

    Any help to troubleshoot this will be very generous.

    Thanks,
    Anukul
    --
    Posted via http://www.ruby-forum.com/.
     
    Anukul Singhal, Mar 9, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Adam Keys

    rjb and Java 1.5

    Adam Keys, Mar 10, 2006, in forum: Ruby
    Replies:
    0
    Views:
    118
    Adam Keys
    Mar 10, 2006
  2. raf
    Replies:
    0
    Views:
    133
  3. Andre Ferreira

    Ruby and EJavaBeans with RJB

    Andre Ferreira, May 9, 2007, in forum: Ruby
    Replies:
    0
    Views:
    116
    Andre Ferreira
    May 9, 2007
  4. Shashank Agarwal
    Replies:
    2
    Views:
    164
    Tiago Macedo
    Jun 30, 2008
  5. Anukul Singhal
    Replies:
    2
    Views:
    393
    Anukul Singhal
    Sep 12, 2010
Loading...

Share This Page