Bug #47464 MySQL Enterprise Monitor Logging not paginating properly
Submitted: 20 Sep 2009 23:07 Modified: 1 Mar 2010 13:36
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Web Severity:S3 (Non-critical)
Version:2.1.0.1080 OS:Any
Assigned to: MEM Service Manager Devs CPU Architecture:Any

[20 Sep 2009 23:07] Roel Van de Paar
Description:
Error
Error Message
fromIndex(20) > toIndex(10)
Toggle Stack Trace
fromIndex(20) > toIndex(10)
java.util.SubList.<init>(Unknown Source)
java.util.RandomAccessSubList.<init>(Unknown Source)
java.util.AbstractList.subList(Unknown Source)
com.mysql.etools.monitor.bo.log.FileAppender.getLogContents(FileAppender.java:592)
com.mysql.etools.monitor.bo.log.Logging.collectLogEntries(Logging.java:187)
com.mysql.etools.monitor.bo.log.Logging.collectLogEntries(Logging.java:196)
com.mysql.etools.monitor.bo.log.Logging.collectLogEntries(Logging.java:196)
com.mysql.etools.monitor.bo.log.Logging.getLogContents(Logging.java:419)
com.mysql.merlin.ui.actions.settings.logs.ShowLog.executeInner(ShowLog.java:387)
com.mysql.merlin.ui.actions.BaseViewAction.timeLogExecInner(BaseViewAction.java:70)
com.mysql.merlin.ui.actions.BaseViewAction.access$000(BaseViewAction.java:29)
com.mysql.merlin.ui.actions.BaseViewAction$1.call(BaseViewAction.java:62)
com.mysql.merlin.ui.actions.BaseViewAction$1.call(BaseViewAction.java:61)
com.mysql.etools.monitor.pom.hib.HibernateExecutor$2.execute(HibernateExecutor.java:142)
com.mysql.etools.monitor.pom.hib.HibernateExecutor.asTransaction(HibernateExecutor.java:188)
com.mysql.etools.monitor.pom.hib.HibernateExecutor.asReadOnlyTransaction(HibernateExecutor.java:148)
com.mysql.etools.monitor.pom.hib.SchemaMaintenanceExecutor.asReadOnlyTransaction(SchemaMaintenanceExecutor.java:214)
com.mysql.etools.monitor.pom.hib.HibPersistence.asReadOnlyTransaction(HibPersistence.java:1379)
com.mysql.merlin.ui.actions.BaseViewAction.openSessionInViewTxn(BaseViewAction.java:60)
com.mysql.merlin.ui.actions.BaseViewAction.exec(BaseViewAction.java:46)
com.mysql.merlin.ui.actions.BaseAction$1.call(BaseAction.java:1915)
com.mysql.merlin.ui.actions.BaseAction$1.call(BaseAction.java:1914)
com.mysql.merlin.ui.actions.BaseAction.execute(BaseAction.java:1898)
com.mysql.merlin.ui.actions.BaseAction.execute(BaseAction.java:1913)
sun.reflect.GeneratedMethodAccessor158.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:1)
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:1)
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
com.mysql.merlin.ui.interceptors.InitializeInterceptor.intercept(InitializeInterceptor.java:82)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:1)
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:1)
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
com.mysql.merlin.ui.interceptors.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:118)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:1)
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:507)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter(GzipFilter.java:81)
net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:92)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
com.mysql.util.RequestCounterFilter.doFilter(RequestCounterFilter.java:117)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
com.mysql.merlin.ui.filters.AccessLogFilter.doFilter(AccessLogFilter.java:56)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Unknown Source)

How to repeat:
o Clear all logs
o Generate enough 'Last message repeated' messages for one particular entry (for instance 'Incorrect password from client' to take up one page, but not two.
o Click on any of the page tabs

Suggested fix:
o Fix paginating
[20 Sep 2009 23:10] Roel Van de Paar
Verifying as D4
[20 Sep 2009 23:11] Roel Van de Paar
Screendump of setup and error

Attachment: mem_paginating_1.jpg (image/jpeg, text), 117.09 KiB.

[20 Sep 2009 23:17] Roel Van de Paar
Error above is shown in 'infrastructure' log as:

----
asTransaction
java.lang.IllegalArgumentException: fromIndex(20) > toIndex(10)
at java.util.SubList.<init>(Unknown Source)
at java.util.RandomAccessSubList.<init>(Unknown Source)
at java.util.AbstractList.subList(Unknown Source)
at com.mysql.etools.monitor.bo.log.FileAppender.getLogContents(FileAppender.java:592)
[...]
----

And, the same error in the UI log:

----
setException, action: com.mysql.merlin.ui.actions.settings.logs.ShowLog
java.lang.IllegalArgumentException: fromIndex(20) > toIndex(10)
at java.util.SubList.<init>(Unknown Source)
at java.util.RandomAccessSubList.<init>(Unknown Source)
at java.util.AbstractList.subList(Unknown Source)
[...]
----

Error in the Xwork log (not sure if it's related):

----
Warning  	Sep 21, 2009 8:50:55 AM  	No method name with root "org" was not found
----
[21 Sep 2009 19:14] Enterprise Tools JIRA Robot
Josh Sled writes: 
EM-3457's push should address this as well.
[17 Feb 2010 1:29] Enterprise Tools JIRA Robot
Bill Weber writes: 
according to josh's comment, this should be in 2.1.1
[17 Feb 2010 18:18] Enterprise Tools JIRA Robot
Marcos Palacios writes: 
Verified fixed in Monitor build 2.1.1.1141.
[1 Mar 2010 13:36] MC Brown
A note has been added to the 2.1.1 changelog: 

 The pagination of errors within &merlin_client; for &merlin_server; logging made it difficult to identify the true source of the error.