inputStream = new FileInputStream(file);
inputSource = new InputSource("file://" + file.getAbsolutePath());
} catch (Exception e) {
- // Ignore
+ if (log.isDebugEnabled()) {
+ log.debug(sm.getString("catalina.configFail", file), e);
+ }
}
if (inputStream == null) {
try {
(getClass().getClassLoader()
.getResource(getConfigFile()).toString());
} catch (Exception e) {
- // Ignore
+ if (log.isDebugEnabled()) {
+ log.debug(sm.getString("catalina.configFail",
+ getConfigFile()), e);
+ }
}
}
if( inputStream==null ) {
try {
inputStream = getClass().getClassLoader()
- .getResourceAsStream("server-embed.xml");
+ .getResourceAsStream("server-embed.xml");
inputSource = new InputSource
(getClass().getClassLoader()
.getResource("server-embed.xml").toString());
} catch (Exception e) {
- // Ignore
+ if (log.isDebugEnabled()) {
+ log.debug(sm.getString("catalina.configFail",
+ "server-embed.xml"), e);
+ }
}
}
- if ((inputStream == null) && (file != null)) {
- log.warn("Can't load server.xml from " + file.getAbsolutePath());
- if (file.exists() && !file.canRead()) {
- log.warn("Permissions incorrect, read permission is not allowed on the file.");
+ if (inputStream == null || inputSource == null) {
+ if (file == null) {
+ log.warn(sm.getString("catalina.configFail",
+ getConfigFile() + "] or [server-embed.xml]"));
+ } else {
+ log.warn(sm.getString("catalina.configFail",
+ file.getAbsolutePath()));
+ if (file.exists() && !file.canRead()) {
+ log.warn("Permissions incorrect, read permission is not allowed on the file.");
+ }
}
return;
}
# See the License for the specific language governing permissions and
# limitations under the License.
+catalina.configFail=Unable to load server configuration from [{0}]
catalina.shutdownHookFail=The shutdown hook experienced an error while trying to stop the server
catalina.stopServer=No shutdown port configured. Shut down server through OS signal. Server not shut down.
contextConfig.altDDNotFound=alt-dd file {0} not found
<Bug code="MSF" />
</Match>
<Match>
+ <!-- Catalina isn'y used when embedding -->
+ <Class name="org.apache.catalina.startup.Catalina" />
+ <Method name="stopServer" />
+ <Bug code="Dm" />
+ </Match>
+ <Match>
<!-- Sleep is short, needs to keep lock -->
<Class name="org.apache.catalina.startup.HostConfig" />
<Method name="checkResources" />