From d5ee95f15b23d891a5c3ab0417c35b4051073e1e Mon Sep 17 00:00:00 2001 From: Andy Li Date: Tue, 28 Apr 2020 16:31:30 +0800 Subject: [PATCH] Fix: JAXB NoClassDefFoundError on Java 9+ (#218) JAXB APIs are considered to be a part of Java EE and was removed by default in Java SE 9. See: https://stackoverflow.com/a/47412779/6238618 --- build.gradle | 1 + src/com/sheepit/client/Server.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 7070c05d..c0f700ea 100644 --- a/build.gradle +++ b/build.gradle @@ -36,6 +36,7 @@ dependencies { compile 'net.lingala.zip4j:zip4j:1.3.3' compile 'net.java.dev.jna:jna-platform:5.0.0' compile 'org.simpleframework:simple-xml:2.7.1' + compile 'javax.xml.bind:jaxb-api:2.3.1' implementation 'com.formdev:flatlaf:0.30' } diff --git a/src/com/sheepit/client/Server.java b/src/com/sheepit/client/Server.java index e3ac9ffb..97dfcffa 100644 --- a/src/com/sheepit/client/Server.java +++ b/src/com/sheepit/client/Server.java @@ -340,7 +340,7 @@ else if (freeMemory > 0 && maxMemory > 0) { script += jobData.getRenderTask().getScript(); - String validationUrl = URLDecoder.decode(jobData.getRenderTask().getValidationUrl()); + String validationUrl = URLDecoder.decode(jobData.getRenderTask().getValidationUrl(), "UTF-8"); Job a_job = new Job( this.user_config,