Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Getting Constructor Not Found (Ruby Java Bridge, RJB)

Thread Tools

Getting Constructor Not Found (Ruby Java Bridge, RJB)

Anukul Singhal
Posts: n/a

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.DefaultSele nium')

selenium_obj =
selenium_import.new_with_sig("Ljava.lang.String;Lj ava.lang.Integer;Ljava.lang.String;Ljava.lang.Stri ng;",
"localhost", 4444, "*iexplore", "")"/")
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,
and matched the sig accordingly, but still I get the constructor error

Any help to troubleshoot this will be very generous.

Posted via

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
A constructor calling another constructor (default constructor)? Generic Usenet Account C++ 10 11-28-2007 04:12 AM
NewBie - java constructor error can't find constructor Java 6 02-20-2007 04:29 AM
java like constructor calling constructor lallous C++ 5 01-23-2004 11:52 PM
Constructor on type System......WebControl not found Mike Owen ASP .Net 3 12-02-2003 11:00 AM
why it's not possible calling constructor from constructor? Giulio C++ 9 06-25-2003 03:56 PM