Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.java > #11626 > unrolled thread

Help to detect java classes in drop-seq (covid-19 relevant) needed

Started byAndreas Tille <andreas@an3as.eu>
First post2020-05-20 13:30 +0200
Last post2020-05-21 21:40 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.debian.maint.java


Contents

  Help to detect java classes in drop-seq (covid-19 relevant) needed Andreas Tille <andreas@an3as.eu> - 2020-05-20 13:30 +0200
    Re: Help to detect java classes in drop-seq (covid-19 relevant) needed Felix Natter <fnatter@gmx.net> - 2020-05-20 18:20 +0200
      Re: Help to detect java classes in drop-seq (covid-19 relevant)  needed Andreas Tille <andreas@fam-tille.de> - 2020-05-20 22:30 +0200
        Re: Help to detect java classes in drop-seq (covid-19 relevant)  needed Andreas Tille <andreas@an3as.eu> - 2020-05-21 14:50 +0200
          Re: Help to detect java classes in drop-seq (covid-19 relevant) needed Felix Natter <fnatter@gmx.net> - 2020-05-21 21:40 +0200

#11626 — Help to detect java classes in drop-seq (covid-19 relevant) needed

FromAndreas Tille <andreas@an3as.eu>
Date2020-05-20 13:30 +0200
SubjectHelp to detect java classes in drop-seq (covid-19 relevant) needed
Message-ID<A8v59-4ls-11@gated-at.bofh.it>
Hi,

I've started packaging of drop-seq[1] and replaced those JARs that are
replacable by Debian packaged versions.  I also have set CLASS_PATH in
d/rules, but it seems to be ignored.  I have dealt with similar cases by
patching it into build.xml but here I have not found the relevant place
to do so.  I'm aware that I did not yet added all needed classes to
CLASS_PATH, but currently I get


   dh_auto_build
        ant -Duser.name debian
Buildfile: /build/drop-seq-2.3.0+dfsg/build.xml
  [taskdef] Could not load definitions from resource testngtasks. It could not be found.

compile-src:
    [mkdir] Created dir: /build/drop-seq-2.3.0+dfsg/classes
    [javac] Compiling 201 source files to /build/drop-seq-2.3.0+dfsg/classes
    [javac] /build/drop-seq-2.3.0+dfsg/src/java/org/broadinstitute/dropseqrna/TranscriptomeException.java:28: error: package htsjdk.samtools does not exist
    [javac] import htsjdk.samtools.SAMException;
    [javac]                       ^
    [javac] /build/drop-seq-2.3.0+dfsg/src/java/org/broadinstitute/dropseqrna/TranscriptomeException.java:34: error: cannot find symbol
    [javac] public class TranscriptomeException extends SAMException
    [javac]                                             ^
    [javac]   symbol: class SAMException
...


but /usr/share/java/htsjdk.jar which is in CLASS_PATH contains this class.

Any hint how to take this hurdle would be welcome.

Kind regards

       Andreas.


[1] https://salsa.debian.org/med-team/drop-seq

-- 
http://fam-tille.de

[toc] | [next] | [standalone]


#11627

FromFelix Natter <fnatter@gmx.net>
Date2020-05-20 18:20 +0200
Message-ID<A8zBM-77U-11@gated-at.bofh.it>
In reply to#11626
Andreas Tille <andreas@an3as.eu> writes:

> Hi,

hello Andreas,

> I've started packaging of drop-seq[1] and replaced those JARs that are
> replacable by Debian packaged versions.  I also have set CLASS_PATH in
> d/rules, but it seems to be ignored.  I have dealt with similar cases by
> patching it into build.xml but here I have not found the relevant place
> to do so.  I'm aware that I did not yet added all needed classes to
> CLASS_PATH, but currently I get
>
>
>    dh_auto_build
>         ant -Duser.name debian
> Buildfile: /build/drop-seq-2.3.0+dfsg/build.xml
>   [taskdef] Could not load definitions from resource testngtasks. It could not be found.
>
> compile-src:
>     [mkdir] Created dir: /build/drop-seq-2.3.0+dfsg/classes
>     [javac] Compiling 201 source files to /build/drop-seq-2.3.0+dfsg/classes
>     [javac] /build/drop-seq-2.3.0+dfsg/src/java/org/broadinstitute/dropseqrna/TranscriptomeException.java:28: error: package htsjdk.samtools does not exist
>     [javac] import htsjdk.samtools.SAMException;
>     [javac]                       ^
>     [javac] /build/drop-seq-2.3.0+dfsg/src/java/org/broadinstitute/dropseqrna/TranscriptomeException.java:34: error: cannot find symbol
>     [javac] public class TranscriptomeException extends SAMException
>     [javac]                                             ^
>     [javac]   symbol: class SAMException
> ...

