Issue with MSSQL (#6)
Closed
Andrzej Wójcik (Tigase) opened 1 decade ago
Due Date
2014-09-19

There is an issue with generic SQL queries used to retrieve data on MSSQL. We would need to prepare custom queries for MSSQL to make it work.

com.microsoft.sqlserver.jdbc.SQLServerException: 'date' is not a recognized built-in function name.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1493)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:390)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:340)
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:283)
    at tigase.archive.MessageArchiveDB.getCollectionsCount(MessageArchiveDB.java:681)
    at tigase.archive.MessageArchiveDB.getCollections(MessageArchiveDB.java:481)
    at tigase.archive.MessageArchiveComponent.listCollections(MessageArchiveComponent.java:264)
    at tigase.archive.MessageArchiveComponent.processActionPacket(MessageArchiveComponent.java:214)
    at tigase.archive.MessageArchiveComponent.processPacket(MessageArchiveComponent.java:107)
    at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1475)

Created from thread https://projects.tigase.org/boards/19/topics/1888

Andrzej Wójcik (Tigase) commented 1 decade ago

I created fixed MSSQL queries but still need to add detection of SQL database to code to use them when they are needed.

Andrzej Wójcik (Tigase) commented 1 decade ago

For a while I considered adding support also for MSSQL 2005 but as it was not possible to add detection for MSSQL version in easy way and due to the fact that MSSQL 2005 version was compatible with newer MSSQL version but with worse performance I decided not to add support for MSSQL 2005 and only support MSSQL versions from MSSQL 2008. Moreover we now have 2014 so chance that someone would like to use database software from 2005 is rather small.

+Summary:+

Issue is fixed now for MSSQL 2008 and never versions.

Artur Hefczyc commented 1 decade ago

In QA by user from message#1888

Artur Hefczyc commented 10 years ago

As there is no response from the user, I am assuming it works now correctly.

Android IT commented 9 years ago

Hello.Now i can get response in the 7.0.1 version service , but 5.2.3. did not reply

Information is as follows:

2016-01-08 09:51:26.425 [in_0-message-archive] AbstractMessageReceiver$QueueListener.run() SEVERE: [in_0-message-archive] Exception during packet processing: from=sess-man@localhost, to=message-archive@10.10.10.219, DATA=

<retrieve xmlns="urn:xmpp:archive" start="2000-00-00T00:00:00+0800">

<set xmlns="http://jabber.org/protocol/rsm">

    <max>500</max>

</set>

</retrieve>

, SIZE=286, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=get

java.lang.NullPointerException: Neither attribute key or value can be set to null.

    at tigase.xml.Element$XMLIdentityHashMap.put(Element.java:1294)

    at tigase.xml.Element.setAttribute(Element.java:1026)

    at tigase.xml.Element.setAttributes(Element.java:1077)

    at tigase.xml.Element.<init>(Element.java:141)

    at tigase.archive.MessageArchiveComponent.getMessages(MessageArchiveComponent.java:415)

    at tigase.archive.MessageArchiveComponent.processActionPacket(MessageArchiveComponent.java:227)

    at tigase.archive.MessageArchiveComponent.processPacket(MessageArchiveComponent.java:107)
  1. at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1475)

please help me。3Q3Q3Q

Andrzej Wójcik (Tigase) commented 9 years ago

First it is not a good idea to comment on closed task. In this case it is not related to your issue.

Verision 5.2.3 uses older version of Message Archiving component in which it was not possible to execute any retrieval from MessageArchiving without specifying with attribute. In new version distributed with 7.0.0 version of Tigase XMPP Server we added possibility to omit with attribute.

My suggestion to solve your problem is to use Tigase XMPP Server 7.0.1 as it is latest stable version.

issue 1 of 1
Type
Consulting
Priority
Normal
Assignee
RedmineID
1922
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-message-archiving#6
Please wait...
Page is in error, reload to recover