db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramin Moazeni" <rmoaz...@gmail.com>
Subject Regarding DERBY-2905 & jdbcapi/AutoloadTest.java
Date Mon, 13 Aug 2007 19:56:57 GMT
Hello

after adding the following tests to the jdbcapi/AutoloadTest.java to
test DERBY-2905:
public void testAutoloadDriverUnregister()
       throws SQLException
    {
        if(usingEmbedded())
        {
        String url = getTestConfiguration().getJDBCUrl();
        url = url.concat(";create=true");
        String user = getTestConfiguration().getUserName();
        String password = getTestConfiguration().getUserPassword();
        DriverManager.getConnection(url, user, password);
        assertTrue(getRegisteredDrivers("org.apache.derby.jdbc.AutoloadedDriver"));

        try {
        DriverManager.getConnection(
                  "jdbc:derby:;shutdown=true");
        }catch (SQLException e) {
                assertSQLState("XJ015", e);
        }

        assertFalse(getRegisteredDrivers("org.apache.derby.jdbc.AutoloadedDriver"));
        }
    }

I am getting the following error message....Is this problem related to
starting the network server after shutting down the embedded? is there
any way to fix this?

Please advise...

Thanks
Ramin

1) AutoloadTest: clientjava.lang.Exception:
DRDA_LoadException.S:Unexpected exce
          ption while loading Derby JDBC Driver:
 No suitable driver
        at org.apache.derby.impl.drda.NetworkServerControlImpl.consolePropertyMe
                                            ssageWork(Unknown Source)
        at org.apache.derby.impl.drda.NetworkServerControlImpl.consolePropertyMe
                                            ssage(Unknown Source)
        at org.apache.derby.impl.drda.NetworkServerControlImpl.startNetworkServe
                                            r(Unknown Source)
        at org.apache.derby.impl.drda.NetworkServerControlImpl.start(Unknown
Sou                                             rce)
        at org.apache.derby.drda.NetworkServerControl.start(Unknown Source)
        at org.apache.derbyTesting.junit.NetworkServerTestSetup.startWithAPI(Net

workServerTestSetup.java:150)
        at org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkSer
                                            verTestSetup.java:126)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
                                            )
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)

FAILURES!!!
Tests run: 2,  Failures: 0,  Errors: 1

Mime
View raw message