Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 279847 - [PATCH] dev-java/commons-io-1.4 fails testing due to java.lang.NoClassDefFoundError
Summary: [PATCH] dev-java/commons-io-1.4 fails testing due to java.lang.NoClassDefFoun...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-01 04:07 UTC by Daniel Solano Gómez
Modified: 2015-05-18 13:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to update ebuild so that it can find junit.jar (commons-io-1.4.ebuild.patch,511 bytes, text/plain)
2009-08-01 04:12 UTC, Daniel Solano Gómez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Solano Gómez 2009-08-01 04:07:24 UTC
When commons-io prepares to run its tests, it runs the target 'check-availability' to determine whether or not jUnit is available.  From what I can tell, this test succeeds if ${junit.jar} exists.  Unfortunately, this test looks for the file '/usr/local/junit3.8.1/junit.jar'.  When it isn't found, it attempts to download it from the web.

On my system (with firewalls and proxies in place) this download fails, and when Ant tries to run exec.test, I get the following exception:

Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/TestRunner
Caused by: java.lang.ClassNotFoundException: junit.textui.TestRunner
...

To me, the easiest resolution to this problem is to add '-Djunit.jar="$(java-pkg_getjars junit)"' to the test eant call.  With this added, everything works well.  However, I don't know if this is the most appropriate method to resolve the problem.

I will attach a patch to update the ebuild as described above.
Comment 1 Daniel Solano Gómez 2009-08-01 04:12:20 UTC
Created attachment 199780 [details]
Patch to update ebuild so that it can find junit.jar
Comment 2 Wormo (RETIRED) gentoo-dev 2009-08-01 06:18:24 UTC
Thanks for reporting the test failure, and your fix! Assigning to java maintainers.
Comment 3 Patrice Clement gentoo-dev 2015-05-18 13:43:18 UTC
+  18 May 2015; Patrice Clement <monsieurp@gentoo.org> -commons-io-1.4.ebuild,
+  commons-io-2.4.ebuild:
+  Remove old.
+

No longer in the tree. Consider using version 2.0.1 (current stable) or 2.4. Thank you.