java.sql.BatchUpdateException: Invalid column name 'messageID'

Hi Experts,

I found an unexpected error message in our embedded Openfire, after upgrading to 4.3.1.
The error is about the ConversationManager in the monitoring plugin 1.7.0.
[2019.03.06 10:34:33 org.jivesoftware.openfire.archive.ConversationManager - Unable to archive message data!

java.sql.BatchUpdateException: Invalid column name ‘messageID’.

at net.sourceforge.jtds.jdbc.JtdsStatement.executeBatch(JtdsStatement.java:1069) ~[jtds-1.3.1.jar:1.3.1]

]

Root cause:
The two columns (messageID, sentDate) are there when creating the table ofMessageArchive, but are not there when upgrading it.

Solution:
In src\database\upgrade\4*.sql, alter table to add these two columns.
For example, in SQL Server add the below statement as the first line,
ALTER TABLE ofMessageArchive ADD
messageID BIGINT,
stanza NVARCHAR(MAX);

Thanks,

Created new issue:

1 Like