Hello Sunitha,

Yes I was using com.ibm.db2.jcc.DB2Driver. I did a mistake!

I have an database that was being operated by Derby 10.0. What I changed was the derby.jar and derbynet.jar at the server and the derbyclient.jar at the client. However I kept the database url same. 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?

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.




Reply via email to