# "java.sql.SQLException: invalid arguments in call" using Oracle config with JRoR

**URL:** <https://www.ruby-forum.com/t/java-sql-sqlexception-invalid-arguments-in-call-using-oracle-config-with-jror/129465>\
**Category:** Rails\
**Created:** [February 18, 2008, 9:44pm UTC](https://www.ruby-forum.com/t/java-sql-sqlexception-invalid-arguments-in-call-using-oracle-config-with-jror/129465 "2008-02-18T21:44:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 18, 2008, 9:44pm UTC](https://www.ruby-forum.com/t/java-sql-sqlexception-invalid-arguments-in-call-using-oracle-config-with-jror/129465/1 "2008-02-18T21:44:57Z")

</div>

Hi, All, J. Ruby N. here.

I’m trying to get JRuby on Rails to start using Oracle, but I get “The  
driver encountered an error: java.sql.SQLException: invalid arguments  
in call”. I’ve got the driver jar in the right place, because  
it can find OracleDriver.

The trace complains about:

C:/jruby/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.5/lib/  
active\_record/connection\_adapters/jdbc\_adapter.rb,

and by doing puts I find that  
Jdbc::DriverManager.getConnection(url, user, pass) throws an  
exception,  
and the rescue code  
jdbc\_driver.create.connect(url, props)  
throws another exception.

My database.yml:  
…  
development:  
adapter: jdbc  
driver: oracle.jdbc.driver.OracleDriver  
url: jdbc:oracle:thin:@localhost:1521:orcl  
user: rubydevel  
password: rubydevel

I can create a connection with Java just dandy:

Class.forName(“oracle.jdbc.driver.OracleDriver”);  
Connection dbConnection=DriverManager.getConnection(  
“jdbc:oracle:thin:@localhost:1521:orcl”,“rubydevel”,“rubydevel”);

I’m lost. Has anyone come across this?

Thanks,

Andrey

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 18, 2008, 10:45pm UTC](https://www.ruby-forum.com/t/java-sql-sqlexception-invalid-arguments-in-call-using-oracle-config-with-jror/129465/2 "2008-02-18T22:45:58Z")

</div>

Ok. This appears to be a failure of communication between database.yml  
and  
the jdbc\_adapter.rb. jdbc\_adapter expects the driver param to be named  
“username” while all the database.ymls expect the param name user:

def configure\_jdbc  
driver = @config[:driver].to\_s  
user = @config[:username].to\_s  
pass = @config[:password].to\_s  
url = @config[:url].to\_s

Should this be the symbol :user? Is there a standard?
