WaCoDiS / javaps-wacodis-backend

javaPS backend for WaCoDiS processing tools
Apache License 2.0
0 stars 2 forks source link

java.lang.NoSuchMethodError while executing LandCoverClassificationAlgorithm #2

Closed arnevogt closed 5 years ago

arnevogt commented 5 years ago

java.lang.NoSuchMethodError raised while executing _de.hsbo.wacodis.land_coverclassification (LandCoverClassificationAlgorithm). The error is raised when trying to create a Docker Container for the processing tool using docker-java.

Preconditions:

Possible Cause

Built WAR-archive of javaPS-Webapp contains Apache Commons IO Version 2.1 (_WEBINF/lib/commons.io-2.1.jar). Method org.apache.commons.io.IOUtils.readFully is not yet available in version 2.1. A transitive dependency requires a higher version of Apache Commons IO.

Log Files

wacodis_tomcat_wps_log.txt

java.lang.NoSuchMethodError: org.apache.commons.io.IOUtils.readFully(Ljava/io/InputStream;[B)V at com.github.dockerjava.jaxrs.filter.ResponseStatusExceptionFilter.getBodyAsMessage(ResponseStatusExceptionFilter.java:66) ~[docker-java-3.0.14.jar:?] at com.github.dockerjava.jaxrs.filter.ResponseStatusExceptionFilter.filter(ResponseStatusExceptionFilter.java:47) ~[docker-java-3.0.14.jar:?] at org.glassfish.jersey.client.ClientFilteringStages$ResponseFilterStage.apply(ClientFilteringStages.java:109) ~[jersey-client-2.28.jar:?] at org.glassfish.jersey.client.ClientFilteringStages$ResponseFilterStage.apply(ClientFilteringStages.java:97) ~[jersey-client-2.28.jar:?] at org.glassfish.jersey.process.internal.Stages.process(Stages.java:147) ~[jersey-common-2.28.jar:?] at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:259) ~[jersey-client-2.28.jar:?] at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$1 [...]

arnevogt commented 5 years ago

solution approach

Use higher version of Apache Commons IO. The error did not occur after manually changing WEB-INF\lib\commons.io-2.1.jar to commons.io-2.6.jar.

To fix this issue, the project configuration should be changed so that a higher version of Apache Commons IO is included in the resulting WAR archive.

arnevogt commented 5 years ago

issue resolved with commit 573061c to javaPS wacodis/eo-hackathon , excludes outdated versions of Apache Commons IO, enforces at least Version 2.2 of Apache Commons IO.

Use javaPS including commit 573061c to deploy javaps-wacodis-backend