Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The column ‘startDate’ was specified multiple times for 'ofConversation' #31

Closed
promiselaoliu opened this issue Mar 11, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@promiselaoliu
Copy link

commented Mar 11, 2019

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 1.7.0:
[
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.

Thanks,

@guusdk

This comment has been minimized.

Copy link
Member

commented Jun 25, 2019

Thanks for your report. This is probably a copy/paste error. That column is named joinedDate everywhere else. I'll fix this in v1.8.0.

guusdk added a commit to guusdk/openfire-monitoring-plugin that referenced this issue Jun 25, 2019

guusdk added a commit to guusdk/openfire-monitoring-plugin that referenced this issue Jun 25, 2019

guusdk added a commit that referenced this issue Jun 25, 2019

@guusdk guusdk closed this Jun 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.