Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#989961: picard-tools: Wrong classpath in PicardCommandLine

53 views
Skip to first unread message

Vincent Danjean

unread,
Jun 16, 2021, 4:20:03 PM6/16/21
to
Package: picard-tools
Version: 2.24.1+dfsg-1
Severity: normal
Tags: patch

Hi,

The package correctly depends on libcommons-math3-java,
but /usr/share/java/commons-math3.jar is not added in the classpath
in /usr/bin/PicardCommandLine, leading to errors (in some situations)
such as:
[Tue Jun 15 15:59:20 CEST 2021] picard.analysis.CollectWgsMetrics done. Elapsed time: 135.31 minutes.
Runtime.totalMemory()=6954156032
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/math3/random/RandomGenerator
at picard.analysis.CollectWgsMetrics$WgsMetrics.calculateDerivedFields(CollectWgsMetrics.java:433)
at picard.analysis.CollectWgsMetrics$WgsMetrics.<init>(CollectWgsMetrics.java:248)
at picard.analysis.CollectWgsMetrics.generateWgsMetrics(CollectWgsMetrics.java:551)
at picard.analysis.CollectWgsMetrics.generateWgsMetrics(CollectWgsMetrics.java:591)
at picard.analysis.AbstractWgsMetricsCollector.getMetrics(AbstractWgsMetricsCollector.java:175)
at picard.analysis.AbstractWgsMetricsCollector.addToMetricsFile(AbstractWgsMetricsCollector.java:132)
at picard.analysis.WgsMetricsProcessorImpl.addToMetricsFile(WgsMetricsProcessorImpl.java:127)
at picard.analysis.CollectWgsMetrics.doWork(CollectWgsMetrics.java:494)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:295)
at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:103)
at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:113)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.math3.random.RandomGenerator
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 11 more

Adding the jar to the classpath in the script fixes the problem.

Regards
Vincent

-- System Information:
Debian Release: 11.0
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armel, mipsel

Kernel: Linux 5.10.0-7-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages picard-tools depends on:
ii default-jre [java6-runtime] 2:1.11-72
ii libpicard-java 2.24.1+dfsg-1
ii openjdk-11-jre [java6-runtime] 11.0.12+4-1
ii openjdk-17-jre [java6-runtime] 17~24-1

picard-tools recommends no packages.

picard-tools suggests no packages.

-- no debconf information

Andreas Tille

unread,
Jun 17, 2021, 6:30:03 AM6/17/21
to
On Wed, Jun 16, 2021 at 10:00:25PM +0200, Vincent Danjean wrote:
> The package correctly depends on libcommons-math3-java,
> but /usr/share/java/commons-math3.jar is not added in the classpath
> in /usr/bin/PicardCommandLine, leading to errors (in some situations)
> such as:
> [Tue Jun 15 15:59:20 CEST 2021] picard.analysis.CollectWgsMetrics done. Elapsed time: 135.31 minutes.
> Runtime.totalMemory()=6954156032
> To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
> ...

I wonder whether this is a grave issue and should be fixed in testing?

Kind regards

Andreas.

--
http://fam-tille.de

Vincent Danjean

unread,
Jun 17, 2021, 7:20:03 AM6/17/21
to
Not all workload are affected, but on the one where the class is needed,
the fix is required.
PicardCommandLine uses the -cp option, so the CLASSPATH envvar is
ignored. The script must be modified to fix the bug.

It seems to me that the fix is small and simple, so a freeze exception
for testing might be asked.

Latter, for unstable, a fix that also add CLASSPATH (if defined) to
the -cp option might be considered.

Regards,
Vincent


>
> Kind regards
>
> Andreas.
>

Andreas Tille

unread,
Jun 17, 2021, 4:00:03 PM6/17/21
to
Hi Vincent,

On Thu, Jun 17, 2021 at 01:04:30PM +0200, Vincent Danjean wrote:
>
> Not all workload are affected, but on the one where the class is needed,
> the fix is required.
> PicardCommandLine uses the -cp option, so the CLASSPATH envvar is
> ignored. The script must be modified to fix the bug.
>
> It seems to me that the fix is small and simple, so a freeze exception
> for testing might be asked.
>
> Latter, for unstable, a fix that also add CLASSPATH (if defined) to
> the -cp option might be considered.

Thank you for the analysis. Given that you are Uploader for this
package would you consider at least commiting the needed changes. If
you have no capacity for an upload I'd happily volunteer to do so.
0 new messages