globalbioticinteractions / nomer

maps identifiers and names to other identifiers and names
GNU General Public License v3.0
19 stars 3 forks source link

plazi treatment matcher fails with due to commons-io library conflict #66

Closed jhpoelen closed 2 years ago

jhpoelen commented 2 years ago

when running Nomer v0.2.8 -

[main] ERROR org.globalbioticinteractions.nomer.cmd.CmdLine - org.apache.commons .io.input.CloseShieldInputStream.wrap(Ljava/io/InputStream;)Lorg/apache/commons/ io/input/CloseShieldInputStream; java.lang.NoSuchMethodError: org.apache.commons.io.input.CloseShieldInputStream. wrap(Ljava/io/InputStream;)Lorg/apache/commons/io/input/CloseShieldInputStream; at org.globalbioticinteractions.nomer.match.PlaziService.indexTreatments (PlaziService.java:160) at org.globalbioticinteractions.nomer.match.PlaziService.lazyInit(PlaziS ervice.java:116)

A glance at the dependency tree shows both commons-io versions 2.7 and 2.10 present.

Suspected root cause - a commons-io library conflict.

jhpoelen commented 2 years ago

from nomer dependency tree:

org.eol:eol-globi-doi-resolver:jar:0.23.2:compile [INFO] | - org.eol:eol-globi-lib:jar:0.23.2:compile [INFO] | +- org.globalbioticinteractions:doi4j:jar:0.1.0:compile [INFO] | +- org.apache.commons:commons-text:jar:1.3:compile [INFO] | +- org.apache.commons:commons-collections4:jar:4.4:compile [INFO] | +- commons-io:commons-io:jar:2.7:compile

and

+- net.sourceforge.htmlunit:htmlunit:jar:2.53.0:compile [INFO] | +- xalan:xalan:jar:2.7.2:compile [INFO] | | - xalan:serializer:jar:2.7.2:compile [INFO] | +- org.apache.commons:commons-text:jar:1.9:compile [INFO] | +- org.apache.httpcomponents:httpmime:jar:4.5.13:compile [INFO] | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.53.0:compile [INFO] | +- net.sourceforge.htmlunit:neko-htmlunit:jar:2.53.0:compile [INFO] | | - xerces:xercesImpl:jar:2.12.0:compile [INFO] | | - xml-apis:xml-apis:jar:1.4.01:compile [INFO] | +- net.sourceforge.htmlunit:htmlunit-cssparser:jar:1.10.0:compile [INFO] | +- commons-io:commons-io:jar:2.10.0:compile

jhpoelen commented 2 years ago

fixed in v0.2.9

jhpoelen commented 2 years ago

using nomer v0.2.9 -

$ echo -e "\tHomo sapiens" | nomer append plazi
    Homo sapiens    SAME_AS http://taxon-concept.plazi.org/id/Animalia/Homo_sapiens_Linnaeus_1758   Homo sapiens    species     Animalia | Chordata | Mammalia | Primates | Hominidae | Homo | Homo sapiens     kingdom | phylum | class | order | family | genus | species http://taxon-concept.plazi.org/id/Animalia/Homo_sapiens_Linnaeus_1758   
    Homo sapiens    SAME_AS http://treatment.plazi.org/id/34AC185C73C41EA124EEED97C898FBC0  http://treatment.plazi.org/id/34AC185C73C41EA124EEED97C898FBC0          http://treatment.plazi.org/id/34AC185C73C41EA124EEED97C898FBC0          http://treatment.plazi.org/id/34AC185C73C41EA124EEED97C898FBC0  
    Homo sapiens    SAME_AS doi:10.5281/zenodo.3917332  doi:10.5281/zenodo.3917332          doi:10.5281/zenodo.3917332          https://doi.org/10.5281/zenodo.3917332