Since the upstream jars were in ${lib}, you need to point ${lib} to /usr/share/java/:

diff --git a/debian/patches/debian_packaged_libs.patch b/debian/patches/debian_packaged_libs.patch
index 1d3790c..4fc1ed9 100644
--- a/debian/patches/debian_packaged_libs.patch
+++ b/debian/patches/debian_packaged_libs.patch
@@ -1,6 +1,6 @@
 --- a/build.xml
 +++ b/build.xml
-@@ -35,7 +35,7 @@
+@@ -35,13 +35,15 @@
      <property name="classes.test" location="testclasses"/>
      <property name="test.output" location="dist/test"/>
      <property name="javadoc" location="javadoc"/>
@@ -9,3 +9,13 @@
      <property name="public.dir" location="."/>

      <!-- INIT -->
+     <path id="classpath">
+-        <fileset dir="${lib}">
+-            <include name="*.jar"/>
++        <fileset dir="/usr/share/java">
++            <include name="htsjdk.jar"/>
++            <include name="picard.jar"/>
++            <include name="commons-collections4.jar"/>
+         </fileset>
+     </path>
+     <path id="test.classpath">

You have to add more libraries like these.

Cheers and Best Regards,
--
Felix Natter
debian/rules!

[toc] | [prev] | [next] | [standalone]


#11628 — Re: Help to detect java classes in drop-seq (covid-19 relevant) needed

FromAndreas Tille <andreas@fam-tille.de>
Date2020-05-20 22:30 +0200
SubjectRe: Help to detect java classes in drop-seq (covid-19 relevant) needed
Message-ID<A8DvH-101-9@gated-at.bofh.it>
In reply to#11627
HI Felix,

On Wed, May 20, 2020 at 06:12:54PM +0200, Felix Natter wrote:
> 
> Since the upstream jars were in ${lib}, you need to point ${lib} to /usr/share/java/:
> 
> diff --git a/debian/patches/debian_packaged_libs.patch b/debian/patches/debian_packaged_libs.patch
> index 1d3790c..4fc1ed9 100644
> --- a/debian/patches/debian_packaged_libs.patch
> +++ b/debian/patches/debian_packaged_libs.patch
> @@ -1,6 +1,6 @@
>  --- a/build.xml
>  +++ b/build.xml
> -@@ -35,7 +35,7 @@
> +@@ -35,13 +35,15 @@
>       <property name="classes.test" location="testclasses"/>
>       <property name="test.output" location="dist/test"/>
>       <property name="javadoc" location="javadoc"/>
> @@ -9,3 +9,13 @@
>       <property name="public.dir" location="."/>
> 
>       <!-- INIT -->
> +     <path id="classpath">
> +-        <fileset dir="${lib}">
> +-            <include name="*.jar"/>
> ++        <fileset dir="/usr/share/java">
> ++            <include name="htsjdk.jar"/>
> ++            <include name="picard.jar"/>
> ++            <include name="commons-collections4.jar"/>
> +         </fileset>
> +     </path>
> +     <path id="test.classpath">
> 
> You have to add more libraries like these.

Thanks.  This was pretty helpful.  Now I need to package the
remaining JAR which is not yet packaged from

   http://la4j.org/

...

Kind regards

      Andreas.

-- 
http://fam-tille.de

[toc] | [prev] | [next] | [standalone]


#11629 — Re: Help to detect java classes in drop-seq (covid-19 relevant) needed

FromAndreas Tille <andreas@an3as.eu>
Date2020-05-21 14:50 +0200
SubjectRe: Help to detect java classes in drop-seq (covid-19 relevant) needed
Message-ID<A8SO8-1Qp-5@gated-at.bofh.it>
In reply to#11628
Hi,

On Wed, May 20, 2020 at 10:07:48PM +0200, Andreas Tille wrote:
> 
> Thanks.  This was pretty helpful.  Now I need to package the
> remaining JAR which is not yet packaged from
> 
>    http://la4j.org/

I made some progress and also uploaded libla4j-java[1] to new.  With
this I tried to build drop-seq[2] and stumbled upon two issues:

