Skip to content

Commit

Permalink
WW-3121:
Browse files Browse the repository at this point in the history
Print a helpful message when a container's virtual filesystem architecture prevents the reloading classloader to work correctly. Afterwards exception is rethrown

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@772776 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
rgielen committed May 7, 2009
1 parent a428f78 commit ef0eca1
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* The ReloadingClassLoader uses a delegation mechanism to allow
* classes to be reloaded. That means that loadClass calls may
* return different results if the class was changed in the underlying
* ResoruceStore.
* ResourceStore.
* <p/>
* class taken from Apache JCI
*/
Expand All @@ -53,6 +53,12 @@ public ReloadingClassLoader(final ClassLoader pParent) {
stores = new ResourceStore[]{new FileResourceStore(new File(root.toURI()))};
} catch (URISyntaxException e) {
throw new StrutsException("Unable to start the reloadable class loader, consider setting 'struts.convention.classes.reload' to false", e);
} catch (RuntimeException e) {
// see WW-3121
// TODO: Fix this for a reloading mechanism to be marked as stable
LOG.error("Exception while trying to build the ResourceStore for URL " + root.toString(), e);
LOG.error("Consider setting struts.convention.classes.reload=false");
throw e;
}

delegate = new ResourceStoreClassLoader(parent, stores);
Expand Down

0 comments on commit ef0eca1

Please sign in to comment.