Invalid column widths (more widths than columns) error after editing JBoss ON dashboard
Environment
- Red Hat JBoss Operations Network (ON) 3.1.2, 3.2, 3.3
- Viewing global dashboard
Issue
- Can not display dashboard anymore due to
Globally uncaught exception - Error
java.lang.IllegalArgumentException:Invalid column widths (more widths than columns) [58%, *]prevents dashboard from presenting anything
Resolution
Upgrade to JBoss ON 3.3 and apply the latest update.
Root Cause
This issue was identified as This content is not included.Red Hat Bugzilla 1186300 and was addressed in JBoss ON 3.3 Update-06 and later.
Although it is not clear how the situation can occur, it is caused by a dashboard column being added or removed while the dashboard settings table is being updated. This results in the wrong number of elements being stored in the column widths array along with a duplicate widths property being stored for the affected dashboard portlets. When the dashboard is loaded, an attempt is made to apply all the widths from the array to the dashboard. However, if there are less columns in the dashboard view then there are width elements, an unexpected error occurs.
Diagnostic Steps
To collect needed data, execute the following SQLs:
SELECT id FROM rhq_principal WHERE principal=<userName>
Where <userName> should be replaced with the name of the user that is affected with this issue. The result of the first SQL - id - should be used in the following SQL:
SELECT dash.id as DASH_ID, dash.name, prop.id as PROP_ID, prop.name, prop.string_value, port.id as PORT_ID, port.name, port.portlet_key, port.col, port.col_index
FROM rhq_dashboard dash
LEFT JOIN rhq_config_property prop ON prop.configuration_id = dash.configuration_id
LEFT JOIN rhq_dashboard_portlet port ON port.dashboard_id = dash.id
WHERE dash.subject_id = <id> AND dash.resource_id IS NULL AND (prop.name = 'widths' OR prop.name = 'columns');
The second SQL should give something like:
DASH_ID NAME PROP_ID NAME STRING_VALUE PORT_ID NAME PORTLET_KEY COL COL_INDEX
10001 Default 24151 widths 31%,* 10001 Recent Operations Operations 1 2
10001 Default 24144 widths 31%,* 10001 Recent Operations Operations 1 2
10001 Default 13408 columns 2 10001 Recent Operations Operations 1 2
10001 Default 24151 widths 31%,* 10002 Alerted or Unavailable Resources ProblemResources 1 1
10001 Default 24144 widths 31%,* 10002 Alerted or Unavailable Resources ProblemResources 1 1
10001 Default 13408 columns 2 10002 Alerted or Unavailable Resources ProblemResources 1 1
10001 Default 24151 widths 31%,* 10003 Recent Alerts RecentAlerts 1 0
10001 Default 24144 widths 31%,* 10003 Recent Alerts RecentAlerts 1 0
10001 Default 13408 columns 2 10003 Recent Alerts RecentAlerts 1 0
10001 Default 24151 widths 31%,* 10004 Mashup Mashup 0 1
10001 Default 24144 widths 31%,* 10004 Mashup Mashup 0 1
10001 Default 13408 columns 2 10004 Mashup Mashup 0 1
10001 Default 24151 widths 31%,* 10005 Inventory Summary InventorySummary 0 0
10001 Default 24144 widths 31%,* 10005 Inventory Summary InventorySummary 0 0
10001 Default 13408 columns 2 10005 Inventory Summary InventorySummary 0 0
10004 EAP-Web 3710054 widths 58%,* 10021 Alerted or Unavailable Resources ProblemResources 0 0
10004 EAP-Web 3816432 widths * 10021 Alerted or Unavailable Resources ProblemResources 0 0
10004 EAP-Web 3816431 columns 1 10021 Alerted or Unavailable Resources ProblemResources 0 0
10004 EAP-Web 3710054 widths 58%,* 10022 Recent Alerts RecentAlerts 0 1
10004 EAP-Web 3816432 widths * 10022 Recent Alerts RecentAlerts 0 1
10004 EAP-Web 3816431 columns 1 10022 Recent Alerts RecentAlerts 0 1
10004 EAP-Web 3710054 widths 58%,* 10023 Timeline ResourceTimeline 0 2
10004 EAP-Web 3816432 widths * 10023 Timeline ResourceTimeline 0 2
10004 EAP-Web 3816431 columns 1 10023 Timeline ResourceTimeline 0 2
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.