4 Replies Latest reply on May 21, 2015 7:36 AM by Philip Stoyanov-Oracle

    synchronize model with data dictionary, diagram goes weird

    Scott Wesley

      I built a data model by dragging and dropping from tables in my connection list.

       

      These tables have changed a little so I wanted to update the diagram. In the past I've used modeler to do so as described by Jeff

      http://www.thatjeffsmith.com/archive/2013/02/synching-your-oracle-sql-developer-data-model-with-the-database/

       

      Today using SQL Dev 4.1 the table I synchronised when blank, and some other weird things started to happen with the model.

      Clicking on a table makes it reappear (see the missing one beneath crm_attributes), but the last table clicked disappears again.

      crm_weird.png

       

      I close the tab to reopen the model and it says it's already opened - I need to restart SQL Dev.

       

      On reopen of SQL Dev, I don't see "Recent designs" in File->Data Modeler, but I do see "Print diagram" submenu - not useful when no diagram open ;p

      Recent designs reappears when I open my .dmd.

       

      I tried dragging/dropping again from the table list but I end up losing foreign key links instead.

       

      These issues with basic behaviours on synchronising or reapplying with a drag drop from the table list make it a frustrating tool to use casually.

        • 1. Re: synchronize model with data dictionary, diagram goes weird
          David Last-Oracle

          Strange.  Could possibly be short of memory.

          Are you using the production version of SQL Developer (4.1.0.19)?

          Is there anything significant in Data Modeler's log?  (You can see this by going to the View menu and selecting Data Modeler > External Log.)

           

          David

          • 2. Re: Re: synchronize model with data dictionary, diagram goes weird
            Scott Wesley

            When I opened the .dmd this morning after restarting SQL Dev it's now just opening it as an XML source

             

            Yes, this is shiny new 4.1.0.19

            No, I don't feel my pc is short of memory.

            Yes, there appears to be something significant in the log.

             

            2015-05-19 14:12:02,764 [AWT-EventQueue-0] ERROR DefaultDiagramUI - DefaultDiagramUI.paint:
            java.lang.NullPointerException
              at oracle.dbtools.crest.model.design.relational.Column.getRefColAndAssocIDs(Column.java:422)
              at oracle.dbtools.crest.model.design.relational.Column.hasCircularRef(Column.java:676)
              at oracle.dbtools.crest.model.design.relational.Column.getUse(Column.java:746)
              at oracle.dbtools.crest.model.design.ContainedObjectWithDomain.getDataType(ContainedObjectWithDomain.java:269)
              at oracle.dbtools.crest.model.design.relational.Column.getDataType(Column.java:777)
              at oracle.dbtools.crest.model.design.ContainedObjectWithDomain.getDataType(ContainedObjectWithDomain.java:128)
              at oracle.dbtools.crest.model.design.relational.Column.getDataType(Column.java:756)
              at oracle.dbtools.crest.swingui.diagram.graph.ContainerRenderer.getDataType(ContainerRenderer.java:263)
              at oracle.dbtools.crest.swingui.diagram.graph.ContainerRenderer.getLongestDTName(ContainerRenderer.java:1173)
              at oracle.dbtools.crest.swingui.diagram.graph.ContainerRenderer.paint(ContainerRenderer.java:546)
              at javax.swing.CellRendererPane.paintComponent(CellRendererPane.java:151)
              at oracle.dbtools.crest.swingui.diagram.ui.def.DefaultDiagramUI.paintCell(DefaultDiagramUI.java:984)
              at oracle.dbtools.crest.swingui.diagram.ui.def.DefaultDiagramUI.paint(DefaultDiagramUI.java:938)
              at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
              at javax.swing.JComponent.paintComponent(JComponent.java:777)
              at javax.swing.JComponent.paint(JComponent.java:1053)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JViewport.paint(JViewport.java:728)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at org.netbeans.swing.tabcontrol.TabbedContainer.paint(TabbedContainer.java:994)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at org.netbeans.core.windows.view.ui.MainWindow$1.paint(MainWindow.java:189)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
              at javax.swing.JComponent.paintChildren(JComponent.java:886)
              at javax.swing.JComponent.paint(JComponent.java:1062)
              at javax.swing.JComponent.paintToOffscreen(JComponent.java:5223)
              at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1572)
              at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1495)
              at javax.swing.RepaintManager.paint(RepaintManager.java:1265)
              at javax.swing.JComponent._paintImmediately(JComponent.java:5171)
              at javax.swing.JComponent.paintImmediately(JComponent.java:4982)
              at javax.swing.JComponent.paintImmediately(JComponent.java:4963)
              at javax.swing.RepaintManager$4.run(RepaintManager.java:824)
              at javax.swing.RepaintManager$4.run(RepaintManager.java:807)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
              at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:807)
              at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:782)
              at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:731)
              at javax.swing.RepaintManager.access$1300(RepaintManager.java:64)
              at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1720)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
              at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
              at java.awt.EventQueue.access$400(EventQueue.java:97)
              at java.awt.EventQueue$3.run(EventQueue.java:697)
              at java.awt.EventQueue$3.run(EventQueue.java:691)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
              at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)
              at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
            2015-05-19 14:14:16,819 [AWT-EventQueue-0] INFO  DataModelerAddin - Oracle SQL Developer Data Modeler 4.1.0.881
            2015-05-19 14:19:54,354 [AWT-EventQueue-0] ERROR SubsetCO - SubsetCO container null in: class oracle.dbtools.crest.model.design.relational.Index
            2015-05-19 14:19:54,354 [AWT-EventQueue-0] ERROR SubsetCO -  do not use container.remove(subset) but subset.remove()
            
            • 3. Re: synchronize model with data dictionary, diagram goes weird
              David Last-Oracle

              Hi Scott,

               

              Thanks.  I've logged a bug on this.

              It appears that the cause of the problem is that a primary/unique key that was referenced by a foreign key got deleted from the model (presumably as a result of the synchronize).

              This caused problems when trying to draw the table containing the foreign key.

               

              When I opened the .dmd this morning after restarting SQL Dev it's now just opening it as an XML source

               

              I'm not sure what you mean by this.  Selecting Data Modeler > Open from the File menu should allow you to open the model.

               

              David

              • 4. Re: synchronize model with data dictionary, diagram goes weird
                Philip Stoyanov-Oracle

                Hi Scott,

                 

                I close the tab to reopen the model and it says it's already opened - I need to restart SQL Dev.

                Closing the tab doesn't close the design, it just hides that tab. You need to use "File>Data Modeler>Close" or to use "close design" in context menu for design node in Data Modeler browser. So you don't need to restart SQL developer

                On reopen of SQL Dev, I don't see "Recent designs" in File->Data Modeler, but I do see "Print diagram" submenu - not useful when no diagram open ;p

                Recent designs reappears when I open my .dmd.

                Initially Data Modeler is not started. "Recent designs" is dynamic menu item which is added after DM is started. You can trigger starting of DM by using one of DM's menu items - I usually use "View>Data Modeler>Browser"

                I tried dragging/dropping again from the table list but I end up losing foreign key links instead.

                I tried dragging/dropping again from the table list but I end up losing foreign key links instead.

                These issues with basic behaviours on synchronising or reapplying with a drag drop from the table list make it a frustrating tool to use casually.

                Probably you already had the problem David explained.

                We see drag&drop as quick way to build a diagram/model from scratch. But recommended way to extend/update it is to use Sync functionality or import wizard - much more dependencies are tracked there.

                 

                Philip