Bug #30724 NPE in dashboard
Submitted: 30 Aug 2007 15:55 Modified: 30 Aug 2007 18:04
Reporter: Sloan Childers Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Enterprise Monitor: Web Severity:S2 (Serious)
Version: OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[30 Aug 2007 15:55] Sloan Childers
Description:
Gary was getting an NPE from the UI when clicking on the monitor or advisors page.  Looking at the second stack trace it looks like the serverId in the session was invalid.

java.lang.IllegalArgumentException: com.mysql.merlin.server.inventory.dao.ServerEntry at com.mysql.merlin.server.monitors.dao.MonitorOperations.checkNotNull(MonitorOperations.java:1260) at com.mysql.merlin.server.monitors.dao.MonitorOperations.findSchedule(MonitorOperations.java:1250) at com.mysql.merlin.server.monitors.dao.MonitorOperations.getMonitorDetail(MonitorOperations.java:1343) at com.mysql.merlin.server.monitors.dao.MonitorOperations.access$2900(MonitorOperations.java:36) at com.mysql.merlin.server.monitors.dao.MonitorOperations$32.execute(MonitorOperations.java:1333) at com.mysql.merlin.server.monitors.dao.MonitorOperations$32.execute(MonitorOperations.java:1332) at com.mysql.util.jdbctemplate.ActionExecutor.executeInner(ActionExecutor.java:70) at com.mysql.util.jdbctemplate.ActionExecutor.execute(ActionExecutor.java:135) at com.mysql.merlin.server.db.GeneralOperations.execute(GeneralOperations.java:87) at com.mysql.merlin.server.monitors.dao.MonitorOperations.getMonitorDetail(MonitorOperations.java:1331) at com.mysql.merlin.server.db.DbOperations.getMonitorDetail(DbOperations.java:837) at com.mysql.merlin.server.monitors.MonitorService.listMonitorDetails(MonitorService.java:262) at com.mysql.merlin.server.ServiceMgrServices.listMonitorDetails(ServiceMgrServices.java:450) at com.mysql.merlin.ui.actions.monitor.advisors.CurrentSchedule.populateRuleInfo(CurrentSchedule.java:64) at com.mysql.merlin.ui.actions.monitor.advisors.CurrentSchedule.populateCategoryInfo(CurrentSchedule.java:51) at com.mysql.merlin.ui.actions.monitor.advisors.CurrentSchedule.execute(CurrentSchedule.java:34)

java.lang.NullPointerException at com.mysql.merlin.ui.actions.monitor.dashboard.Dashboard.execute(Dashboard.java:177)

How to repeat:
Not sure.

Suggested fix:
Add defensive code to the UI at a mininum if we can't figure out why the serverId in the session was bogus.
[30 Aug 2007 15:55] Sloan Childers
support zip

Attachment: support-1234-6578-20070830.zip (application/x-zip-compressed, text), 13.93 KiB.

[30 Aug 2007 16:04] Sloan Childers
<gary|wakin> I tried that little delete experiment duirng mmtx call, I found the NPE 12 hours later. It's possible
<gary|wakin> that I had never selected anything else in the tree control
<gary|wakin> oddly, I woke up this mrning and realized I hadn't tried changing the focused server in the tree control
<gary|wakin> but I *think* it was on "all servers"
[30 Aug 2007 16:12] Sloan Childers
<billw> sloan, eric: i just reproduced it - basically you have the server selected in the tree on the Monitor page - bring down the agent - go to Manager Servers and delete the server - the click on the Monitor tab
[30 Aug 2007 17:58] Eric Herman
is this fixed by BUG#30727 ?
[30 Aug 2007 18:04] Joshua Ganderson
Didn't see this existed, created more specific bug and resolved it : 30727