Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 929961 - net-p2p/freenet: Missing dev-java/commons-io in the classpath
Summary: net-p2p/freenet: Missing dev-java/commons-io in the classpath
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-04-13 18:54 UTC by jonys
Modified: 2024-06-02 07:00 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jonys 2024-04-13 18:54:41 UTC
While running net-p2p/freenet-0.7.5_p1497, the following message appears over and over in /var/freenet/logs/freenet-latest.log (I abbreviated the backtraces):
```
Caught java.lang.NoClassDefFoundError: org/apache/commons/io/input/NullInputStream running job freenet.support.PooledExecutor$Job@7bdca155
java.lang.NoClassDefFoundError: org/apache/commons/io/input/NullInputStream
        at freenet.client.ArchiveManager.handleTARArchive(ArchiveManager.java:373)
[... backtrace]
java.lang.ClassNotFoundException: org.apache.commons.io.input.NullInputStream
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
        at freenet.client.ArchiveManager.handleTARArchive(ArchiveManager.java:373)
[... backtrace]
```

If I manually add `/usr/share/commons-io-1/lib/commons-io.jar` to its classpath in /etc/freenet-wrapper.conf (in my case as wrapper.java.classpath.16; the number there has to be sequentially after the last existing one) and restart the daemon, the errors disappear.

I believe this should be resolved by adding a direct dependency on dev-java/commons-io – it's currently only a transitive dep through dev-java/commons-compress. The ebuild assembles the classpath in /etc/freenet-wrapper.conf out of the dependencies automatically.

Reproducible: Always
Comment 1 Volkmar W. Pogatzki 2024-04-14 08:33:39 UTC
(In reply to jonys from comment #0)
> [...]
> I believe this should be resolved by adding a direct dependency on
> dev-java/commons-io – it's currently only a transitive dep through
> dev-java/commons-compress. The ebuild assembles the classpath in
> /etc/freenet-wrapper.conf out of the dependencies automatically.
> [...]

Will you provide a pull request?
See https://wiki.gentoo.org/wiki/Creating_GitHub_Pull_Requests
Comment 2 jonys 2024-04-14 13:29:38 UTC
Sure, I'll try. I guess I can't just update the ebuild in-situ, but I have to make a new revision, right?
Comment 3 Volkmar W. Pogatzki 2024-04-14 13:39:50 UTC
(In reply to jonys from comment #2)
> Sure, I'll try. I guess I can't just update the ebuild in-situ, but I have
> to make a new revision, right?

revbump is needed every time an installed file is gonna change. here the affected file would be /usr/share/freenet/package.env
Comment 4 Volkmar W. Pogatzki 2024-04-14 13:42:37 UTC
(In reply to Volkmar W. Pogatzki from comment #3)
> (In reply to jonys from comment #2)
> > Sure, I'll try. I guess I can't just update the ebuild in-situ, but I have
> > to make a new revision, right?
> 
> revbump is needed every time an installed file is gonna change. here the
> affected file would be /usr/share/freenet/package.env

Use git mv
Comment 5 Larry the Git Cow gentoo-dev 2024-06-02 07:00:44 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d62857e9b7f2933d218d66d747647cbca514087

commit 4d62857e9b7f2933d218d66d747647cbca514087
Author:     Jonáš Vidra <vidra@ufal.mff.cuni.cz>
AuthorDate: 2024-04-14 14:04:36 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2024-06-02 07:00:40 +0000

    net-p2p/freenet: Add dep on dev-java/commons-io
    
    The dev-java/commons-io library is always installed thanks to a
    transitive dependency through dev-java/commons-compress, but it doesn't
    get picked up by the classpath builder in the ebuild, resulting in
    runtime errors. Add a direct dep to force it to be present in the
    classpath.
    
    Closes: https://bugs.gentoo.org/929961
    Signed-off-by: Jonáš Vidra <vidra@ufal.mff.cuni.cz>
    Closes: https://github.com/gentoo/gentoo/pull/36252
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 .../{freenet-0.7.5_p1497.ebuild => freenet-0.7.5_p1497-r1.ebuild}      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)