Hi All,
I was unable to retrieve messages from openfire. after restarting openfire service i am able to retrieve the messages
I have observed below error in openfire logs . Please suggest com.reucon.openfire.plugin.archive.xep0313.IQQueryHandler - An unexpected exception occurred while processing:
com.reucon.openfire.plugin.archive.impl.DataRetrievalException: com.reucon.openfire.plugin.archive.impl.DataRetrievalException: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'LIMIT'.
at com.reucon.openfire.plugin.archive.xep0313.IQQueryHandler.retrieveMessages(IQQueryHandler.java:471) ~[?:?]
at com.reucon.openfire.plugin.archive.xep0313.IQQueryHandler.lambda$handleIQ$2(IQQueryHandler.java:269) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_202]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_202]
I had overseen in dot 1 that there allready is a special method for sql server so dot 2. should be the bug.
We have to add a
else if (DbConnectionManager.getDatabaseType() == DbConnectionManager.DatabaseType.sqlserver) {
//TODO: add "OFFSET X FETCH NEXT Y ROWS ONLY" to query
}
@totzkotz’s fixes will be part of the next release of the plugin! Prior to the release, you can already use a snapshot release of the plugin if you want to give this fix a try!