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

SQL Server incompatibility #47

Closed
mightymop opened this issue Jul 10, 2019 · 7 comments
Closed

SQL Server incompatibility #47

mightymop opened this issue Jul 10, 2019 · 7 comments

Comments

@mightymop
Copy link
Contributor

mightymop commented Jul 10, 2019

I've found that Exception in the logs with Version 1.8.0
(Openfire 4.4 on SQL Server)
SQL Server does not know "LIMIT" ... it uses "TOP" or "OFFSET"

2019.07.10 08:21:45 ERROR [message-archive-handler-93]: com.reucon.openfire.plugin.archive.impl.MucMamPersistenceManager - SQL failure during MAM-MUC:
java.sql.SQLException: Incorrect syntax near 'LIMIT'.
        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.6.0.jar:2.6.0]
        at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122) ~[commons-dbcp2-2.6.0.jar:2.6.0]
        at com.reucon.openfire.plugin.archive.impl.MucMamPersistenceManager.getArchivedMessages(MucMamPersistenceManager.java:143) ~[?:?]
        at com.reucon.openfire.plugin.archive.impl.MucMamPersistenceManager.findMessages(MucMamPersistenceManager.java:103) ~[?:?]
        at com.reucon.openfire.plugin.archive.xep0313.IQQueryHandler.retrieveMessages(IQQueryHandler.java:326) ~[?:?]
        at com.reucon.openfire.plugin.archive.xep0313.IQQueryHandler.lambda$handleIQ$0(IQQueryHandler.java:205) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_202]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_202]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_202]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_202]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
@GregDThomas
Copy link
Contributor

Can you confirm which databas you are seeing this with?

@mightymop
Copy link
Contributor Author

I am using sql server 2017 enterprise linux or what do you wanted to know?

@GregDThomas
Copy link
Contributor

No, that's we needed to know (it's also what I suspected, but good to get it confirmed).

@mightymop
Copy link
Contributor Author

Any news on this? it spams my error log ^^

@guusdk
Copy link
Member

guusdk commented Jul 26, 2019

Please remember that we're all volunteers with limited availability. If there's an urgency for you to have this fixed, please consider supplying a fix yourself.

@mightymop
Copy link
Contributor Author

mightymop commented Oct 12, 2019

fixed with #57

edit: closed PR and splitted old PR into 3 new ones...

@guusdk guusdk changed the title java.sql.SQLException SQL Server incompatibility Nov 26, 2019
@guusdk
Copy link
Member

guusdk commented Dec 2, 2019

The fix was merged, and will be part of the next release. Thanks for your help!

@guusdk guusdk closed this as completed Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants