archi-contribs / database-plugin

Database export/import plugin that store models in a central database repository
Other
81 stars 23 forks source link

Error exporting Specializations to Neo4J GraphDB #172

Closed cybye closed 4 months ago

cybye commented 1 year ago

I got an issue with exporting to neo4j database. Is the INSERT below meant to be used for this database?

2023-11-29 09:11:07 DEBUG  177:DBDatabaseConnection                     - JDBC class = org.neo4j.jdbc.Driver
2023-11-29 09:11:07 DEBUG  180:DBDatabaseConnection                     - JDBC connection string = jdbc:neo4j:bolt://localhost:7687
2023-11-29 09:11:07 DEBUG  223:DBDatabaseConnection                     - Connecting with username = neo4j
2023-11-29 09:11:07 DEBUG  243:DBDatabaseConnection                     - Will use default schema 
2023-11-29 09:11:07 DEBUG  707:DBGui                                    - We are connected to the database.
2023-11-29 09:11:07 DEBUG 1301:DBGuiExportModel                         - Enabling the "Export" button.
2023-11-29 09:11:11 INFO  1967:DBGuiExportModel                         - Exporting model: 
2023-11-29 09:11:11 INFO  1995:DBGuiExportModel                         - Calculating model's checksum.
2023-11-29 09:11:11 INFO   988:DBGui                                    - Exporting model to the database ...
2023-11-29 09:11:11 DEBUG 1451:DBDatabaseConnection                     - Setting database auto commit to false
2023-11-29 09:11:11 INFO  1014:DBGui                                    - Setting progress bar label to "Exporting specializations ..."
2023-11-29 09:11:11 DEBUG 2109:DBDatabaseExportConnection               - Exporting Profile:"Azure Databricks"(id-7c02e7cdd67346d0880f29fa3f3a1491) (initial version = 0, exported version = 1, database_version = 0, latest_database_version = 0)
2023-11-29 09:11:11 TRACE  170:DBStatement                              -       --> CREATE (new:profiles {id:'id-7c02e7cdd67346d0880f29fa3f3a1491', version:1, name:'Azure Databricks', is_specialization:true, image_path:'images/82aaf3aabbbff90556eeeb180dd4eb97.png', concept_type:'TechnologyService', created_by:'cybye', created_on:1970-01-01 01:00:00.0})
2023-11-29 09:11:11 TRACE   66:DBStatement                              -       --> CREATE (new:profiles {id:?, version:?, name:?, is_specialization:?, image_path:?, concept_type:?, created_by:?, created_on:?})
2023-11-29 09:11:11 TRACE 2153:DBDatabaseExportConnection               -    Assigning profile to model
2023-11-29 09:11:11 TRACE  170:DBStatement                              -       --> INSERT INTO profiles_in_model (profile_id, profile_version, model_id, model_version, pos) VALUES ('id-7c02e7cdd67346d0880f29fa3f3a1491', 1, '9a7f63a9-1c5f-4fc8-8ece-793e51d53fba', 0, 1)
2023-11-29 09:11:11 DEBUG 1476:DBDatabaseConnection                     - Rollbacking database transaction.
2023-11-29 09:11:11 DEBUG  260:DBDatabaseConnection                     - Closing the database connection.

Consequence is this exception coming back from DB:

Failed to export the model to the database
2023-11-29 09:11:11 ERROR 1106:DBGui                                    │ org.neo4j.driver.exceptions.ClientException: Invalid input 'INSERT': expected  (...  "CREATE" ... ) 

Archi 5.2.0 DB Export 4.9.7.

herve91 commented 6 months ago

you're right, this is a bug. I add it to the list of bugs to fix.

herve91 commented 4 months ago

fixed in version 4.9.8 that will be released very soon