Don't log an error about loading Sun class on non-Sun JVMs. Use i18n for message.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@957130
13f79535-47bb-0310-9956-
ffa450edef68
try {
Class.forName("sun.net.www.http.HttpClient");
} catch (ClassNotFoundException e) {
- log.error("Could not prevent sun.net.www.http.HttpClient" +
- " from being loaded.", e);
+ if (System.getProperty("java.vendor").startsWith("Sun")) {
+ log.error(sm.getString(
+ "jreLeakListener.keepAliveFail"), e);
+ } else {
+ log.debug(sm.getString(
+ "jreLeakListener.keepAliveFail"), e);
+ }
}
}
httpHostMapper.container=This container is not a StandardHost
interceptorValve.alreadyStarted=InterceptorValve has already been started
interceptorValve.notStarted=InterceptorValve has not yet been started
+jreLeakListener.keepAliveFail=Failed to trigger creation of the sun.net.www.http.HttpClient class during Tomcat start to prevent possible memory leaks. This is expected on non-Sun JVMs.
jreLeakListener.gcDaemonFail=Failed to trigger creation of the GC Daemon thread during Tomcat start to prevent possible memory leaks. This is expected on non-Sun JVMs.
jreLeakListener.jarUrlConnCacheFail=Failed to disable Jar URL connection caching by default
jreLeakListener.xmlParseFail=Error whilst attempting to prevent memory leaks during XML parsing