Issue Details (XML | Word | Printable)

Key: JRUBY-1256
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Thomas E Enebo
Reporter: Gregory Bluvshteyn
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JRuby

Underscore "_" in url:'s host name's part causes java.sql.SQLException: No suitable driver for JDBC with Oracle

Created: 01/Aug/07 10:52 AM   Updated: 22/Aug/07 12:45 AM
Component/s: ActiveRecord-JDBC
Affects Version/s: JRuby 1.0.0
Fix Version/s: None

Time Tracking:
Not Specified

Environment: Linux Suse
java 1.5
Rails 1.2.3
Jruby 1.0
ActiveRecord-JDBC 0.4


 Description  « Hide
I had the following setup in my config/database.yml

development:
adapter: jdbc
driver: oracle.jdbc.driver.OracleDriver
url: jdbc:oracle:thin:@host_name:1530:HOST
username: ...
password: ...

The underscore in url was cosing java.sql.SQLException: No suitable driver

I tried java version 1.5 and 1.6 result was the same until I've inserted IP address and it started to work



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Nick Sieger added a comment - 22/Aug/07 12:45 AM
I'm afraid that this is an issue that we (JRuby) won't be able to address. I suspect the issue is either in the JDBC code, or lower in the Java networking layer.

Note that underscores in hostnames are typically frowned upon:

http://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names

The URL matching rules may be relying on this fact.