Bug #23954 Stack trace in JDBC.html when scheduling non-supported DC
Submitted: 3 Nov 2006 16:51 Modified: 8 Jul 2009 19:11
Reporter: Andy Bang Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Server Severity:S3 (Non-critical)
Version:0.7.20 OS:Windows (Windows XP)
Assigned to: Eric Herman CPU Architecture:Any
Tags: mer101

[3 Nov 2006 16:51] Andy Bang
Description:
If you schedule a rule against a server that doesn't support one of the underlying data items, you get an extensive stack trace in JDBC.html:

2006-11-02T21:29:30.305Z Error          com.mysql.merlin.server.monitors.MonitorException: E1088:  The server "Andys Laptop 4.1:3307" does not support "innodb_support_xa".
	at com.mysql.merlin.server.monitors.MonitorService.scheduleMonitor(MonitorService.java:306)
	at com.mysql.merlin.server.monitors.MonitorService.access$100(MonitorService.java:72)
	at com.mysql.merlin.server.monitors.MonitorService$2.execute(MonitorService.java:277)
	at com.mysql.util.jdbctemplate.ActionExecutor.execute(ActionExecutor.java:56)
	at com.mysql.merlin.server.db.GeneralOperations.execute(GeneralOperations.java:92)
	at com.mysql.merlin.server.monitors.MonitorService.scheduleMonitor(MonitorService.java:281)
	at com.mysql.merlin.server.monitors.MonitorService.scheduleMonitorTransaction(MonitorService.java:270)
	at com.mysql.merlin.server.monitors.MonitorCommandProcessor.createMonitorSchedule(MonitorCommandProcessor.java:178)
	at com.mysql.merlin.server.monitors.MonitorCommandProcessor.processRequest(MonitorCommandProcessor.java:70)
	at com.mysql.merlin.server.MerlinServlet.processRequest(MerlinServlet.java:120)
	at com.mysql.merlin.server.MerlinServlet.doCommon(MerlinServlet.java:92)
	at com.mysql.merlin.server.MerlinServlet.doPost(MerlinServlet.java:68)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:514)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:595)

How to repeat:
Schedule "XA Distributed Transaction Support Enabled For InnoDB" against a 4.x server and look in JDBC.html.

Suggested fix:
I have two concerns:

1) Why the extensive stack trace?  We're already warning the user on screen that this can't be scheduled.  Any error in the logs should just be a simple statement of that fact using words that describe the underlying problem rather than a stack trace.

2) Why JDBC.html?  This is buried in the Tomcat logs directory, which you don't see in the Dashboard and is easy to miss if you don't go looking for it.  This should be in one of our logs you can see in Settings->Logs.  How about the Advisors log or the Data Collection log?
[8 Jul 2009 13:35] Enterprise Tools JIRA Robot
Eric Herman writes: 
scheduleAndRunRules catches all exceptions and simply warns
[8 Jul 2009 13:36] Enterprise Tools JIRA Robot
Eric Herman writes: 
unless running in "dev mode" this will only print to the UI; in dev mode it will WARN the exception to the BaseJSONAction log
[8 Jul 2009 19:11] Enterprise Tools JIRA Robot
Bill Weber writes: 
not currently relevant