db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sunitha Kambhampati <ksunitha...@gmail.com>
Subject Re: Problems with Derby 10.1.1 and derbyclient.jar [SQLException: No suitable driver]
Date Sat, 13 Aug 2005 17:35:06 GMT

Kostas Karadamoglou wrote:

> So I tried to use this 
> "jdbc:derby:net://localhost:1527/sampleDb:user=u1;password=p1;" url 
> scheme with the org.apache.derby.jdbc.ClientDriver driver.
> I quess that is my mistake. Isn't it true?

Hi Kostas,

Yes, You need to change the connection url if you want to use the Client 
driver.   So the correct connection url when using the client driver 
(org.apache.derby.jdbc.ClientDriver) will be 
"jdbc:derby://localhost:1527/sampleDb;user=u1;password=p1"

Also note, that support for Client driver has been added only in version 
10.1.

Here are some manual links that you may find helpful:
http://db.apache.org/derby/docs/10.1/adminguide/cadminappsclient.html
http://db.apache.org/derby/docs/10.1/adminguide/radminappsclientxmp.html   
( this has examples).

hope this helps,
Sunitha.

> thank you in advance, Kostas
>
> Sunitha Kambhampati wrote:
>
>> Kostas Karadamoglou wrote:
>>
>>> Hi all,
>>>
>>> I was using Derby 10.0 with db2cc.jar and db2_licensecc.jar in 
>>> network mode. The driver was called com.ibm.db2.jdbcDriver. 
>>> Everything was working fine :)
>>>
>>> But now I changed to 10.1.1. The driver jar is derbyclient.jar and 
>>> the driver org.apache.derby.jdbc.ClientDriver. Whenever I load the 
>>> driver at the DriverManager and try to use getConnection I get the 
>>> following exception:
>>>
>>> java.sql.SQLException: No suitable driver
>>>         at java.sql.DriverManager.getConnection(DriverManager.java:545)
>>>
>>> Do you know how I can solve this problem?
>>>
>>> Thank you in advance, Kostas
>>>
>>>
>> Actually the JCC driver is com.ibm.db2.jcc.DB2Driver.  Can you check 
>> your connection url  again.
>>
>> So when using the client driver , the connection url is of the form  
>> jdbc:derby://</server/>[:</port/>]/ </databaseName/>[;<URL 
>> attribute>=<value> [;...]]
>> Ex , assuming server is running on localhost at port 1527. To connect 
>> via client driver, the url would be    
>> jdbc:derby://localhost:1527/sampleDb;user=u1;password=p1
>>
>> To connect via JCC driver, the connection url would be
>> jdbc:derby:net://localhost:1527/sampleDb:user=u1;password=p1;
>>
>>
>> Hope this helps, if not please feel free to post again, and also 
>> include the connection url you are using.
>>
>> Sunitha.
>>
>>
>>
>
>


Mime
View raw message