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

Søren Vejrup Carlsen svc at kb.dk
Fri Jan 6 12:07:27 CET 2012


Hi Yu.
The reason for this was that we included a major refactoring of how we connect to our harvestDatabase in the 3.16.1 release.
Unfortunately, a lot of our unittests  then failed, and we did not have the time to fix these unittests before the release.

Note that we have just released the 3.18.0, where this problem is fixed:  https://sbforge.org/display/NAS/NetarchiveSuite+3.18.0+Release+Notes

If you really need to fix the unittests in the 3.16.1 code, you can find in the 3.18.0 code how to fix this.
I hope this helps you.

Best Regards
Søren V. Carlsen, Developer of Netarchivesuite
---------------------------------------------------------------------------
Søren Vejrup Carlsen, Department of Digital Preservation, Royal Library, Copenhagen, Denmark
tlf: (+45) 33 47 48 41
email: svc at kb.dk
----------------------------------------------------------------------------
Non omnia possumus omnes
--- Macrobius, Saturnalia, VI, 1, 35 -------



Fra: netarchivesuite-users-bounces at ml.sbforge.org [mailto:netarchivesuite-users-bounces at ml.sbforge.org] På vegne af YU LI
Sendt: 6. januar 2012 11:53
Til: netarchivesuite-users at ml.sbforge.org
Emne: [Netarchivesuite-users] Unit test case exception: Can't get connectionPool field

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/533be465/attachment.html>


More information about the NetarchiveSuite-users mailing list