Hi again, On Tue, Apr 14, 2020 at 10:50:28PM +0200, Andreas Tille wrote: > 1 Test Suite : > rcdk rcdk Unit Tests - 31 test functions, 31 errors, 0 failures > ERROR in test.charges: Error in > .jnew("org/openscience/cdk/smiles/SmilesParser", get.chem.object.builder()) : > java.lang.NoClassDefFoundError: com/google/common/collect/Multimap
I inspected the cdk-2.3.jar from upstream and found out that it is bundling way more classes. It also contains the missing com/google/common/collect/Multimap which happens to be in the Debian packaged guava.jar. I went forward with checking what else is in cdk-2.3.jar and added several other missing JARs as symlink to the dir where r-cran-rcdk is building its CLASSPATH from. I'm a bit concerned since in META-INF/DEPENDENCIES is Apache Jena, including the Jena IRI library which is not packaged yet. But so far I was successful with bringing down the number of test suite errors. However, there are some remaining ones I can not directly attach to missing classes. Here is the output of the test suite: Running unit tests $pkg [1] "rcdk" $getwd [1] "/tmp/autopkgtest.4IabgP/autopkgtest_tmp" $pathToUnitTests [1] "/usr/lib/R/site-library/rcdk/unitTests" Loading required package: rcdklibs Executing test function test.charges ... done successfully. Executing test function test.get.hcount ... done successfully. Executing test function test.is.aromatic ... done successfully. Executing test function test.depictiongenerator ... Timing stopped at: 0.005 0.004 0.004 Error in .jnew("org.openscience.cdk.depict.DepictionGenerator") : java.lang.ClassNotFoundException done successfully. Executing test function test.fp ... Timing stopped at: 1.429 0.016 0.403 Error in .jnew("org/openscience/cdk/fingerprint/ShortestPathFingerprinter", : java.lang.NoClassDefFoundError: org/apache/commons/math3/random/RandomGenerator done successfully. Executing test function test.fp.substructures.binary ... done successfully. Executing test function test.fp.substructures.count ... done successfully. Executing test function test.frag1 ... done successfully. Executing test function test.frag2 ... done successfully. Executing test function test.frag3 ... done successfully. Executing test function test.aromaticity.match ... Timing stopped at: 0.013 0 0.004 Error in .jfindClass(as.character(class)) : java.lang.ClassNotFoundException done successfully. Executing test function test.match1 ... Timing stopped at: 0.012 0 0.004 Error in .jfindClass(as.character(class)) : java.lang.ClassNotFoundException done successfully. Executing test function test.match2 ... Timing stopped at: 0.004 0 0.003 Error in .jfindClass(as.character(class)) : java.lang.ClassNotFoundException done successfully. Executing test function test.match3 ... Timing stopped at: 0.018 0 0.005 Error in .jfindClass(as.character(class)) : java.lang.ClassNotFoundException done successfully. Executing test function test.match4 ... Timing stopped at: 0.02 0.004 0.006 Error in .jfindClass(as.character(class)) : java.lang.ClassNotFoundException done successfully. Executing test function test.mcs1 ... Timing stopped at: 0.028 0 0.008 Error in .jcall("org.guha.rcdk.util.Misc", "Lorg/openscience/cdk/interfaces/IAtomContainer;", : java.lang.NoClassDefFoundError: org/openscience/cdk/smsd/Isomorphism done successfully. Executing test function test.mcs2 ... Timing stopped at: 0.024 0 0.006 Error in .jcall("org.guha.rcdk.util.Misc", "[[I", "getMcsAsAtomIndexMapping", : java.lang.NoClassDefFoundError: org/openscience/cdk/smsd/Isomorphism done successfully. Executing test function test.mcs3 ... Timing stopped at: 0.024 0 0.007 Error in .jcall("org.guha.rcdk.util.Misc", "Lorg/openscience/cdk/interfaces/IAtomContainer;", : java.lang.NoClassDefFoundError: org/openscience/cdk/smsd/Isomorphism done successfully. Executing test function test.get.properties ... WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by RJavaTools to method java.util.Collections$UnmodifiableCollection$1.next() WARNING: Please consider reporting this to the maintainers of RJavaTools WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release done successfully. Executing test function test.set.props ... done successfully. Executing test function test.atom.count ... done successfully. Executing test function test.desc.calc ... org.openscience.cdk.io.cml.CMLHandler WARN: Detected unknown convention: cdk:substructureList done successfully. Executing test function test.desc.cats ... [1] "protein" "hybrid" "constitutional" "topological" [5] "electronic" "geometrical" Timing stopped at: 0.078 0.004 0.029 Error in checkEquals(5, length(cats)) : Mean relative difference: 0.2 done successfully. Executing test function test.desc.names ... done successfully. Executing test function test.exact.natural.mass ... done successfully. Executing test function test.formula ... Timing stopped at: 0.161 0.012 0.067 Error in load.molecules(formula_file) : java.lang.NoClassDefFoundError: org/openscience/cdk/aromaticity/CDKHueckelAromaticityDetector done successfully. Executing test function test.get.largest ... done successfully. Executing test function test.is.connected ... done successfully. Executing test function test.is.neutral ... done successfully. Executing test function test.get.smiles ... done successfully. Executing test function test.get.smiles2 ... Timing stopped at: 0.003 0 0.003 Error in .jcall("org.guha.rcdk.util.Misc", "Lorg/openscience/cdk/interfaces/IAtomContainer;", : java.lang.NoClassDefFoundError: org/openscience/cdk/smsd/Isomorphism done successfully. ------------------- UNIT TEST SUMMARY --------------------- RUNIT TEST PROTOCOL -- Wed Apr 15 09:40:11 2020 *********************************************** Number of test functions: 31 Number of errors: 12 Number of failures: 1 1 Test Suite : rcdk rcdk Unit Tests - 31 test functions, 12 errors, 1 failure ERROR in test.depictiongenerator: Error in .jnew("org.openscience.cdk.depict.DepictionGenerator") : java.lang.ClassNotFoundException ERROR in test.fp: Error in .jnew("org/openscience/cdk/fingerprint/ShortestPathFingerprinter", : java.lang.NoClassDefFoundError: org/apache/commons/math3/random/RandomGenerator ERROR in test.aromaticity.match: Error in .jfindClass(as.character(class)) : java.lang.ClassNotFoundException ERROR in test.match1: Error in .jfindClass(as.character(class)) : java.lang.ClassNotFoundException ERROR in test.match2: Error in .jfindClass(as.character(class)) : java.lang.ClassNotFoundException ERROR in test.match3: Error in .jfindClass(as.character(class)) : java.lang.ClassNotFoundException ERROR in test.match4: Error in .jfindClass(as.character(class)) : java.lang.ClassNotFoundException ERROR in test.mcs1: Error in .jcall("org.guha.rcdk.util.Misc", "Lorg/openscience/cdk/interfaces/IAtomContainer;", : java.lang.NoClassDefFoundError: org/openscience/cdk/smsd/Isomorphism ERROR in test.mcs2: Error in .jcall("org.guha.rcdk.util.Misc", "[[I", "getMcsAsAtomIndexMapping", : java.lang.NoClassDefFoundError: org/openscience/cdk/smsd/Isomorphism ERROR in test.mcs3: Error in .jcall("org.guha.rcdk.util.Misc", "Lorg/openscience/cdk/interfaces/IAtomContainer;", : java.lang.NoClassDefFoundError: org/openscience/cdk/smsd/Isomorphism FAILURE in test.desc.cats: Error in checkEquals(5, length(cats)) : Mean relative difference: 0.2 ERROR in test.formula: Error in load.molecules(formula_file) : java.lang.NoClassDefFoundError: org/openscience/cdk/aromaticity/CDKHueckelAromaticityDetector ERROR in test.get.smiles2: Error in .jcall("org.guha.rcdk.util.Misc", "Lorg/openscience/cdk/interfaces/IAtomContainer;", : java.lang.NoClassDefFoundError: org/openscience/cdk/smsd/Isomorphism Error: unit testing failed (#test failures: 1, #R errors: 12) Execution halted Since there are several NoClassDefFoundError concerning cdk itself I'd like to re-ask here again. In vain I also tried to simply symlink everything that is in /usr/share/java due to given Build-Depends and tried the test suite again. This leads to *more* errors than I have with the hand crafted list in https://salsa.debian.org/r-pkg-team/r-cran-rcdklibs/-/blob/master/debian/rules and the errors are slightly different. I wonder whether there might be some light of inspiration enhance my poking in the dark a bit. Thanks for any help so far Andreas. -- http://fam-tille.de