[Netarchivesuite-users] Unit test case exception: Can't get connectionPool field

YU LI njuliyu at yahoo.com
Fri Jan 6 11:53:00 CET 2012


Hi,


When I try to run those unit test cases that require database, such as ArchiveArcRepositoryTesterSuite, I always get the exception below. It seems the code try to get the field "connectionPool" from class HarvestDBConnection, but I checked the source code and found the class doesn't have such filed defined at all. Could you advise me how to fix this, or I missed something? I am running the code of 3.16.1.


dk.netarkivet.common.exceptions.PermissionDenied: Can't get connectionPool field
    at
 dk.netarkivet.harvester.datamodel.DatabaseTestUtils.takeDatabase(DatabaseTestUtils.java:133)
    at dk.netarkivet.archive.arcrepository.ArcRepositoryDatabaseTester.setUp(ArcRepositoryDatabaseTester.java:164)
    at junit.framework.TestCase.runBare(TestCase.java:128)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:120)
    at junit.framework.TestSuite.runTest(TestSuite.java:230)
    at junit.framework.TestSuite.run(TestSuite.java:225)
    at junit.framework.TestSuite.runTest(TestSuite.java:230)
    at junit.framework.TestSuite.run(TestSuite.java:225)
    at
 org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.NoSuchFieldException: connectionPool
    at java.lang.Class.getDeclaredField(Class.java:1899)
    at dk.netarkivet.harvester.datamodel.DatabaseTestUtils.takeDatabase(DatabaseTestUtils.java:129)
    ... 16 more


Thanks
Yu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ml.sbforge.org/pipermail/netarchivesuite-users/attachments/20120106/f06cf8a2/attachment.html>


More information about the NetarchiveSuite-users mailing list