Author: remy.maucherat(a)jboss.com
Date: 2012-09-14 08:33:07 -0400 (Fri, 14 Sep 2012)
New Revision: 2082
Modified:
trunk/src/main/java/org/apache/catalina/core/ApplicationContext.java
trunk/src/main/java/org/apache/catalina/core/AprLifecycleListener.java
trunk/src/main/java/org/jboss/web/CatalinaLogger.java
trunk/src/main/java/org/jboss/web/CatalinaMessages.java
trunk/src/main/java/org/jboss/web/CoyoteMessages.java
Log:
Fix minor issues with the various messages.
Modified: trunk/src/main/java/org/apache/catalina/core/ApplicationContext.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/ApplicationContext.java 2012-09-13
16:47:04 UTC (rev 2081)
+++ trunk/src/main/java/org/apache/catalina/core/ApplicationContext.java 2012-09-14
12:33:07 UTC (rev 2082)
@@ -1134,7 +1134,7 @@
Class<?> clazz =
context.getLoader().getClassLoader().loadClass(className);
listenerInstance = (EventListener)
context.getInstanceManager().newInstance(clazz);
} catch (Throwable t) {
- throw MESSAGES.invalidContextListener(className, getContextPath(), t);
+ throw MESSAGES.invalidContextListenerWithException(className,
getContextPath(), t);
}
checkListenerType(listenerInstance);
if (context.getApplicationLifecycleListeners() != null &&
listenerInstance instanceof ServletContextListener) {
@@ -1170,7 +1170,7 @@
try {
listenerInstance = (EventListener)
context.getInstanceManager().newInstance(listenerClass);
} catch (Exception e) {
- throw MESSAGES.invalidContextListener(listenerClass.getName(),
getContextPath(), e);
+ throw MESSAGES.invalidContextListenerWithException(listenerClass.getName(),
getContextPath(), e);
}
checkListenerType(listenerInstance);
if (context.getApplicationLifecycleListeners() != null &&
listenerInstance instanceof ServletContextListener) {
Modified: trunk/src/main/java/org/apache/catalina/core/AprLifecycleListener.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/AprLifecycleListener.java 2012-09-13
16:47:04 UTC (rev 2081)
+++ trunk/src/main/java/org/apache/catalina/core/AprLifecycleListener.java 2012-09-14
12:33:07 UTC (rev 2082)
@@ -75,7 +75,7 @@
if (!CatalinaLogger.CORE_LOGGER.isDebugEnabled()) {
CatalinaLogger.CORE_LOGGER.aprSslEngineInitFailed();
} else {
- CatalinaLogger.CORE_LOGGER.aprSslEngineInitFailed(t);
+
CatalinaLogger.CORE_LOGGER.aprSslEngineInitFailedWithThrowable(t);
}
}
}
@@ -105,9 +105,9 @@
patch = clazz.getField("TCN_PATCH_VERSION").getInt(null);
} catch (Throwable t) {
if (!CatalinaLogger.CORE_LOGGER.isDebugEnabled()) {
- CatalinaLogger.CORE_LOGGER.aprInitFailed();
+
CatalinaLogger.CORE_LOGGER.aprInitFailed(System.getProperty("java.library.path"));
} else {
- CatalinaLogger.CORE_LOGGER.aprInitFailed(t);
+
CatalinaLogger.CORE_LOGGER.aprInitFailedWithThrowable(System.getProperty("java.library.path"),
t);
}
return false;
}
Modified: trunk/src/main/java/org/jboss/web/CatalinaLogger.java
===================================================================
--- trunk/src/main/java/org/jboss/web/CatalinaLogger.java 2012-09-13 16:47:04 UTC (rev
2081)
+++ trunk/src/main/java/org/jboss/web/CatalinaLogger.java 2012-09-14 12:33:07 UTC (rev
2082)
@@ -141,10 +141,6 @@
@Message(id = 1012, value = "The connector has already been started")
void connectorAlreadyStarted();
- @LogMessage(level = ERROR)
- @Message(id = 1012, value = "Failed protocol handler [%s] JMX
registration.")
- void failedProtocolJmxRegistration(Object objectName, @Cause Throwable t);
-
@LogMessage(level = INFO)
@Message(id = 1013, value = "Cannot proceed with protocol handler JMX
registration.")
void failedProtocolJmxRegistration();
@@ -343,7 +339,7 @@
@LogMessage(level = DEBUG)
@Message(id = 1062, value = "Failed to initialize the SSLEngine")
- void aprSslEngineInitFailed(@Cause Throwable t);
+ void aprSslEngineInitFailedWithThrowable(@Cause Throwable t);
@LogMessage(level = INFO)
@Message(id = 1063, value = "Failed to initialize the SSLEngine")
@@ -351,11 +347,11 @@
@LogMessage(level = DEBUG)
@Message(id = 1064, value = "The native library which allows optimal performance
in production environments was not found on the java.library.path: %s")
- void aprInitFailed(@Cause Throwable t);
+ void aprInitFailedWithThrowable(String libraryPath, @Cause Throwable t);
@LogMessage(level = INFO)
@Message(id = 1065, value = "The native library which allows optimal performance
in production environments was not found on the java.library.path: %s")
- void aprInitFailed();
+ void aprInitFailed(String libraryPath);
@LogMessage(level = ERROR)
@Message(id = 1066, value = "An incompatible version %s.%s.%s of the native
library is installed, while JBoss Web requires version %s.%s.%s")
@@ -478,11 +474,11 @@
void missingJspServlet();
@LogMessage(level = ERROR)
- @Message(id = 1096, value = "Error stopping context")
+ @Message(id = 1096, value = "Error stopping context %s")
void errorStoppingContext(String name, @Cause Throwable t);
@LogMessage(level = ERROR)
- @Message(id = 1097, value = "Error starting context")
+ @Message(id = 1097, value = "Error starting context %s")
void errorStartingContext(String name, @Cause Throwable t);
@LogMessage(level = DEBUG)
@@ -506,15 +502,15 @@
void errorInitializingResources(@Cause Throwable t);
@LogMessage(level = ERROR)
- @Message(id = 1103, value = "Error detected during context start, will stop
it")
+ @Message(id = 1103, value = "Error detected during context %s start, will stop
it")
void errorStartingContextWillStop(String name);
@LogMessage(level = ERROR)
- @Message(id = 1104, value = "Error performing failed context start
cleanup")
+ @Message(id = 1104, value = "Error performing failed context %s start
cleanup")
void errorStartingContextCleanup(String name, @Cause Throwable t);
@LogMessage(level = ERROR)
- @Message(id = 1105, value = "Error resetting context")
+ @Message(id = 1105, value = "Error resetting context %s")
void errorResettingContext(String name, @Cause Throwable t);
@LogMessage(level = DEBUG)
@@ -529,10 +525,6 @@
@Message(id = 1108, value = "Context %s object name creation failed")
void contextObjectNameCreationFailed(String contextName, @Cause Throwable t);
- @LogMessage(level = INFO)
- @Message(id = 1108, value = "Context %s JMX registration failed")
- void contextJmxRegistrationFailed(String contextName, @Cause Throwable t);
-
@LogMessage(level = ERROR)
@Message(id = 1109, value = "Cannot find context %s parent Host JMX name")
void cannotFindContextJmxParentName(String name);
@@ -653,4 +645,12 @@
@Message(id = 1138, value = "Failed server [%s] JMX registration.")
void failedServerJmxRegistration(Object objectName, @Cause Throwable t);
+ @LogMessage(level = INFO)
+ @Message(id = 1139, value = "Context %s JMX registration failed")
+ void contextJmxRegistrationFailed(String contextName, @Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1140, value = "Failed protocol handler [%s] JMX
registration.")
+ void failedProtocolJmxRegistration(Object objectName, @Cause Throwable t);
+
}
Modified: trunk/src/main/java/org/jboss/web/CatalinaMessages.java
===================================================================
--- trunk/src/main/java/org/jboss/web/CatalinaMessages.java 2012-09-13 16:47:04 UTC (rev
2081)
+++ trunk/src/main/java/org/jboss/web/CatalinaMessages.java 2012-09-14 12:33:07 UTC (rev
2082)
@@ -193,7 +193,7 @@
@Message(id = 50, value = "Cannot start async")
IllegalStateException cannotStartAsync();
- @Message(id = 51, value = "Error invoking onStartAsync on listener of class
{0}")
+ @Message(id = 51, value = "Error invoking onStartAsync on listener of class
%s")
IllegalStateException errorStartingAsync(String listenerClassName, @Cause Throwable
t);
@Message(id = 52, value = "No authenticator available for programmatic
login")
@@ -292,12 +292,6 @@
@Message(id = 87, value = "Duration unit not found after amount %s in directive
%s")
IllegalStateException expiresDurationUnitNotFound(int amount, String line);
- @Message(id = 86, value = "Invalid duration unit
(years|months|weeks|days|hours|minutes|seconds) %s in directive %s")
- IllegalStateException expiresInvalidDurationUnit(String token, String line);
-
- @Message(id = 87, value = "Request filter invalid pattern %s")
- IllegalArgumentException requestFilterInvalidPattern(String pattern, @Cause Throwable
t);
-
@Message(id = 88, value = "The requested resource (%s) is not available")
String resourceNotAvailable(String resource);
@@ -379,7 +373,7 @@
@Message(id = 114, value = "The requested resource has moved temporarily to a
new location.")
String http302();
- @Message(id = 115, value = "The response to this request can be found under a
different URI (%s).")
+ @Message(id = 115, value = "The response to this request can be found under a
different URI.")
String http303();
@Message(id = 116, value = "The requested resource is available and has not been
modified.")
@@ -526,24 +520,6 @@
@Message(id = 207, value = "JDBC Store SQL exception")
String jdbcStoreDatabaseError();
- @Message(id = 202, value = "Loading Session %s from file %s")
- String jdbcStoreSessionLoad(String sessionId, String table);
-
- @Message(id = 203, value = "Saving Session %s to file %s")
- String jdbcStoreSessionSave(String sessionId, String table);
-
- @Message(id = 204, value = "Removing Session %s at file %s")
- String jdbcStoreSessionRemove(String sessionId, String table);
-
- @Message(id = 205, value = "No persisted data object found")
- String jdbcStoreIdNotFound();
-
- @Message(id = 206, value = "The database connection is null or was found to be
closed. Trying to re-open it.")
- String jdbcStoreConnectionWasClosed();
-
- @Message(id = 207, value = "The re-open on the database failed. The database
could be down.")
- String jdbcStoreConnectionReopenFailed();
-
@Message(id = 208, value = "JDBC driver class not found %s")
String jdbcStoreDriverFailure(String className);
@@ -605,7 +581,7 @@
IllegalArgumentException invalidContextListener(String className, String path);
@Message(id = 228, value = "Bad listener class %s for context %s")
- IllegalArgumentException invalidContextListener(String className, String path, @Cause
Throwable t);
+ IllegalArgumentException invalidContextListenerWithException(String className, String
path, @Cause Throwable t);
@Message(id = 229, value = "The session tracking mode %s requested for context
%s is not supported by that context")
IllegalArgumentException unsupportedSessionTrackingMode(String sessionTracking,
String path);
@@ -784,9 +760,6 @@
@Message(id = 287, value = "Exception sending context initialized event to
listener instance of class %s")
String errorSendingContextInitializedEvent(String listenerClass);
- @Message(id = 287, value = "Exception sending context destroyed event to
listener instance of class %s")
- String errorSendingContextDestroyedEvent(String listenerClass);
-
@Message(id = 288, value = "Error destroying application listener of class
%s")
String errorDestroyingApplicationListener(String listenerClass);
@@ -823,4 +796,31 @@
@Message(id = 299, value = "Async dispatch processing for servlet %s threw
exception")
String asyncDispatchError(String servletName);
+ @Message(id = 300, value = "Loading Session %s from file %s")
+ String jdbcStoreSessionLoad(String sessionId, String table);
+
+ @Message(id = 301, value = "Saving Session %s to file %s")
+ String jdbcStoreSessionSave(String sessionId, String table);
+
+ @Message(id = 302, value = "Removing Session %s at file %s")
+ String jdbcStoreSessionRemove(String sessionId, String table);
+
+ @Message(id = 303, value = "No persisted data object found")
+ String jdbcStoreIdNotFound();
+
+ @Message(id = 304, value = "The database connection is null or was found to be
closed. Trying to re-open it.")
+ String jdbcStoreConnectionWasClosed();
+
+ @Message(id = 305, value = "The re-open on the database failed. The database
could be down.")
+ String jdbcStoreConnectionReopenFailed();
+
+ @Message(id = 306, value = "Exception sending context destroyed event to
listener instance of class %s")
+ String errorSendingContextDestroyedEvent(String listenerClass);
+
+ @Message(id = 307, value = "Invalid duration unit
(years|months|weeks|days|hours|minutes|seconds) %s in directive %s")
+ IllegalStateException expiresInvalidDurationUnit(String token, String line);
+
+ @Message(id = 308, value = "Request filter invalid pattern %s")
+ IllegalArgumentException requestFilterInvalidPattern(String pattern, @Cause Throwable
t);
+
}
Modified: trunk/src/main/java/org/jboss/web/CoyoteMessages.java
===================================================================
--- trunk/src/main/java/org/jboss/web/CoyoteMessages.java 2012-09-13 16:47:04 UTC (rev
2081)
+++ trunk/src/main/java/org/jboss/web/CoyoteMessages.java 2012-09-14 12:33:07 UTC (rev
2082)
@@ -101,7 +101,7 @@
@Message(id = 2019, value = "Invalid CRLF")
IOException invalidCrlf();
- @Message(id = 2019, value = "Invalid chunk header")
+ @Message(id = 2020, value = "Invalid chunk header")
IOException invalidChunkHeader();
}