Project

General

Profile

Save on tig_muc tables

yosef arraf
Added 10 months ago

Hi,
What is the relevant version i need to use that save the rooms data on tig_muc tables?(MUC version and Server version)

Thanks
Yosef


Replies (25)

(1)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 10 months ago

Separate tables for MUC rooms configuration and rooms history were added in version 3.0.0-SNAPSHOT of the Tigase MUC component. This is a new version and part of Tigase XMPP Server 8.0.0-SNAPSHOT distribution package.

(1)

Added by yosef arraf 10 months ago

Thank you for your replay,

  1. is there any risk for upgrade tigase server from 701 to 8?
  2. before version 3.0.0 where MUC rooms data was saved?

Thanks,
Yosef

(1)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 10 months ago

They were saved in tig_pairs and tig_nodes tables. For the migration process, we've created tigase.muc.repository.migration.Converter class which can be used to convert rooms stored in the old form to the new tables. However, during this process Tigase XMPP Server needs to be stopped.

(1)

Added by yosef arraf 10 months ago

is there any risk for upgrade tigase server from 701 to 8?

(1)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 10 months ago

Tigase XMPP Server 8.0.0-SNAPSHOT is still a nightly build of the upcoming version 8.0.0 of the Tigase XMPP Server. As you can see we bumped major version number as it is a huge change from Tigase XMPP Server 7.x series.

Right now work on this version is almost done and we are mostly testing it and fixing found issues. However, it is a big change in the internals of Tigase XMPP Server.

(1)

Added by yosef arraf 10 months ago

ok i will keep working with server 701,
can you explain how i can see my room/room participants on tig tables?

(1)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 10 months ago

You cannot. That information is kept in memory only.

(1)

Added by yosef arraf 10 months ago

in memory mean when restarting server all rooms data will גisappeared ?

(1)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 10 months ago

Every time your client disconnects, it is leaving the room, so there is no point to keep a list of participants in the database as it is changing all the time.
So when you restart the server, rooms will still be there, but there will be no participants until the user will join them. Most of XMPP clients do that automatically when they reconnect.

(1)

Added by yosef arraf 10 months ago

  1. As i understand the client will manage his groups and every time he need to send a massage to the group he will send a stanza with all the group members is that right?
  2. do you have any document how client should work with the server?

Thanks,
Yosef

(1)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 10 months ago

  1. No, it will rejoin MUC room every time it will reconnect. Then it will send message to one of joined rooms and this message will be delivered to room participants.2
  2. What the client should do and how it should behave is described in https://xmpp.org/extensions/xep-0045.html

Added by 连生 张 about 1 month ago

The ts field in my tig_muc_room_history table and the subject_date field in the tig_muc_rooms table store 2019-02-11 16:51:58.000000 of data, causing me to query the history table every time I enter the room

My version of tigase-muc is 3.0.0-SNAPSHOT
Error message is:

2019-02-11 16:57:23.985 [in_11-muc] JDBCHistoryProvider.getHistoryMessages() SEVERE: Can't get history
java.sql.SQLException: Cannot convert value '2019-02-11 16:51:58.000000' from column 2 to TIMESTAMP.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1072)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:986)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:981)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1336)
at com.mysql.jdbc.BufferRow.getTimestampFast(BufferRow.java:575)
at com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java:6754)
at com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:6073)
at com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:6111)
at tigase.db.DataRepository.getTimestamp(DataRepository.java:272)
at tigase.muc.history.JDBCHistoryProvider.processResultSet(JDBCHistoryProvider.java:299)
at tigase.muc.history.JDBCHistoryProvider.getMessagesSince(JDBCHistoryProvider.java:279)
at tigase.muc.history.JDBCHistoryProvider.getHistoryMessages(JDBCHistoryProvider.java:147)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at tigase.stats.StatisticsInvocationHandler.invoke(StatisticsInvocationHandler.java:75)
at com.sun.proxy.$Proxy53.getHistoryMessages(Unknown Source)
at tigase.muc.history.HistoryProviderMDBean.getHistoryMessages(HistoryProviderMDBean.java:102)
at tigase.muc.modules.PresenceModuleImpl.sendHistoryToUser(PresenceModuleImpl.java:640)
at tigase.muc.modules.PresenceModuleImpl.processEntering(PresenceModuleImpl.java:557)
at tigase.muc.modules.PresenceModuleImpl.process(PresenceModuleImpl.java:388)
at tigase.component.modules.StanzaProcessor.process(StanzaProcessor.java:164)
at tigase.component.modules.StanzaProcessor.processPacket(StanzaProcessor.java:85)
at tigase.component.AbstractKernelBasedComponent.processPacket(AbstractKernelBasedComponent.java:81)
at tigase.muc.MUCComponent.processPacket(MUCComponent.java:121)
at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1364)
Caused by: java.lang.NumberFormatException: admin2019-02-11 16:51:58.000000$admin@zhangliansheng/Spark 2.8.3.960666.�666.
at com.mysql.jdbc.StringUtils.getInt(StringUtils.java:756)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 1 month ago

