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


Groups > linux.debian.maint.java > #11567

Re: Help needed for calling Java class from R

From Andreas Tille <andreas@an3as.eu>
Newsgroups linux.debian.maint.java
Subject Re: Help needed for calling Java class from R
Date 2020-04-14 20:00 +0200
Message-ID <zVy0N-75l-3@gated-at.bofh.it> (permalink)
References <zVws2-6he-3@gated-at.bofh.it> <zVx4L-6uv-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Apr 14, 2020 at 06:52:56PM +0200, Florian Weimer wrote:
> * Andreas Tille:
> > ERROR: loading failed
> > * removing '/build/r-cran-rcdk-3.5.0/debian/r-cran-rcdk/usr/lib/R/site-library/rcdk'
> > dh_auto_install: error: R CMD INSTALL -l /build/r-cran-rcdk-3.5.0/debian/r-cran-rcdk/usr/lib/R/site-library --clean . "--built-timestamp='Mon, 23 Mar 2020 21:27:30 +0100'" returned exit code 1
> > make: *** [debian/rules:4: binary] Error 25
> > dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
> > I: copying local configuration
> > E: Failed autobuilding of package
> >
> >
> > I verified in the pbuilder chroot that the missing class exists in CLASSPATH:
> >
> > root:/# grep NitrogenRule /usr/share/java/*
> > Binary file /usr/share/java/cdk-formula-2.3.jar matches
> > Binary file /usr/share/java/cdk-formula.jar matches
> 
> Please check if /usr/share/java/cdk-interfaces.jar is on the
> classpath.  The missing class is
> org.openscience.cdk.exception.CDKException (apparently a
> superinterface of org.openscience.cdk.formula.rules.NitrogenRule), and
> it's contained in that JAR file.

This is a good hint.  So I tried:


$ git diff
diff --git a/debian/rules b/debian/rules
index 529c38a..bde1d1b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,6 @@
 #!/usr/bin/make -f
 
+export CLASSPATH=/usr/share/java/cdk-interfaces.jar:/usr/share/java/cdk-silent.jar
+
 %:
        dh $@ --buildsystem R


and while the first error vanished that way I get the next one:


*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for 'rcdk':
 .onLoad failed in loadNamespace() for 'rcdk', details:
  call: .jcall("org/openscience/cdk/silent/SilentChemObjectBuilder", 
  error: RcallMethod: cannot determine object class
Error: loading failed
Execution halted
ERROR: loading failed
* removing '/build/r-cran-rcdk-3.5.0/debian/r-cran-rcdk/usr/lib/R/site-library/rcdk'
dh_auto_install: error: R CMD INSTALL -l /build/r-cran-rcdk-3.5.0/debian/r-cran-rcdk/usr/lib/R/site-library --clean . "--built-timestamp='Mon, 23 Mar 2020 21:27:30 +0100'" returned exit code 1
make: *** [debian/rules:6: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2


root:/# grep SilentChemObjectBuilder /usr/share/java/*
Binary file /usr/share/java/cdk-silent-2.3.jar matches
Binary file /usr/share/java/cdk-silent.jar matches

Seems I did not really understood the trick to set CLASSPATH. :-(

Kind regards and thanks so far

      Andreas.

-- 
http://fam-tille.de

Back to linux.debian.maint.java | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Help needed for calling Java class from R Andreas Tille <andreas@an3as.eu> - 2020-04-14 18:20 +0200
  Re: Help needed for calling Java class from R Florian Weimer <fw@deneb.enyo.de> - 2020-04-14 19:00 +0200
    Re: Help needed for calling Java class from R Andreas Tille <andreas@an3as.eu> - 2020-04-14 20:00 +0200
      Re: Help needed for calling Java class from R Florian Weimer <fw@deneb.enyo.de> - 2020-04-14 20:50 +0200
        Re: Help needed for calling Java class from R Andreas Tille <andreas@an3as.eu> - 2020-04-14 23:00 +0200
          Re: Help needed for calling Java class from R Andreas Tille <andreas@an3as.eu> - 2020-04-15 12:20 +0200

csiph-web