chinese messages not save in tig_ma_msgs (#26)
Android IT opened 9 years ago

Error infor:

JDBCMessageArchiveRepository.archiveMessage()  WARNING: Problem adding new entry to DB: <message type="chat" id="Nci4P-64" from="0012@192.168.0.138/Spark 2.6.3" xmlns="jabber:client" time="1450081879604" to="0013@192.168.0.138/Smack"><body>灌灌灌灌</body><thread>61I2D0</thread><x xmlns="jabber:x:event"><offline/><composing/></x></message>
java.sql.SQLException: Incorrect string value: '\xE7\x81\x8C\xE7\x81\x8C...' for column 'body' at row 1
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1072)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3563)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3495)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2693)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2102)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2395)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2313)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2298)
	at tigase.archive.db.JDBCMessageArchiveRepository.archiveMessage(JDBCMessageArchiveRepository.java:764)
	at tigase.archive.MessageArchiveComponent.storeMessage(MessageArchiveComponent.java:384)
	at tigase.archive.MessageArchiveComponent.processPacket(MessageArchiveComponent.java:94)
	at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1424)

and I have changed tig_pubsub_items data'type to text, but is still no effect, save is fail。

wojciech.kapcia@tigase.net commented 9 years ago

Please make sure that you've configured database URI to have &useUnicode=true&characterEncoding=UTF-8 at the end. If you don't have it, please remove tig_ma_* tables and allow Tigase to recreate them with correct (above settings).

Android IT commented 9 years ago

@ Wojciech Kapcia Thank you very much for your reply. I have already used it &useUnicode=true&characterEncoding=UTF-8 ,but still no effect .And now, Finally found the database encoding has a problem is coded format is latin1 not utf8,and I have changed to utf8 ,now it's working OK 。。。

Thank you very much for your!!!

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