From aea64d87faf55a74f914b6f10f7875685b25b14d Mon Sep 17 00:00:00 2001 From: gialiguori <43948310+gialiguori@users.noreply.github.com> Date: Mon, 8 Oct 2018 10:09:14 +0200 Subject: [PATCH] Update JettyServerRunner.java Setting ParentLoaderPriority to true seem to cause classes in dependency jar to be loaded by the system class loader and not by the webapp one. Causing conflict error when try to perform reflection operations with web app loaded classes. If you set it to false (the default), Jetty uses standard webapp classloading priority. --- src/main/java/com/devsoap/plugin/JettyServerRunner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/devsoap/plugin/JettyServerRunner.java b/src/main/java/com/devsoap/plugin/JettyServerRunner.java index 4a7f292c..71ae7ad9 100644 --- a/src/main/java/com/devsoap/plugin/JettyServerRunner.java +++ b/src/main/java/com/devsoap/plugin/JettyServerRunner.java @@ -76,7 +76,7 @@ public static void main(String[] args) throws Exception { handler.setContextPath("/"); handler.setBaseResource(Resource.newResource(webAppDir)); - handler.setParentLoaderPriority(true); + handler.setParentLoaderPriority(false); handler.setExtraClasspath(String.join(";", classesDirs) + ";" + resourcesDir);