Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1646 Synchronize tabs in Modeler between ObjEntity and DbEntity editor panes
  3. CAY-1786

javax.swing.table.DefaultTableModel cannot be cast to org.apache.cayenne.modeler.editor.ObjAttributeTableModel

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.2.M1
    • Modeler
    • None
    • 3.2 build from Dec 18, OS X 10.0

    Description

      This was first described in comments to CAY-1727... While CAY-1727 is fixed, the ClassCastException remains, so it is a separate issue. It doesn't happen on every model, but it does happen on a few that I have (and that I can't publicly share) pretty consistently. It goes something like this (but I am not 100% sure of the scenario) :

      1. Open a project
      2. Navigate to any ObjEntity, select its "attributes" tab
      3. CLick on DataMap
      4. Click back on any ObjEntity.

      Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.table.DefaultTableModel cannot be cast to org.apache.cayenne.modeler.editor.ObjAttributeTableModel
      at org.apache.cayenne.modeler.editor.ObjEntityAttributeTab.selectAttributes(ObjEntityAttributeTab.java:250)
      at org.apache.cayenne.modeler.editor.ObjEntityTabbedView.currentObjAttributeChanged(ObjEntityTabbedView.java:190)
      at org.apache.cayenne.modeler.ProjectController.fireObjAttributeDisplayEvent(ProjectController.java:1464)
      at org.apache.cayenne.modeler.editor.ObjEntityAttributeTab.processExistingSelection(ObjEntityAttributeTab.java:298)
      at org.apache.cayenne.modeler.editor.ObjEntityTabbedView$1.stateChanged(ObjEntityTabbedView.java:120)
      at javax.swing.JTabbedPane.fireStateChanged(JTabbedPane.java:400)
      at javax.swing.JTabbedPane$ModelListener.stateChanged(JTabbedPane.java:253)
      at javax.swing.DefaultSingleSelectionModel.fireStateChanged(DefaultSingleSelectionModel.java:116)
      at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(DefaultSingleSelectionModel.java:50)
      at javax.swing.JTabbedPane.setSelectedIndexImpl(JTabbedPane.java:599)
      at javax.swing.JTabbedPane.setSelectedIndex(JTabbedPane.java:574)
      at org.apache.cayenne.modeler.editor.ObjEntityTabbedView.currentObjEntityChanged(ObjEntityTabbedView.java:151)
      at org.apache.cayenne.modeler.ProjectController.fireObjEntityDisplayEvent(ProjectController.java:1239)
      at org.apache.cayenne.modeler.ProjectTreeView.processSelection(ProjectTreeView.java:848)
      at org.apache.cayenne.modeler.ProjectTreeView$1.valueChanged(ProjectTreeView.java:150)
      at javax.swing.JTree.fireValueChanged(JTree.java:2820)
      at javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:3191)
      at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:629)

      Attachments

        Activity

          People

            Unassigned Unassigned
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: