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

Commit

Permalink
Update JettyServerRunner.java
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gialiguori authored and jameshilliard committed Oct 9, 2019
1 parent 6cea0cc commit ce3033b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/devsoap/plugin/JettyServerRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ce3033b

Please sign in to comment.