Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51654
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 15 Aug 2011 18:38:16 +0000 (18:38 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 15 Aug 2011 18:38:16 +0000 (18:38 +0000)
Log an error message if an appBase is specified that is not a directory and disable automatic deployment to prevent subsequent errors.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1157939 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/startup/HostConfig.java
java/org/apache/catalina/startup/LocalStrings.properties
java/org/apache/catalina/startup/LocalStrings_es.properties
java/org/apache/catalina/startup/LocalStrings_ja.properties

index 2f79404..a52bccc 100644 (file)
@@ -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();
         
index f003eff..f7c44e8 100644 (file)
@@ -72,7 +72,7 @@ engineConfig.stop=EngineConfig: Processing STOP
 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}]
index 49c3a29..2f52cb1 100644 (file)
@@ -71,7 +71,6 @@ engineConfig.stop = "EngineConfig"\: Procesando "STOP"
 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}]
index a0edb38..0b9a16d 100644 (file)
@@ -35,7 +35,6 @@ embedded.noEngines=\u307e\u3060\u30a8\u30f3\u30b8\u30f3\u304c\u5b9a\u7fa9\u3055\
 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