From f8c1f70b7501e0055912bccb89ac8b3d5237557b Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Tue, 6 May 2014 10:00:40 +0200 Subject: [PATCH] 433708 Improve WebAppClassLoader.addClassPath() IllegalStateException message --- .../java/org/eclipse/jetty/webapp/WebAppClassLoader.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppClassLoader.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppClassLoader.java index ad05984fb86..6e9186ebd06 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppClassLoader.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppClassLoader.java @@ -242,7 +242,11 @@ public class WebAppClassLoader extends URLClassLoader else if (resource.isDirectory()) addURL(resource.getURL()); else - throw new IllegalArgumentException("!file: "+resource); + { + if (LOG.isDebugEnabled()) + LOG.debug("Check file exists and is not nested jar: "+resource); + throw new IllegalArgumentException("File not resolvable or incompatible with URLClassloader: "+resource); + } } } }