Bug #57813 MEM Dashboard: could not insert: [com.mysql.etools.monitor.pom.hib.HibNamed
Submitted: 28 Oct 2010 14:40 Modified: 28 Oct 2010 15:13
Reporter: Ulf Wendel Email Updates:
Status: Verified Impact on me:
Category:MySQL Enterprise Monitor: Web Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[28 Oct 2010 14:40] Ulf Wendel

I've downloaded mysqlmonitor- and installed it. 

Then I opened the Dashboard and "played" with it. Settings -> Manage Servers did sounds interesting to me and I went there. Without knowing what its about I pressed the button "create group". A popup window appeared. The popup shows an input form:

Enter name of the group:
[                      ]

The input field has pretty much exactly the size of description text above it. It fits 20 characters (is that appropriate for a group name?) before vertical scrolling starts.

I've put in:


(260 characters to hit the limit of the often used varchar(255) fields)

When I press the "create" button, I'm getting another popup. It states:

"could not insert: [com.mysql.etools.monitor.pom.hib.HibNamedGroup] org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:100)"

Please make it a nice message explaining what I did wrong.

Then I tried a much longer input value:

No warning appears. When I make my input much, much longer the error message changes it bit but does not get much more useful:

could not insert: [com.mysql.etools.monitor.pom.hib.HibNamedGroup] org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)

Please use a speaking error messages.

How to repeat:
Dashboard -> Settings -> Manage Server -> create group -> use invalid group name (too long, much too long)

Suggested fix:
Make the input field (the GUI element) not wider than necessary, let it not accept like 100kb long group names. Bail at the user if he tries to use group names longer than supported and present a user-friendly error message instead of or in addition to some Java errror.