modules/enterprise/gui/remoting-war/src/main/java/org/rhq/enterprise/communications/servlet/ServerInvokerServlet.java
| 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
New commits:
commit c124f467eec21a367e493b5b9d7981657484be14
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Dec 3 13:38:09 2013 -0500
[1035722] JBWEB000235: Allocate exception for servlet
This is not a simple issue to resolve because it is not RHQ that logs the
ERROR level exception. It is logged by JBoss. Our code is required to
throw a ServletException indicating that we can't find the servlet server
invoker (because it's not yet initialized).
We could hide ERRORs for this JBoss package via log configuration, but
then we may suppress actual, relevant runtime problems.
The commit updates the message included in our ServletException to be
very explicit about this not being an actual problem during server
startup and initialization. Hopefully this will be sufficient.
If this proves insufficient we should likely suppress the logging or, if
we absolutely must log it, direct it to another file (not really desirable).
diff --git
a/modules/enterprise/gui/remoting-war/src/main/java/org/rhq/enterprise/communications/servlet/ServerInvokerServlet.java
b/modules/enterprise/gui/remoting-war/src/main/java/org/rhq/enterprise/communications/servlet/ServerInvokerServlet.java
index 8aba99a..b658293 100644
---
a/modules/enterprise/gui/remoting-war/src/main/java/org/rhq/enterprise/communications/servlet/ServerInvokerServlet.java
+++
b/modules/enterprise/gui/remoting-war/src/main/java/org/rhq/enterprise/communications/servlet/ServerInvokerServlet.java
@@ -75,8 +75,10 @@ public class ServerInvokerServlet extends
org.jboss.remoting.transport.servlet.w
Set<ObjectName> mbeans = mbeanServer.queryNames(invokerObjectNameQuery,
null);
if (mbeans.isEmpty()) {
- throw new ServletException("Could not find the remoting servlet invoker:
" + invokerObjectNameQuery
- + " - need to wait for remoting to be initialized later");
+ throw new ServletException(
+ "Could not find the remoting servlet invoker ["
+ + invokerObjectNameQuery
+ + "]. DURING SERVER STARTUP AND INITIALIZATION THIS IS NOT AN
ERROR AND CAN BE IGNORED. This may be a problem if occurring during normal server
runtime.");
}
if (mbeans.size() > 1) {
throw new ServletException("Found more than one remoting servlet invoker
at [" + invokerObjectNameQuery
@@ -86,7 +88,7 @@ public class ServerInvokerServlet extends
org.jboss.remoting.transport.servlet.w
ObjectName theInvokerObjectName = mbeans.iterator().next();
log("Found RHQ remoting servlet: " + theInvokerObjectName);
- return (ServletServerInvokerMBean)
MBeanServerInvocationHandler.newProxyInstance(mbeanServer,
+ return MBeanServerInvocationHandler.newProxyInstance(mbeanServer,
theInvokerObjectName, ServletServerInvokerMBean.class, false);
}
-}
\ No newline at end of file
+}
Show replies by date