Skip to content
This repository was archived by the owner on Apr 2, 2021. It is now read-only.

Commit ce3033b

Browse files
gialiguorijameshilliard
authored andcommitted
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.
1 parent 6cea0cc commit ce3033b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/devsoap/plugin/JettyServerRunner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static void main(String[] args) throws Exception {
7676

7777
handler.setContextPath("/");
7878
handler.setBaseResource(Resource.newResource(webAppDir));
79-
handler.setParentLoaderPriority(true);
79+
handler.setParentLoaderPriority(false);
8080

8181
handler.setExtraClasspath(String.join(";", classesDirs) + ";" + resourcesDir);
8282

0 commit comments

Comments
 (0)