Discussions
Categories
- 196.7K All Categories
- 2.2K Data
- 235 Big Data Appliance
- 1.9K Data Science
- 449.8K Databases
- 221.5K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 549 MySQL Community Space
- 477 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 532 SQLcl
- 4K SQL Developer Data Modeler
- 186.8K SQL & PL/SQL
- 21.2K SQL Developer
- 295.3K Development
- 17 Developer Projects
- 138 Programming Languages
- 292K Development Tools
- 104 DevOps
- 3.1K QA/Testing
- 645.9K Java
- 27 Java Learning Subscription
- 37K Database Connectivity
- 153 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 17 Java Essentials
- 158 Java 8 Questions
- 85.9K Java Programming
- 79 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.2K Java SE
- 13.8K Java Security
- 203 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 390 LiveLabs
- 37 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.6K Other Languages
- 2.3K Chinese
- 170 Deutsche Oracle Community
- 1K Español
- 1.9K Japanese
- 230 Portuguese
Please Help; Its a bug in tool or I'm missing something;

Data Dictionary Import is Failing For Foreign Key Constraints; Gives Empty relationship ER Diagrams.
Import failed – using the data dictionary built in feature I connected to the oracle instance and started loading table. However, after choosing the required schema and tables I see the below error in the log generated. In-fact the entity is generated in the physical relation and I see the count of table but, the constraints are failed to load. Thus, it gave me a E-R diagrams with out connecting relationship which is of no use. I also, look into engineer to logical design but no luck. Please help.
Error:
2021-05-19 10:49:40 INFO – Oracle SQL Developer Data Modeler 21.1.0.092.1221
2021-05-19 10:54:49 SEVERE – Error in database import:
java.lang.NullPointerException
at oracle.dbtools.crest.imports.metadata.oracle.CheckConstraintsImport.processCheckConstr(CheckConstraintsImport.java:277)
at oracle.dbtools.crest.imports.metadata.oracle.CheckConstraintsImport.initCHECK_Constraints(CheckConstraintsImport.java:256)
at oracle.dbtools.crest.imports.metadata.oracle.MOHTableOracle.generate(MOHTableOracle.java:466)
at oracle.dbtools.crest.imports.metadata.AbstractDBMExtractionHandler.generateDesign(AbstractDBMExtractionHandler.java:303)
at oracle.dbtools.crest.imports.metadata.oracle.DBMExtractionHandlerOracle.generateDesign(DBMExtractionHandlerOracle.java:283)
at oracle.dbtools.crest.imports.metadata.DBMExtractionController$EmptyRunner.run(DBMExtractionController.java:514)
at java.lang.Thread.run(Thread.java:748)
I logged in with DBA privileged user and version for sql data modeler is 21+ and using the latest JDK 11+. I have verified below checklist as well –
Check1:
select dbms_metadata.get_ddl(‘TABLE’,'<>’,'<>’) from dual ; this able to give the ddl script with foreign key constraints included.
Check2:
In SQL Developer, right click the object that you want to generate a script for. i.e. the table name, this able to give the ddl script with foreign key constraints included.
Check3:
Generate in DDL: Controls whether the foreign key creation is included when DDL
statements are generated to be used to create the database.
Go to FILE -> DATA MODELLER -> EXPORT -> DDL FILE.
New pop up window appear.
Click on Generate button.
New pop window appears.
Now click on “Generate DDL scripts in Separate Files”, on screen at bottom right.
Now go to tab “Include TABLE DDL scripts.
Select table you want to have DDL scripts.
click ok.
[ fails to get the foreign key constraints loaded with the sql data modeler ]
Check4:
SELECT * FROM user_constraints where owner = <> AND TABLE_NAME=<> AND constraint_type = ‘R’; [ able to see the FK and the status is enabled ]
SELECT * FROM all_constraints where <> AND TABLE_NAME=<> AND constraint_type = ‘R’; [ able to see the FK and the status is enabled ]
Check5:
Right click on the relation E-R Diagram and try via Synchronize with Data Dictionary; [ Unable to load data dictionary using this option ]
Answers
-
The problem is in processing of check constraints - it seems there is a check constraint without condition. Can you run query for check constraints and to see in what column is the condition and if there is a check constraint without condition
Philip
-
Thank you so much Philip. I followed your instruction and by executing the following queries, I see no results returned. and validated the CHECK constraints with conditions as well. Besides, I see couple of constraints are in disabled state in scheme now, please confirm will that cause the issue.
select constraint_name,search_condition from user_constraints where constraint_type='C' and search_condition is NULL;
select constraint_name,search_condition from all_constraints where constraint_type='C' and search_condition is NULL
select constraint_name,search_condition from dba_constraints where constraint_type='C' and search_condition is NULL.
-
there is one more column SEARCH_CONDITION_VC - can you check it as well?
-
all the constraints are having NULL value for SEARCH_CONDITION_VC however SEARCH_CONDITION does has the value in it.
-
what's the DB version, PDB or CDB?
-
it is 12C, PDB
-
I cannot reproduce in my environment. How those tables and check constraints are created. Do you connect as owner of those tables or you see them through grants and synonyms. Are they in another container/PDB?