3 Replies Latest reply: Jan 5, 2014 7:31 PM by fba8bb93-54bb-42cb-8d2f-943251a9af86 RSS

    How to resolve corruption in logical model?

    fba8bb93-54bb-42cb-8d2f-943251a9af86

      Hello

       

      I have a logical model created in SDDM 3.1.2.704.  I have engineered to a relational model successfully in the past, but recently when I tried to engineer logical -> relational nothing happens.  I get the following entry in the log file:

      [AWT-EventQueue-0] ERROR MDBAction - java.lang.NullPointerException

       

      Looking at some other discussions, I used the transformation script described here

           3.1.3.709: How to Verify and Fix a Possibly Corrupted Design?

      This didn't fix my problem, but the output file (generated when I press the Engineer to Relational model button) shows the following exception:

      java.lang.NullPointerException

      at oracle.dbtools.crest.model.design.engineering.EngCOPropertiesComparator.decodeDataTypeKindToString(Unknown Source)

      at oracle.dbtools.crest.model.design.engineering.EngCOPropertiesComparator.processDataTypeAndUse(Unknown Source)

      at oracle.dbtools.crest.model.design.engineering.EngCOPropertiesComparator.initPropertiesList(Unknown Source)

      at oracle.dbtools.crest.model.design.engineering.AttributeColumnComparator.initPropertiesList(Unknown Source)

      at oracle.dbtools.crest.model.design.engineering.AttributeColumnComparator.<init>(Unknown Source)

      at oracle.dbtools.crest.model.design.engineering.AttributeColumnComparator.<init>(Unknown Source)

      at oracle.dbtools.crest.model.design.engineering.FE_LogicalToRelational.addAttribute(Unknown Source)

      at oracle.dbtools.crest.model.design.engineering.FE_LogicalToRelational.addEntityDetails(Unknown Source)

      at oracle.dbtools.crest.model.design.engineering.FE_LogicalToRelational.setEditableStatus(Unknown Source)

      at oracle.dbtools.crest.model.design.engineering.FE_LogicalToRelational.addEntity(Unknown Source)

      at oracle.dbtools.crest.model.design.engineering.FE_LogicalToRelational.addFromLogicalModel(Unknown Source)

      at oracle.dbtools.crest.model.design.engineering.FE_LogicalToRelational.<init>(Unknown Source)

      at oracle.dbtools.crest.swingui.engineeringcompare.EngineeringCompareDialog.<init>(Unknown Source)

      at oracle.dbtools.crest.swingui.logical.ControllerLogical$FWDEngineer.doActionPerformed(Unknown Source)

      at oracle.dbtools.crest.swingui.MDBAction$ActionInvoker.run(Unknown Source)

      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)

      at java.awt.EventQueue.access$000(EventQueue.java:85)

      at java.awt.EventQueue$1.run(EventQueue.java:603)

      at java.awt.EventQueue$1.run(EventQueue.java:601)

      at java.security.AccessController.doPrivileged(Native Method)

      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)

      at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)

      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

       

      I have tried SDDM 3.3.0.747, same result.

      I have tried removing entities from the model, 1 at a time, but the problems continues (even when the model is reduced to no entities at all!)

      I have tried exporting the model and importing it into an empty design.  The import fails "Unable to generate design" and produces the following exception in the datamodeler.log file:

      [Thread-19] ERROR ODExtractionController - Error Generate Design: Untitled_1

      java.lang.NullPointerException

      at oracle.dbtools.crest.model.design.engineering.EngCOPropertiesComparator.decodeDataTypeKindToString(Unknown Source)

      at oracle.dbtools.crest.model.design.engineering.EngCOPropertiesComparator.processDataTypeAndUse(Unknown Source)

      at oracle.dbtools.crest.model.design.compare.COPropertiesComparator.initPropertiesList(Unknown Source)

      at oracle.dbtools.crest.model.design.compare.cwddesign.AttributeComparator.initPropertiesList(Unknown Source)

      at oracle.dbtools.crest.model.design.compare.cwddesign.AttributeComparator.<init>(Unknown Source)

      at oracle.dbtools.crest.model.design.compare.cwddesign.CompareCWDDesigns.addAttribute(Unknown Source)

      at oracle.dbtools.crest.model.design.compare.cwddesign.CompareCWDDesigns.addEntityDetails(Unknown Source)

      at oracle.dbtools.crest.model.design.compare.cwddesign.CompareCWDDesigns.addEntity(Unknown Source)

      at oracle.dbtools.crest.model.design.compare.cwddesign.CompareCWDDesigns.initSourceDesign(Unknown Source)

      at oracle.dbtools.crest.model.design.compare.cwddesign.CompareCWDDesigns.<init>(Unknown Source)

      at oracle.dbtools.crest.swingui.compare.cwddesign.CompareCWDDesignsDialog.<init>(Unknown Source)

      at oracle.dbtools.crest.imports.cwddesigner.CWDExtractionController$Runner2.run(Unknown Source)

      at java.lang.Thread.run(Thread.java:662)

       

      Any help greatly appreciated.  With over 100 entities and 200 relationships I really don't want to have to recreate this.

      Thanks in advance.

        • 1. Re: How to resolve corruption in logical model?
          David Last-Oracle

          Hi,

           

          One thing to check is whether Data Modeler can access the Types.xml file.  This should normally be in folder datamodeler\datamodeler\types.  But if a "Default System Types Directory" has been set on the Data Modeler page of Tools/Preferences, then Data Modeler will expect to find file Types.xml in this folder instead.

           

          David

          • 2. Re: How to resolve corruption in logical model?
            Philip Stoyanov-Oracle

            Hi,

            but the problems continues (even when the model is reduced to no entities at all!)

            The error you reported (in engineering and import) cannot be reached if there are no entities and attributes - it's a specific error probably related to usage of distinct types that are removed from design.

            You can use search functionality in order to find attributes/columns (logical/relational model) with incorrect data type definition based on distinct type.

            And it's better to move to Data Modeler 4.0 (833).

            So what to search (example is on logical model - it's the same for relational model - column):

            1) Activate search window (CTRL-F when logical diagram is active, or Find icon), switch to advanced mode

            2) for "Object type" Attribute:

            - check "Data Type kind" line and put DT as search text

            - check "Distinct type" line, don't put search text - it'll search for attributes without distinct type

            - change the operand for expression from OR to AND

            3) press "Find" button

             

            If you find some attributes, then you need to decide what to do with them - to set data type or to delete them.

            The same for columns in relational model.

             

            Philip

            • 3. Re: How to resolve corruption in logical model?
              fba8bb93-54bb-42cb-8d2f-943251a9af86

              Hi Philip

               

              Thanks for the reply.

              I had to upgrade to version 4.0 (version 3 doesn't have advanced search).  Once on 4.0 I was able to follow your instructions to find the offending entity.  As you predicted, there were attributes with missing / unknown data types (this entity was copied from another model).  After fixing these attributes the 'Engineer to Relational' button started working again.

               

              Thanks again for your help

              Peter