JRuby

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: JRuby 1.0.0
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Linux Suse
    java 1.5
    Rails 1.2.3
    Jruby 1.0
    ActiveRecord-JDBC 0.4
  • Number of attachments :
    0

Description

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

Activity

Hide
Nick Sieger added a comment -

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.

Show
Nick Sieger added a comment - 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.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: