Author: markt
Date: Mon Aug 15 18:59:03 2011
New Revision: 1157949

URL: http://svn.apache.org/viewvc?rev=1157949&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51654
Log an error message if an appBase is specified that is not a directory and 
disable automatic deployment to prevent subsequent errors.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java
    
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties
    
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings_es.properties
    
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings_ja.properties
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug 15 18:59:03 2011
@@ -1 +1 @@
-/tomcat/trunk:1156171,1156276,1156304,1156530,1156602,1157015,1157018,1157810,1157832,1157834,1157847,1157908
+/tomcat/trunk:1156171,1156276,1156304,1156530,1156602,1157015,1157018,1157810,1157832,1157834,1157847,1157908,1157939

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=1157949&r1=1157948&r2=1157949&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java Mon 
Aug 15 18:59:03 2011
@@ -1318,6 +1318,13 @@ public class HostConfig
             }
         }
 
+        if (!appBase().isDirectory()) {
+            log.error(sm.getString(
+                    "hostConfig.appBase", host.getName(), 
appBase().getPath()));
+            host.setDeployOnStartup(false);
+            host.setAutoDeploy(false);
+        }
+
         if (host.getDeployOnStartup())
             deployApps();
         

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=1157949&r1=1157948&r2=1157949&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties 
Mon Aug 15 18:59:03 2011
@@ -72,7 +72,7 @@ engineConfig.stop=EngineConfig: Processi
 expandWar.copy=Error copying {0} to {1}
 expandWar.deleteFailed=[{0}] could not be completely deleted. The presence of 
the remaining files may cause problems
 expandWar.illegalPath=The archive [{0}] is malformed and will be ignored: an 
entry contains an illegal path [{1}] which was not expanded to [{2}] since that 
is outside of the defined docBase [{3}]
-hostConfig.appBase=Application base directory {0} does not exist
+hostConfig.appBase=Application base [{1}] for host [{0}] does not exist or is 
not a directory. deployOnStartUp and autoDeploy have been set to false to 
prevent deployment errors. Other errors may still occur.
 hostConfig.canonicalizing=Error delete redeploy resources from context [{0}]
 hostConfig.cce=Lifecycle event data object {0} is not a Host
 hostConfig.context.remove=Error while removing context [{0}]

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings_es.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings_es.properties?rev=1157949&r1=1157948&r2=1157949&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings_es.properties
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings_es.properties
 Mon Aug 15 18:59:03 2011
@@ -71,7 +71,6 @@ engineConfig.stop = "EngineConfig"\: Pro
 expandWar.copy = Error copiando {0} a {1}
 expandWar.deleteFailed = [{0}] no pudo ser completamente borrado. La presencia 
de los ficheros restantes puede causar problemas
 expandWar.illegalPath = The archive [{0}] is malformed and will be ignored\: 
an entry contains an illegal path [{1}] which was not expanded to [{2}] since 
that is outside of the defined docBase [{3}]
-hostConfig.appBase = No existe el directorio base de la aplicaci\u00F3n {0}
 hostConfig.canonicalizing = Error al borrar redespliegue de recursos desde 
contexto [{0}]
 hostConfig.cce = El objeto de los datos de evento de ciclo de vida (Lifecycle 
event data object) {0} no es una m\u00E1quina (host)
 hostConfig.context.remove = Error al quitar contexto [{0}]

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings_ja.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings_ja.properties?rev=1157949&r1=1157948&r2=1157949&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings_ja.properties
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings_ja.properties
 Mon Aug 15 18:59:03 2011
@@ -35,7 +35,6 @@ embedded.noEngines=\u307e\u3060\u30a8\u3
 
engineConfig.cce=\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30a4\u30d9\u30f3\u30c8\u30c7\u30fc\u30bf\u30aa\u30d6\u30b8\u30a7\u30af\u30c8
 {0} \u306f\u30a8\u30f3\u30b8\u30f3\u3067\u306f\u3042\u308a\u307e\u305b\u3093
 engineConfig.start=EngineConfig: 
\u51e6\u7406\u3092\u958b\u59cb\u3057\u307e\u3059
 engineConfig.stop=EngineConfig: 
\u51e6\u7406\u3092\u505c\u6b62\u3057\u307e\u3059
-hostConfig.appBase=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d9\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea
 {0} \u306f\u5b58\u5728\u3057\u307e\u305b\u3093
 
hostConfig.cce=\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30a4\u30d9\u30f3\u30c8\u30c7\u30fc\u30bf\u30aa\u30d6\u30b8\u30a7\u30af\u30c8
 {0} \u306f\u30db\u30b9\u30c8\u3067\u306f\u3042\u308a\u307e\u305b\u3093
 
hostConfig.deploy=Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30a3\u30ec\u30af\u30c8\u30ea
 {0} \u3092\u914d\u5099\u3057\u307e\u3059
 hostConfig.deployDescriptor=\u8a2d\u5b9a\u8a18\u8ff0\u5b50 {0} 
\u3092\u914d\u5099\u3057\u307e\u3059

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1157949&r1=1157948&r2=1157949&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Aug 15 18:59:03 2011
@@ -81,6 +81,10 @@
         is completed before the requestDestroyed event of any
         ServletRequestListener is fired. (markt)
       </fix>
+      <fix>
+        <bug>51654</bug>: Improve handling of invalid appBase settings for Host
+        elements. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to