Author: rgielen
Date: Thu May  7 21:15:45 2009
New Revision: 772776

URL: http://svn.apache.org/viewvc?rev=772776&view=rev
Log:
WW-3121:
Print a helpful message when a container's virtual filesystem architecture 
prevents the reloading classloader to work correctly. Afterwards exception is 
rethrown

Modified:
    
struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/classloader/ReloadingClassLoader.java

Modified: 
struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/classloader/ReloadingClassLoader.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/classloader/ReloadingClassLoader.java?rev=772776&r1=772775&r2=772776&view=diff
==============================================================================
--- 
struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/classloader/ReloadingClassLoader.java
 (original)
+++ 
struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/classloader/ReloadingClassLoader.java
 Thu May  7 21:15:45 2009
@@ -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
  */
@@ -53,6 +53,12 @@
             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);


Reply via email to