#47883 DS Console - java exception when refreshing schema panel
Closed: Fixed None Opened 5 years ago by mreynolds.

Steps to reproduce:

[1] Launch 389-console
[2] Open DS Instance
[3] Select the configuration tab
[4] Select/click Schema
[5] Right-click Schema -> Refresh
[6] Java exception is reported

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 4
at com.netscape.admin.dirserv.panel.SchemaAttributesPanel.setColumnWidths(Unknown Source)
at com.netscape.admin.dirserv.panel.SchemaAttributesPanel.populateTables(Unknown Source)
at com.netscape.admin.dirserv.panel.SchemaAttributesPanel.refresh(Unknown Source)
at com.netscape.admin.dirserv.panel.DSTabbedPanel.actionPerformed(Unknown Source)
at com.netscape.admin.dirserv.DSResourceModel.refreshObject(Unknown Source)
at com.netscape.admin.dirserv.DSResourceModel.actionMenuSelected(Unknown Source)
at com.netscape.admin.dirserv.node.SchemaResourceObject.actionMenuSelected(Unknown Source)
at com.netscape.management.client.ResourcePage$MenuInfoAction.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6516)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3311)
...
...


Why is the length of widths (the _widths member) not the same as the number of columns? Did we add a column somewhere and not update _widths?

So "_widths" was hardcoded to 4 values, but there are 7 columns. I added the missing "widths", but the value doesn't really seem to impact the table size. So I just used 40 for the remaining values.

New patch attached

git merge ticket47883
Updating 21150c9..8dd0505
Fast-forward
src/com/netscape/admin/dirserv/panel/SchemaAttributesPanel.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

git push origin master
To ssh://git.fedorahosted.org/git/389/ds-console.git
21150c9..8dd0505 master -> master

commit 8dd0505b8c8c1b7ecb123bae4c5ae6f31c07dcfa
Author: Mark Reynolds mreynolds@redhat.com
Date: Thu Aug 28 11:25:10 2014 -0400

Metadata Update from @rmeggins:
- Issue assigned to mreynolds
- Issue set to the milestone: 389-admin,console 1.1.36

2 years ago

Login to comment on this ticket.

Metadata