Issue Details (XML | Word | Printable)

Key: DERBY-92
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Raj Subramani
Votes: 0
Watchers: 0
Operations

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

Cannot connect to Derby using DB2 Universal Driver

Created: 07/Dec/04 04:59 PM   Updated: 27/Sep/06 12:45 AM
Return to search
Component/s: Documentation
Affects Version/s: 10.0.2.1
Fix Version/s: 10.1.1.0

Time Tracking:
Not Specified

Environment: JDK 1.4.x
Issue Links:
Duplicate
 


 Description  « Hide
As per the Server & Admi guide, the Derby network server should be accesible using the DB2 Universal Driver.
namely,
db2jcc.jar
db2jcc_license_c.jar

I have a (licensed) copy of the above driver which which I am able to connect to Cloudscape-DB2 v5.1.2.

Howver using the same driver jars I am unable to connect to Derby, the trace as follows:

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at db.connection.TestConnection.setUp(TestConnection.java:34)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)



My connectivity properties are:

db.driver=com.ibm.db2.jcc.DB2Driver
db.url=jdbc:derby:net://localhost/&lt;db name>:bootPassword=<password>
db.user=demo
db.password=demo

The Derby database was created using ij and is an encrypted database. I am able to connect to Derby with the embedded driver

db.driver=db.driver=org.apache.derby.jdbc.EmbeddedDriver
db.url=jdbc:derby:H:/raruslibri-hibernate/db/derby_10_0_2_1/raruslibri;bootPassword=<password>
db.user=demo
db.password=demo


NOTE: The use of the ";" for bootPassword in embedded mode and the use of ":" in the network mode. This is as per the docs (and I have even tried using ";" for the networked mode but it will still not connect).


I then went and downloaded Clodscape 10 and used
db2jcc.jar
db2jcc_license_c.jar
from this distribution.

When I used the ":" syntax for the bootpassword, as per the docs I got:

com.ibm.db2.jcc.c.SqlException: Invalid database url syntax: jdbc:derby:net://localhost/&lt;db name>:bootPassword=<password>
at com.ibm.db2.jcc.DB2Driver.tokenizeURLProperties(DB2Driver.java:555)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:131)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at db.connection.TestConnection.setUp(TestConnection.java:34)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)


However, using a ";" before bootPassword=...

results in a SUCCESSFUL connection.


I think it might be useful to state that it will work only with Cloudscape 10.0 (or above) IBM Universal drivers.

Also given that this licensed driver may expire after some time (as per the IBM license file), it makes it diffult to use this over a longer term. Will there be a AF licensed network driver for Derby?




 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Andrew McIntyre made changes - 02/Jun/05 05:42 AM
Field Original Value New Value
Link This issue is duplicated by DERBY-93 [ DERBY-93 ]
Andrew McIntyre made changes - 02/Jun/05 05:51 AM
Assignee Samuel Andrew McIntyre [ fuzzylogic ]
Andrew McIntyre made changes - 02/Jun/05 05:52 AM
Assignee Samuel Andrew McIntyre [ fuzzylogic ]
Andrew McIntyre made changes - 04/Jun/05 02:59 PM
Description As per the Server & Admi guide, the Derby network server should be accesible using the DB2 Universal Driver.
namely,
db2jcc.jar
db2jcc_license_c.jar

I have a (licensed) copy of the above driver which which I am able to connect to Cloudscape-DB2 v5.1.2.

Howver using the same driver jars I am unable to connect to Derby, the trace as follows:

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at db.connection.TestConnection.setUp(TestConnection.java:34)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)



My connectivity properties are:

db.driver=com.ibm.db2.jcc.DB2Driver
db.url=jdbc:derby:net://localhost/&lt;db name>:bootPassword=<password>
db.user=demo
db.password=demo

The Derby database was created using ij and is an encrypted database. I am able to connect to Derby with the embedded driver

