db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5677) ClassNotFoundException when running suites.All without derbynet.jar
Date Thu, 29 Mar 2012 08:31:58 GMT

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

Knut Anders Hatlen updated DERBY-5677:

    Attachment: d5677-1a-exclude.diff

Attached is a patch that makes suites.All pass both with and without derbynet.jar in my environment.
It makes the following changes:

- derbynet/DerbyNetNewServer.java:

The test cases in this class require the network server, so I made the suite() method return
an empty suite if the server isn't available.

- derbynet/NSSecurityMechanismTest.java:

This class couldn't be loaded by derbynet._Suite because of some local variables of type NetworkServerControl
(which is a class in derbynet.jar). Not sure exactly why this caused a problem, as other test
classes have local variables of that type and can still be loaded. In any case, the class
loaded just fine when I changed it to use some helper methods in NetworkServerTestSetup to
access NetworkServerControl.

- engine/RestrictiveFilePermissionsTest.java:

One of the test cases starts an external network server. I made suite() skip that test case
when the server classes are not available.

- replicationTests/ReplicationSuite.java:

The ReplicationRun class uses NetworkServerControl in some of its method signatures and cannot
be loaded if derbynet.jar isn't on the classpath. I made ReplicationSuite return an empty
suite if there is no network server, so that it doesn't try to load the ReplicationRun class.
> ClassNotFoundException when running suites.All without derbynet.jar
> -------------------------------------------------------------------
>                 Key: DERBY-5677
>                 URL: https://issues.apache.org/jira/browse/DERBY-5677
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: d5677-1a-exclude.diff
> There is some logic in the test harness to allow test runs without derbynet.jar on the
classpath (to test the embedded engine only). When I tried this on head of trunk, it failed
with java.lang.ClassNotFoundException: org.apache.derby.drda.NetworkServerControl when setting
up the test suites, so no tests started.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message