cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

I have a stateless session bean that attempts to send a

query to an Oracle database. I am getting a

"java.sql.SQLException: No suitable driver" exception,

which I understand usually indicates that the class

loader found the JDBC driver class (classes12.zip is in

the Java build path), but the syntax of the URL

connection string isn't correct.

This is the way the code initializes the driver and url

parameters (cs is an IConnectionSpec object):

cs.setPropertyValue("driver", "oracle.jdbc.driver.OracleDriver");
cs.setPropertyValue("url", "jdbc:oracle:thin:@host:1521:orcl" ); 

I have also tried using "oracle.jdbc.OracleDriver" for

the driver, as specified in

http://cfguru.daemon.com.au/archives/000078.html, but to

no avail. The URL syntax is consistent with the syntax

described in the same link, so is there some other

explanation for this exception? Or is there an

inconsistency or error with the way the url

is specified?

Thanks for any help with this,

Colm.

0 Likes
View Entire Topic
Former Member
0 Likes

Hi,

Try

cs.setPropertyValue("driver", "oracle.jdbc.OracleDriver");

cs.setPropertyValue("url", "jdbc:oracle:thin:@host:1521:orcl","usn","pwd" );