Topic
  • 3 replies
  • Latest Post - ‏2007-09-10T17:41:39Z by Stan
SystemAdmin
SystemAdmin
1525 Posts

Pinned topic ERROR 08001: No suitable driver

‏2006-03-15T15:57:57Z |
I was reading the ODBC programming using Apache Derby, on the web page
http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0409kartha/, test the ODBC driver with derby.

It has the error, ERROR 08001: No suitable driver when trying to connect to the derby network server with ij.bat.

I have the window DB2 Run-time client lite version installed on my window XP system.

Following the steps in the ODBC programming using Apache Derby.

1. Start the Derby NetWork Server
(from a DOS prompt)
C:\>C:\db-derby-10.1.2.1-bin\frameworks\NetworkServer\bin\startNetworkServer.bat
Server is ready to accept connections on port 1527.
Connection number: 1.

2. Connect to the Derby Network Server using the 'ij' tool to create the database
(from another DOS prompt)
C:\>C:\db-derby-10.1.2.1-bin\frameworks\NetworkServer\bin\ij.bat
C:\>rem set DERBY_INSTALL=
C:\>set IJ_HOST=localhost
C:\>set IJ_PORT=1527
C:\>set IJ_USER=APP
C:\>set IJ_PASSWORD=APP
C:\>java -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.protocol=jdbc:derby://localhost:1527/ -Dij.user=A
PP -Dij.password=APP org.apache.derby.tools.ij
ij version 10.1
ij> connect 'jdbc:derby:net://localhost:1527/SAMPLE;create=true:user=app;password=app;';
ERROR 08001: No suitable driver
How to solve this problem?

Thanks,
Betty
Updated on 2007-09-10T17:41:39Z at 2007-09-10T17:41:39Z by Stan
  • Stan
    Stan
    267 Posts

    Re: ERROR 08001: No suitable driver

    ‏2006-03-15T18:28:38Z  
    Hi -
    You are using DB2 Universal client URL syntax (subprotocol of ':derby:net:' as well as DB2 client attributes) but specify the Derby Client driver. The subprotocol you are specifying tries to load the DB2 Universal Driver (ij.driver=com.ibm.db2.jcc.DB2Driver) giving 'driver not found'. A correct ij command line and formatted Derby Client URL would be:

    java -Dij.driver=org.apache.derby.jdbc.ClientDriver org.apache.derby.tools.ij
    ij version 10.1

    ij> connect 'jdbc:derby://localhost:1527/SAMPLE;create=true';

    http://NOTE specifying driver on the IJ command line is good form but not required. IJ knows from the URL format which driver to load
  • SystemAdmin
    SystemAdmin
    1525 Posts

    Re: ERROR 08001: No suitable driver

    ‏2007-09-09T10:53:46Z  
    hello betty...
    did u solve the problem? cause i have the exactly the same problem...
    but i have no idea what i'm doing wrong....
    greez mario
  • Stan
    Stan
    267 Posts

    Re: ERROR 08001: No suitable driver

    ‏2007-09-10T17:41:39Z  
    hello betty...
    did u solve the problem? cause i have the exactly the same problem...
    but i have no idea what i'm doing wrong....
    greez mario
    Hi Secret -
    What jars are in your classpath and what connection URL are you using? There are multiple drivers and the proper jarfile must be in the CLASSPATH to avoid this error.