Error on Update of SAML-Addon

Hello,

we upgraded the SAML-Addon to the lattest Version. Seems someone messed up the update-scripts.
We can’t update the oracle and mssql. See the logs attached.
It looks like the mysql updatescript was just copied and inserted into oracle and mssql.
The syntax for the alter column is wrong.

alter table SAMLADDON_KEY_STORE add column KEYSTORE_PASSWORD varchar(100)

column is wrong for Oracle and MSSQL

Greetings
Paul

10:45:59.525 INFO  c.h.c.c.sys.dbupdate.DbUpdaterEngine    - Updating data store [Main] ...
    10:46:00.681 INFO  c.h.c.c.sys.dbupdate.DbUpdaterEngine    - Executing script 50-saml-addon/update/oracle/20/201022-2-updateKeyStore.sql
    10:46:00.744 ERROR c.h.c.c.s.AbstractWebAppContextLoader   - Error initializing application
    java.lang.RuntimeException: 
    =================================================
    ERROR: Data store update failed. See details below.
    =================================================
    Error executing SQL script 201022-2-updateKeyStore.sql
    ORA-00904: : ungültige ID

    	at com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine.executeSqlScript(DbUpdaterEngine.java:389) ~[cuba-core-7.2.11.jar:7.2.11]
    	at com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine.executeScript(DbUpdaterEngine.java:447) ~[cuba-core-7.2.11.jar:7.2.11]
    	at com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine.doUpdate(DbUpdaterEngine.java:252) ~[cuba-core-7.2.11.jar:7.2.11]
    	at com.haulmont.cuba.core.sys.dbupdate.ServerDbUpdater.doUpdate(ServerDbUpdater.java:82) ~[cuba-core-7.2.11.jar:7.2.11]
    	at com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine.updateDatabase(DbUpdaterEngine.java:103) ~[cuba-core-7.2.11.jar:7.2.11]
    	at com.haulmont.cuba.core.sys.dbupdate.DbUpdateManager.updateDatabase(DbUpdateManager.java:76) ~[cuba-core-7.2.11.jar:7.2.11]
    	at com.haulmont.cuba.core.sys.dbupdate.DbUpdateManager.applicationInitialized(DbUpdateManager.java:61) ~[cuba-core-7.2.11.jar:7.2.11]



    10:45:46.666 INFO  c.h.c.c.sys.dbupdate.DbUpdaterEngine    - Updating data store [Main] ...
    10:45:47.822 INFO  c.h.c.c.sys.dbupdate.DbUpdaterEngine    - Executing script 50-saml-addon/update/mssql/20/201022-2-updateKeyStore.sql
    10:45:47.885 ERROR c.h.c.c.s.AbstractWebAppContextLoader   - Error initializing application
    java.lang.RuntimeException: 
    =================================================
    ERROR: Data store update failed. See details below.
    =================================================
    Error executing SQL script 201022-2-updateKeyStore.sql
    Falsche Syntax in der Nähe des column-Schlüsselworts.
    	at com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine.executeSqlScript(DbUpdaterEngine.java:389) ~[cuba-core-7.2.11.jar:7.2.11]
    	at com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine.executeScript(DbUpdaterEngine.java:447) ~[cuba-core-7.2.11.jar:7.2.11]
    	at com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine.doUpdate(DbUpdaterEngine.java:252) ~[cuba-core-7.2.11.jar:7.2.11]
    	at com.haulmont.cuba.core.sys.dbupdate.ServerDbUpdater.doUpdate(ServerDbUpdater.java:82) ~[cuba-core-7.2.11.jar:7.2.11]
    	at com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine.updateDatabase(DbUpdaterEngine.java:103) ~[cuba-core-7.2.11.jar:7.2.11]
    	at com.haulmont.cuba.core.sys.dbupdate.DbUpdateManager.updateDatabase(DbUpdateManager.java:76) ~[cuba-core-7.2.11.jar:7.2.11]
    	at com.haulmont.cuba.core.sys.dbupdate.DbUpdateManager.applicationInitialized(DbUpdateManager.java:61) ~[cuba-core-7.2.11.jar:7.2.11]
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_201]
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_201]

Hi, @paul.blak

Thank you for reporting the problem. I’ve created a ticket and I’ll inform you as soon as we publish the bugfix release.

Regards,
Gleb

Hello @shalyganov,

I saw that the bug has been fixed on Github (Update scripts for MSSQL and Oracle are invalid #27 · cuba-platform/saml-addon@dc96595 · GitHub).

When will the release be available?

Greetings
Andreas

Hi @Andreas.Brueck

We are currently testing the bugfixes, so we are planning that the release will be available next week.

Regards,
Gleb

Hello @shalyganov,

we testet the updated scripts today and ran into an error with the script on Oracle.
The Problem seems to be the “;” at the end of the script.
We are currently using the ojdbc6.jar as the driver.

Could you check again?

Greetings
Paul

Hi, @paul.blak

We have just released 0.5.2 version, where the update script for Oracle should be fixed. Please, try it out.

Regards,
Gleb

1 Like

Hi @shalyganov,

I testet 0.5.2 with an Oracle 18c XE and now it works.

Thank you for the quick fix.

Greetings,
Andreas

1 Like