db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-4872) 'No suitable Driver' - Drivers don't get auto-loaded when only derbyrun.jar is in the classpath with ibm 1.6 jvm.
Date Wed, 16 Mar 2011 23:44:29 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Myrna van Lunteren updated DERBY-4872:

    Attachment: ReproDerby4872.java

uploading a second, simpler version of the repro. 

when running this with ibm 1.6:
java -cp ".:./derbyrun.jar" ReproDerby4872
we get:
java.sql.SQLException: No suitable driver
ava.sql.SQLException: No suitable driver
       at java.sql.DriverManager.getConnection(DriverManager.java:330)
       at java.sql.DriverManager.getConnection(DriverManager.java:273)
       at ReproDerby4872.main(ReproDerby4872.java:10)

but running this:
java -cp ".:./derbyrun.jar;derby.jar" ReproDerby4872
gives the expected:
Connection succeeded, we used url (getMetadata.getURL): jdbc:derby:memory:tst4872db

> 'No suitable Driver' - Drivers don't get auto-loaded when only derbyrun.jar is in the
classpath with ibm 1.6 jvm.
> -----------------------------------------------------------------------------------------------------------------
>                 Key: DERBY-4872
>                 URL: https://issues.apache.org/jira/browse/DERBY-4872
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions:
>         Environment: Windows XP, with IBM 1.6 SR8 (and Sun/Oracle's 1.6.0_21-b07 for
>            Reporter: Myrna van Lunteren
>            Priority: Minor
>              Labels: derby_triage10_8
>         Attachments: ReproDerby4872.java, ReproDerby4872.java
> With 1.6 jvms, doing DriverManager.getConnection() should autoload all drivers in the
classpath. If I understand this correctly, it's based on what's in the manifest.mf, so it
makes sense that you'd need to have jars, not just classes in the classpath.
> But, with ibm 1.6 jvm, if I have only derbyrun.jar in the classpath, I get the message
'No suitable driver' with both the client, and the embedded driver. 
> However, if I add derby.jar to the classpath, the error goes away for the embedded driver,
and if I add derbyclient.jar, it goes away for the client driver.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message