powered by Jive Software

The column 'startDate' was specified multiple times for 'ofConversation'


#1

Hi Experts,

I have found unexpected error messages in our embedded Openfire, after upgrading it to 4.3.1.
The exception is about JdbcPersistenceManager in the monitoring plugin:
[
2019.03.11 09:58:32 com.reucon.openfire.plugin.archive.impl.JdbcPersistenceManager - Error selecting conversations

java.sql.SQLException: The column ‘startDate’ was specified multiple times for ‘ofConversation’.

at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372) ~[jtds-1.3.1.jar:1.3.1]

at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988) ~[jtds-1.3.1.jar:1.3.1]

at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421) ~[jtds-1.3.1.jar:1.3.1]

at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671) ~[jtds-1.3.1.jar:1.3.1]

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

at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:1029) ~[jtds-1.3.1.jar:1.3.1]

at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122) ~[commons-dbcp2-2.5.0.jar:2.5.0]

at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122) ~[commons-dbcp2-2.5.0.jar:2.5.0]

at com.reucon.openfire.plugin.archive.impl.JdbcPersistenceManager.findConversations(JdbcPersistenceManager.java:319) [monitoring-1.7.0.jar!/:?]

]

Root cause:
In JdbcPersistenceManager, the constant SELECT_CONVERSATIONS contains two duplicate columns for “startDate”, one is “ofConversation.startDate” and the other one is “min(ofConParticipant.joinedDate) AS startDate”.

As a solution in our product, we removed the latter.

BTW,
I have planned to directly submit an issue in Jira, but found I may have not been authorized to do so…

Thanks,


#2

Jira is closed for outside users, but all plugins now have separate repositories and you can file issues there. https://github.com/igniterealtime/openfire-monitoring-plugin/issues


#3

Thank you wroot!

Here it is: