KB Article #180147
Unable to edit/delete/add parameters in TSIM with Oracle DB
Problem
Editing a parameter throws the following Error in the Pop-up
"Internal error message: insertChangeLog ERROR"
Cause
The Stack trace displays the Cause:
WARN 2019-04-02 09:37:22,029 de.axway.amg.lib.poa [btpool0-896] - insertSqlToCHangeLog - ERROR: konnte Tabelle P_X_CHANGE_LOG nicht fuellen
WARN 2019-04-02 09:37:22,029 de.axway.amg.lib.poa [btpool0-896] - insertSqlToCHangeLog - Message is: ORA-00001: unique constraint (XXXXXX.SYS_C0012206) violated
java.lang.IllegalStateException: DBInterface was released and is not validat de.axway.lib.db.DBInterfaceHandler.invoke(DBInterfaceHandler.java:41)at com.sun.proxy.$Proxy3.commit(Unknown Source)at de.axway.amg.lib.poa.db.DBFileUtil.myFreeDBInterface(DBFileUtil.java:2250)at de.axway.amg.lib.poa.util.PoaTools.freeDbi4Exception(PoaTools.java:745)at de.axway.amg.lib.poa.PoaDelete.deleteData(PoaDelete.java:366)at de.axway.amg.lib.poa.PoaDelete.deleteData(PoaDelete.java:223)at de.axway.amg.lib.poa.ParamObjectAccessorCode.deleteData(ParamObjectAccessorCode.java:606)at de.axway.amg.lib.poa.ParamObjectAccessor.deleteData(ParamObjectAccessor.java:1093)at de.axway.amg.lib.StateHandler.deleteData(StateHandler.java:78)at de.axway.amg.SystemTransition.nextSemiState(SystemTransition.java:482)at de.axway.amg.StateMachine.nextState(StateMachine.java:202)at de.axway.amg.ac.ACServer.handleAcServerRequest(ACServer.java:466)at de.axway.amg.ac.ACServer.processCGIData(ACServer.java:712)at de.axway.ajas.dsp.application.DefaultHttpHandler.doGet(DefaultHttpHandler.java:331)at de.axway.ajas.dsp.application.DefaultHttpHandler.doPost(DefaultHttpHandler.java:119)at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)at de.axway.ajas.httpserver.application.DspServlet.serviceDsp(DspServlet.java:368)at de.axway.ajas.httpserver.application.DspServlet.doPost(DspServlet.java:268)
Resolution
Run the following 2 queries:
SELECT max(id) from p_x_change_log
SELECT p_x_sequence.nextval from dual
e.g. output
SELECT max(id) from p_x_change_log
8360171
SELECT p_x_sequence.nextval from dual
1719969
Observe that the 2nd query returns a value which is smaller than the max id returned by the first query.
This means that the action tried to be performed in the *Problem* is having an id which is smaller than the next value to be inserted, causing an inconsistency.
Solution is to run the script updateSequence.sh which will increase the value to the max value + 1, by dropping the sequence and creating a new one.
$ACTISEDI/install/updateSequence.sh
e.g.
> DROP SEQUENCE P_X_SEQUENCE
OK: SQL command successfully executed
> CREATE SEQUENCE P_X_SEQUENCE START WITH 8360172
OK: SQL command successfully executed
The output of the 2 queries will look like:
> SELECT p_x_sequence.nextval from dual
OK: executed SQL 'select' command!
+---------+
| NEXTVAL |
+---------+
|8360176 |
+---------+
> SELECT max(id) from p_x_change_log
OK: executed SQL 'select' command!
+---------+
| MAX(ID) |
+---------+
| 8360175 |
+---------+