Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A known bug in MH prior to version 3.4 (on Windows only!) corrupts the status database. If you encounter the following a log entry complaining about an java.sql.SQLException  in wrapper.log or message-handler.log upon   upon startup of MH such as

No Format
INFO   | jvm 1    | 2019/05/22 09:38:19 | Exception in thread "Thread-2" java.lang.IllegalStateException: log service cannot be started: java.sql.SQLException: Table already exists: STATUS in statement [CREATE CACHED TABLE status] Query: CREATE CACHED TABLE status (participant_id VARCHAR(255) NOT NULL, filename VARCHAR(255) NOT NULL, message_id VARCHAR(255), sent_date DATETIME, received_date DATETIME, status TINYINT NOT NULL, source TINYINT NOT NULL, UNIQUE (participant_id, filename)) Parameters: []
INFO   | jvm 1    | 2019/05/22 09:38:19 | 	at ch.admin.suis.msghandler.common.MessageHandler.startLogService(MessageHandler.java:180)
INFO   | jvm 1    | 2019/05/22 09:38:19 | 	at ch.admin.suis.msghandler.common.MessageHandler.run(MessageHandler.java:165)
INFO   | jvm 1    | 2019/05/22 09:38:19 | 	at java.lang.Thread.run(Thread.java:748)
STATUS | wrapper  | 2019/05/22 09:38:21 | <-- Wrapper Stopped

the following workaround gets MH going again:

...

or  

No Format
Caused by: java.sql.SQLException: Violation of unique index SYS_IDX_47: duplicate value(s) for column(s)  in statement [UPDATE status SET status = ?, received_date = ? WHERE message_id = ?] Query: UPDATE status SET status = ?, received_date = ? WHERE message_id = ? Parameters: [2, 2019-11-25 08:37:31.217, fa3d12fa-d16c-4d54-af45-27ea311cafb9]


the following workaround gets MH going again:

  • Make sure that MH is not running.
  • Remove the files of the MH database from the directory 'db'. The directory is located underneath the directory configured in the config element <workingDir dirPath="..."/> in the config.xml file.
  • Decrease the value of the attribute dataHoldTimeInDays  in the element <statusDatabase>. A value of 2 is usually enough.
  • Start MH.

(warning) be aware of the fact, that with this workaround you remove the status database. If your application check the status of message using the MH REST interface, you will loose the state information of not already delivered messages! In this case you must probably change the state of these messages manually in your applications database.

...