I have been trying to import an sdf which has some records that have no structure. I am using the JWS version of IJC 3.0.2. I have created an empty local database and selected "import file". I can browse to the sdf and parse the field names from the first few records. Under the "general settings" tab of the "table details" button, I have enabled the "empty structure allowed" checkbox.
When I map the fields, structure is mapped to a new "structure" field and the rest of the sdf tags are created as new db fields. The import generates the following message for each record with no structure.
Warning: Failed to import row 4,944: Empty structure; uncategorized SQLException for SQL ; SQL state [null]; error code ; Empty structure; nested exception is java.sql.SQLException: Empty structure
After about 1000 empty structure records are found the import terminates with the following message:
TOO MANY CONSECUTIVE ERRORS, TERMINATING IMPORT
Isn't the import supposed to tolerate empty structures and create IJC records using the other data? Any ideas?
Jchem entity doesn't have permission for adding records with empty structures. It can be change in schema editor. Import creates jchem entity with default parameters. It means that a row with empty entity cannot be imported. Possible solution for you is to create an entity manually and change the entity setting to allow insert rows with an empty structure. You can than import the sdf file to the existing entity.
We tested this again and we see the problem now. We are working on fixing it. Thank you for the bug report.
One more update: we identified the bug in code and are working on fix now. The problem is that "Duplicate filtering" and "Empty Structure
Allowed" options are not used when new JChem entity is created (either
from Import or directly in the Schema editor). It is possible to change these setting once entity is created.
Hopefully this the fix will be included in IJC 3.0.3 (expected probably around Oct/19).
In the meantime, it's possilble to use simple workaround which was mentioned by Petr Zajac above: create the entity first, change the "Empty Structure Allowed" option and then import sdf into this existing entity.
Thanks for the prompt reply. Your suggested workaround solved the import problem.
This bug must have been introduced fairly recently as I'm sure I have imported this exact sd file (with some empty structures) into earlier versions of IJC.
This problem should now be fixed in the 3.0.4 update of IJC.