Forum Stats

  • 3,827,131 Users
  • 2,260,743 Discussions
  • 7,897,181 Comments

Discussions

ORA-01400 error when exporting model to a reporting schema.

Senkum
Senkum Member Posts: 39 Blue Ribbon

Hello,

Is anyone getting this error when exporting the model to a reporting schema?

SDDM Version 21.2.0.183

==============

2022-02-09 21:07:33 SEVERE - Error Exporting to Reporting Schema: 

java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("DM_REPO_MGR"."DMRS_DIAGRAMS"."OBJECT_ID")


at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:628)

at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:562)

at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1145)

at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:726)

at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:291)

at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:492)

at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:148)

at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1038)

at oracle.jdbc.driver.OracleStatement.executeSQLStatement(OracleStatement.java:1507)

at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1287)

at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3735)

at oracle.jdbc.driver.OraclePreparedStatement.executeLargeUpdate(OraclePreparedStatement.java:3910)

at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3889)

at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:992)

at oracle.dbtools.crest.exports.reports.RSDiagrams.export(RSDiagrams.java:555)

at oracle.dbtools.crest.exports.reports.ReportsHandler.export(ReportsHandler.java:450)

at oracle.dbtools.crest.swingui.ControllerApplication$ExportToReportsSchema$1.run(ControllerApplication.java:2128)

Caused by: Error : 1400, Position : 430, Sql = INSERT INTO DMRS_Diagrams (Diagram_Name, Object_ID, OVID, Diagram_Type, Is_Display, Visible, Master_Diagram_ID, Master_Diagram_OVID, Model_ID, Model_OVID, Model_Name, Notation, Show_All_Details, Show_Names_Only, Show_Elements, Show_Datatype, Show_Keys, Autoroute, Box_In_box, Master_Diagram_Name, Diagram_SVG, Diagram_PDF, Subview_ID, Subview_OVID, Subview_Name, Display_ID, Display_OVID, Display_Name, Design_OVID) VALUES (:1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 ), OriginalSql = INSERT INTO DMRS_Diagrams (Diagram_Name, Object_ID, OVID, Diagram_Type, Is_Display, Visible, Master_Diagram_ID, Master_Diagram_OVID, Model_ID, Model_OVID, Model_Name, Notation, Show_All_Details, Show_Names_Only, Show_Elements, Show_Datatype, Show_Keys, Autoroute, Box_In_box, Master_Diagram_Name, Diagram_SVG, Diagram_PDF, Subview_ID, Subview_OVID, Subview_Name, Display_ID, Display_OVID, Display_Name, Design_OVID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), Error Msg = ORA-01400: cannot insert NULL into ("DM_REPO_MGR"."DMRS_DIAGRAMS"."OBJECT_ID")


at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:632)

... 16 more

Answers

  • Dave Schleis
    Dave Schleis Member Posts: 225 Silver Badge
    edited Mar 25, 2022 12:35PM

    Hello, did you ever get past this issue? Have you tried a later version?

  • Senkum
    Senkum Member Posts: 39 Blue Ribbon

    Hi Dave,

    Nope. I'm still getting this error. I never tried with the latest version as I had some scripting issues with it.

    Thanks!

  • Dave Schleis
    Dave Schleis Member Posts: 225 Silver Badge

    I would suggest that you check to see if this behavior persists in the latest version, and if it does, file a ticket with support.

  • Senkum
    Senkum Member Posts: 39 Blue Ribbon

    Sure, thanks Dave!

  • Philip Stoyanov-Oracle
    Philip Stoyanov-Oracle Member Posts: 3,410 Employee
    edited Mar 28, 2022 1:31PM

    there is a diagram without object ID (null) - that's what I can tell based on the error. It could be display or subview.

  • Senkum
    Senkum Member Posts: 39 Blue Ribbon

    How do I find that out? I checked all the displays and sub-views in the model. Either they have valid objects or empty.

  • Senkum
    Senkum Member Posts: 39 Blue Ribbon

    @Philip Stoyanov-Oracle, I was just poking around with a copy of the model and found that the objectID of the main view for the logical model in the file "model\logical\Diagrams.local" is NULL! I tried to change the value to a dummy value "XYZ" and the model is resetting it back to NULL. Looks like, this could be the reason why I couldn't export the data to the repository. How do I fix it?

    Thanks!

  • Philip Stoyanov-Oracle
    Philip Stoyanov-Oracle Member Posts: 3,410 Employee

    @Senkum that record is not that important, even you can remove it. It's more important:

    1) in Logical.xml to have

    <LogicalDesign class="oracle.dbtools.crest.model.design.logical.LogicalDesign" name="Logical" id="9B376F86-28C3-613C-A6CA-13E5FB1A17ED" mainViewID="xyz">

    2) to have file with name xyz.xml in ..\logical\subviews directory - that's the file with main diagram for logical model (according to xyz ID we set in 1)

    3) and diagram in that file (xyz.xml) to have xyz as ID

    <Diagram class="oracle.dbtools.crest.swingui.logical.DPVLogical" name="Logical" id="xyz">

    When you open that design then the deleted record in Diagrams.local will be restored.

    So you need to find the file for main diagram of Logical model - usually it's the biggest one. and do the changes in it and in Logical.xml

    Philip

  • Senkum
    Senkum Member Posts: 39 Blue Ribbon
    edited Apr 6, 2022 3:38PM

    @Philip Stoyanov-Oracle, the entire design got messed up for some reason. The sub-views for the logical model are missing all of a sudden. I was storing it in a single file as I was having problem with the GIT initially. Anyways, I have created a new design and manually copied all the objects. I'm now storing it in multiple files. Also, I able to export the design to the reporting schema!

    Looks like, I'm all set now.

    BTW, I did not implement the steps that you provided.

    Thanks anyways for your help!