nextgenhealthcare / connect

The swiss army knife of healthcare integration.
Other
915 stars 275 forks source link

[BUG] Error "oracle.jdbc.OracleDatabaseException: ORA-00984: column not allowed here" upgrading or installing on Oracle 11g #5995

Open mariocerrato opened 10 months ago

mariocerrato commented 10 months ago

Describe the bug Upgrading MirthConnect from 3.6.2 to 4.4.2 on a Oracle 11g installation: [Main Server Thread] com.mirth.connect.server.Mirth: Failed to migrate database schema com.mirth.connect.model.util.MigrationException: Failed to execute script: oracle-9-4.1.0.sql Caused by: java.sql.SQLSyntaxErrorException: ORA-00984: column not allowed here

Searching on oracle docs sequence nextval for default on columns are introduced in Oracle 12 https://asktom.oracle.com/pls/apex/f?p=100:11:::::P11_QUESTION_ID:9531809800346963199 but MirthConnect is declared compatible with oracle 10gR2+ (https://docs.nextgen.com/bundle/Mirth_User_Guide_4_4_2/page/connect/connect/topics/c_Changing_the_Database_Type_mirth_connect_ug.html).

DGdev91 commented 3 weeks ago

Well, to be honest Oracle 11g is in EOL since 2020, but Mirth Connect still declares Oracle10R2+ compatibility, and this should be addressed. (I also checked the docs for 4.5, it's still there https://docs.nextgen.com/bundle/Mirth_User_Guide_4_5_0/page/connect/connect/topics/c_Changing_the_Database_Type_mirth_connect_ug.html)

It can be handled using a trigger instead of using the sequence.nextval as default.

I made a draft PR for this. https://github.com/nextgenhealthcare/connect/pull/6303