How did you install Tigase XMPP Server? Were you using distribution builds? or maybe something else?
Were you upgrading the installation?
Please check the version of MySQL JDBC driver which Tigase XMPP Server is using. Older versions than 5.1.40 were unable to process correctly timestamps with increased precision.

Added by 连生 张 about 1 month ago

In my version 5.1.40, there was a time store inconsistency when creating a group

mysql
mysql-connector-java
5.1.40

muc1.png (33.7 KB) muc1.png
muc2.png (35.8 KB) muc2.png

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 1 month ago

I've just verified that Tigase XMPP Server 8.0.0-RC1 works properly with TIMEMSTAMP(6) on MySQL 5.7 or higher with MySQL JDBC driver 5.1.40 or newer. Timestamps are properly entered to the database and there is no store inconsistency related to group creation.

And as for your issue, even if there would be "inconsistency" the impact of that would be minimal on the XMPP server and MUC component.

As for MySQL JDBC driver - Tigase XMPP Server requires it in the version at least 5.1.40.

Added by 连生 张 about 1 month ago

Thank you very much for your answer. I have solved this problem because I have two mysqljdbc drivers in my project, so there is a discrepancy. Now there is a new problem.

Class name: org.groovy.debug.hotswap.ResetAgent$TimestampFieldRemover
java.lang.LinkageError: loader (instance of  sun/misc/Launcher$AppClassLoader): attempted  duplicate class definition for name: "org/groovy/debug/hotswap/ResetAgent$TimestampFieldRemover"
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at tigase.util.ClassUtil.getClassesFromNames(ClassUtil.java:176)
    at tigase.util.ClassUtil.getClassesFromClassPath(ClassUtil.java:133)
    at tigase.util.reflection.ClassUtilBean.initialize(ClassUtilBean.java:90)
    at tigase.server.Bootstrap.start(Bootstrap.java:288)
    at tigase.server.XMPPServer.start(XMPPServer.java:184)
    at tigase.server.XMPPServer.main(XMPPServer.java:138)

Added by Wojciech Kapcia TigaseTeam about 1 month ago

It looks like you are still having issue with dependencies. Please make sure you are using same set of dependencies that we provide in our distribution packages.

Added by 连生 张 about 1 month ago

This is the dependency of which distribution, please. I need to add the dependency of which package in the pom file

Added by Wojciech Kapcia TigaseTeam about 1 month ago

连生 张 wrote:

This is the dependency of which distribution, please. I need to add the dependency of which package in the pom file

If you are using Tigase MUC 3.0.0 (-SNAPSHOT) then you should get Tigase XMPP Server version 8.0.0 from https://projects.tigase.org/projects/tigase-server/files

Added by 连生 张 about 1 month ago

1.Thank you for your reply, but I have a problem, I can't enter the chat room when I modify the user's nickname, I can enter the chat room when I modify the user's nickname and restart the server?Please tell me why. Thank you.

2There is also a problem is that I can not change their nickname in the chat room, I would like to ask how to change their nickname in the chat room thank you?

Added by Wojciech Kapcia TigaseTeam 26 days ago

Could you please post screenshot with English names? It would make answering the question easier.

From provided screenshots it's not clear which nickname you are changing - is it part of user vCard? Or nickname that the user used to enter the room?

Added by 连生 张 26 days ago

We'd very much appreciate your help

1.
When I try to change the nickname of the user entering the room, he will be prompted with muc1, muc2 and muc3, etc. I just want to change the nickname of the user entering the room

2.
When I send a message in the chat room, how does it get all the customers in the chat room, and how does it send the message of my room to every user?

3.Where did the people in the room go and how do I find them

muc1.png (14.5 KB) muc1.png
muc2.png (20.6 KB) muc2.png
muc3.png (21 KB) muc3.png

Added by Wojciech Kapcia TigaseTeam 26 days ago

As answered in https://tigase.tech/boards/8/topics/4879-changing-nikname-in-muc - this is not supported in current version.

Added by 连生 张 18 days ago

Hello, I did not find the HTTP API of muc, can I send messages to the occupant through the custom HTTP interface in the muc component?What can I do if I can?

Added by Wojciech Kapcia TigaseTeam 18 days ago

Currently MUC doesn't have any dedicated HTTP-API. It's not possible to send general messages right now.

However - it would be relatively easy to implement. You would have to create new ad-hoc command (you can write a script that would be executed in the context of MUCComponent - it would take room name and message as parameters and upon execution it would send the text to provided room.

    (1-25/25)