At first a lintian issue:

W: drop-seq-tools: classpath-contains-relative-path usr/share/java/dropseq-2.3.0.jar: lib/FastInfoset-1.2.12.jar, lib/FastInfoset.jar, lib/FastInf
N: 
N:    The classpath listed in the jar file refers to a potential missing jar
N:    file. This could be the remnants of a build-time classpath that are not
N:    relevant for a JAR bundled in a Debian package.
N:    
N:    Alternatively, the classpath may be correct, but the package is lacking
N:    a jar file or a symlink to it.
N:    
N:    Note, Lintian assumes that all (relative) classpaths pointing to
N:    /usr/share/java/ (but not subdirs thereof) are satisfied by dependencies
N:    as long as there is at least one strong libX-java dependency.
N:    
N:    Severity: warning
N:    
N:    Check: languages/java

I have no idea what this means.  A `grep -Ri fastinfoset` inside the source
tree remains empty.

The other one is a runtime error of the wrapper script:

$ drop-seq 
Error: Could not find or load main class org.broadinstitute.dropseqrna.cmdline.DropSeqMain
Caused by: java.lang.NoClassDefFoundError: picard/cmdline/PicardCommandLine

Any idea what might be wrong here?

Thanks a lot for any help

      Andreas.


[1] https://salsa.debian.org/med-team/libla4j-java
[2] https://salsa.debian.org/med-team/drop-seq

-- 
http://fam-tille.de

[toc] | [prev] | [next] | [standalone]


#11630

FromFelix Natter <fnatter@gmx.net>
Date2020-05-21 21:40 +0200
Message-ID<A8ZcR-5JF-5@gated-at.bofh.it>
In reply to#11629
Andreas Tille <andreas@an3as.eu> writes:

> Hi,

hello Andreas,

> On Wed, May 20, 2020 at 10:07:48PM +0200, Andreas Tille wrote:
>>
>> Thanks.  This was pretty helpful.  Now I need to package the
>> remaining JAR which is not yet packaged from
>>
>>    http://la4j.org/
>
> I made some progress and also uploaded libla4j-java[1] to new.  With
> this I tried to build drop-seq[2] and stumbled upon two issues:
>
> At first a lintian issue:
>
> W: drop-seq-tools: classpath-contains-relative-path usr/share/java/dropseq-2.3.0.jar: lib/FastInfoset-1.2.12.jar, lib/FastInfoset.jar, lib/FastInf
> N:
> N:    The classpath listed in the jar file refers to a potential missing jar
> N:    file. This could be the remnants of a build-time classpath that are not
> N:    relevant for a JAR bundled in a Debian package.
> N:
> N:    Alternatively, the classpath may be correct, but the package is lacking
> N:    a jar file or a symlink to it.
> N:
> N:    Note, Lintian assumes that all (relative) classpaths pointing to
> N:    /usr/share/java/ (but not subdirs thereof) are satisfied by dependencies
> N:    as long as there is at least one strong libX-java dependency.
> N:
> N:    Severity: warning
> N:
> N:    Check: languages/java
>
> I have no idea what this means.  A `grep -Ri fastinfoset` inside the source
> tree remains empty.
>

The (current) problem is this in the jar-executable target:

        <pathconvert property="classpath.manifest" refid="classpath" pathsep=" ">
            <chainedmapper>
                <flattenmapper/>
                <globmapper from="*.jar" to="lib/*.jar"/>
            </chainedmapper>
        </pathconvert>

This causes the classpath for the runnable jar to be prefixed with lib/,
but /usr/share/java/lib/... (or lib/...) does not exist. Please try to change it to:

        <pathconvert property="classpath.manifest" refid="classpath" pathsep=" ">
           <flattenmapper/>
        </pathconvert>

> The other one is a runtime error of the wrapper script:
>
> $ drop-seq
> Error: Could not find or load main class org.broadinstitute.dropseqrna.cmdline.DropSeqMain
> Caused by: java.lang.NoClassDefFoundError:
> picard/cmdline/PicardCommandLine

This is a likely consequence of the lintian above: the dropseq jar does
not refer to the correct classpath entry for picard.jar.

If it still does not work, please post the META-INF/MANIFEST.MF contents
of the usr/share/java/dropseq-2.3.0.jar (you can rename it to .zip, then
open it with an archiver).

Cheers and Best Regards,
--
Felix Natter
debian/rules!

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.java


csiph-web