[ http://issues.apache.org/jira/browse/DERBY-930?page=all ]

Rick Hillegas updated DERBY-930:
--------------------------------

    Attachment: bug930_problem2.diff

The next attachment (bug930_problem2.diff) shows that the problem is not in 
Derby's drivers. The problem occurs with a DummyDriver which prints out some 
diagnostics. Without a SecurityManager, Class.forName() is called on the 
autoloadable drivers under DriverManager.getConnection(). However, we never get 
to this Class.forName() when there is a SecurityManager. The contents of this 
problem case are:

A      java\engine\org\apache\derby\jdbc\DummyDriver.java
M      java\engine\org\apache\derby\jdbc\build.xml
A      
java\testing\org\apache\derbyTesting\functionTests\tests\jdbcapi\AutoloadDriver.java
A      autoloadscript
M      build.xml
M      tools\jar\extraDBMSclasses.properties
A      autoload.policy

When there is a SecurityManager, the following invocation of Class.forName() is 
not reached:

java.lang.Throwable: static initializer trace
        at org.apache.derby.jdbc.DummyDriver.<clinit>(DummyDriver.java:14)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at sun.misc.Service$LazyIterator.next(Service.java:271)
        at java.sql.DriverManager.loadInitialDrivers(DriverManager.java:477)
        at java.sql.DriverManager.initialize(DriverManager.java:579)
        at java.sql.DriverManager.getConnection(DriverManager.java:532)
        at java.sql.DriverManager.getConnection(DriverManager.java:150)
        at 
org.apache.derbyTesting.functionTests.tests.jdbcapi.AutoloadDriver.getConnection(AutoloadDriver.java:80)
        at 
org.apache.derbyTesting.functionTests.tests.jdbcapi.AutoloadDriver.execute(AutoloadDriver.java:52)
        at 
org.apache.derbyTesting.functionTests.tests.jdbcapi.AutoloadDriver.main(AutoloadDriver.java:41)


> Add support for autoloading of Derby client drivers
> ---------------------------------------------------
>
>          Key: DERBY-930
>          URL: http://issues.apache.org/jira/browse/DERBY-930
>      Project: Derby
>         Type: New Feature
>     Reporter: Rick Hillegas
>     Assignee: Rick Hillegas
>  Attachments: bug930.diff, bug930_problem.diff, bug930_problem2.diff
>
> Write Derby's driver names into the correct spot in derby.jar and 
> derbyclient.jar so that the 1.6 vm autoloads Derby drivers. Section 10.2.1 of 
> the JDBC4 spec describes the details.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to