db.driver=db.driver=org.apache.derby.jdbc.EmbeddedDriver
db.url=jdbc:derby:H:/raruslibri-hibernate/db/derby_10_0_2_1/raruslibri;bootPassword=<password>
db.user=demo
db.password=demo


NOTE: The use of the ";" for bootPassword in embedded mode and the use of ":" in the network mode. This is as per the docs (and I have even tried using ";" for the networked mode but it will still not connect).


I then went and downloaded Clodscape 10 and used
db2jcc.jar
db2jcc_license_c.jar
from this distribution.

When I used the ":" syntax for the bootpassword, as per the docs I got:

com.ibm.db2.jcc.c.SqlException: Invalid database url syntax: jdbc:derby:net://localhost/&lt;db name>:bootPassword=<password>
at com.ibm.db2.jcc.DB2Driver.tokenizeURLProperties(DB2Driver.java:555)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:131)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at db.connection.TestConnection.setUp(TestConnection.java:34)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)


However, using a ";" before bootPassword=...

results in a SUCCESSFUL connection.


I think it might be useful to state that it will work only with Cloudscape 10.0 (or above) IBM Universal drivers.

Also given that this licensed driver may expire after some time (as per the IBM license file), it makes it diffult to use this over a longer term. Will there be a AF licensed network driver for Derby?


As per the Server & Admi guide, the Derby network server should be accesible using the DB2 Universal Driver.
namely,
db2jcc.jar
db2jcc_license_c.jar

I have a (licensed) copy of the above driver which which I am able to connect to Cloudscape-DB2 v5.1.2.

Howver using the same driver jars I am unable to connect to Derby, the trace as follows:

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at db.connection.TestConnection.setUp(TestConnection.java:34)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)



My connectivity properties are:

db.driver=com.ibm.db2.jcc.DB2Driver
db.url=jdbc:derby:net://localhost/&lt;db name>:bootPassword=<password>
db.user=demo
db.password=demo

The Derby database was created using ij and is an encrypted database. I am able to connect to Derby with the embedded driver

db.driver=db.driver=org.apache.derby.jdbc.EmbeddedDriver
db.url=jdbc:derby:H:/raruslibri-hibernate/db/derby_10_0_2_1/raruslibri;bootPassword=<password>
db.user=demo
db.password=demo


NOTE: The use of the ";" for bootPassword in embedded mode and the use of ":" in the network mode. This is as per the docs (and I have even tried using ";" for the networked mode but it will still not connect).


I then went and downloaded Clodscape 10 and used
db2jcc.jar
db2jcc_license_c.jar
from this distribution.

When I used the ":" syntax for the bootpassword, as per the docs I got:

com.ibm.db2.jcc.c.SqlException: Invalid database url syntax: jdbc:derby:net://localhost/&lt;db name>:bootPassword=<password>
at com.ibm.db2.jcc.DB2Driver.tokenizeURLProperties(DB2Driver.java:555)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:131)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at db.connection.TestConnection.setUp(TestConnection.java:34)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)


However, using a ";" before bootPassword=...

results in a SUCCESSFUL connection.


I think it might be useful to state that it will work only with Cloudscape 10.0 (or above) IBM Universal drivers.

Also given that this licensed driver may expire after some time (as per the IBM license file), it makes it diffult to use this over a longer term. Will there be a AF licensed network driver for Derby?


Component/s Documentation [ 11406 ]
Andrew McIntyre made changes - 04/Jun/05 03:00 PM
Fix Version/s 10.1.0.0 [ 10993 ]
Kathey Marsden made changes - 15/Dec/05 09:56 AM
Status Open [ 1 ] Closed [ 6 ]
Alan Cabrera made changes - 27/Sep/06 12:45 AM
Link This issue is duplicated by DERBY-93 [ DERBY-93 ]
Alan Cabrera made changes - 27/Sep/06 12:45 AM
Link This issue is duplicated by DERBY-93 [ DERBY-93 ]