-
I have already solved the problem when I configure init.properties file like
muc (class: tigase.muc.MUCComponent) {
admin (class: tigase.muc.modules.ModeratorModule3) {} disco (class: tigase.muc.modules.DiscoveryModule3) {} groupchat (class: tigase.muc.modules.GroupchatMessageModule3) {} presences (class: tigase.muc.modules.PresenceModuleImpl3) {} historyProviderPool (class: tigase.muc.history.HistoryProviderMDBean) { default (class: tigase.muc.history.HistoryProviderMDBean.HistoryProviderConfigBean) { name = 'mucHistoryProvider' 'repo-class' = 'tigase.mongodb.muc.MongoHistoryProvider' instance (class: tigase.mongodb.muc.MongoHistoryProvider) {} } }
}
-
I've found and fixed root cause of this issue. Additionally I also fixed few issues found during testing Tigase XMPP Server 7.2.0-SNAPSHOT with MongoDB.
This issue was caused by failure of automatic discovery of history provided implementation for MongoDB, which could be replaced with manual configuration (what you mentioned in comment above).
Next snapshot build will contain my fix for this issue.
Type |
Bug
|
Priority |
Normal
|
Assignee | |
RedmineID |
5066
|
Version |
tigase-server-8.0.0
|
Spent time |
0
|
Issue Votes (0)
Watchers (0)
2017-03-14 12:11:24.870 [in_7-muc] GroupchatMessageModule.addMessageToHistory() WARNING: Can't add message to history!
java.lang.NullPointerException
###################################
/*
MongoHistoryProvider.java
Tigase Jabber/XMPP Server - MongoDB support
Copyright (C) 2004-2016 "Tigase, Inc." office@tigase.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. Look for COPYING file in the top folder.
If not, see http://www.gnu.org/licenses/.
*/
package tigase.mongodb.muc;
import com.mongodb.MongoNamespace;
import com.mongodb.client.FindIterable;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoDatabase;
import com.mongodb.client.model.Filters;
import org.bson.Document;
import org.bson.conversions.Bson;
import org.bson.types.Binary;
import tigase.component.PacketWriter;
import tigase.component.exceptions.ComponentException;
import tigase.db.Repository;
import tigase.db.TigaseDBException;
import tigase.kernel.beans.config.ConfigField;
import tigase.mongodb.MongoDataSource;
import tigase.mongodb.RepositoryVersionAware;
import tigase.muc.Affiliation;
import tigase.muc.Room;
import tigase.muc.RoomConfig;
import tigase.muc.history.AbstractHistoryProvider;
import tigase.server.Packet;
import tigase.util.TigaseStringprepException;
import tigase.xml.Element;
import tigase.xmpp.Authorization;
import tigase.xmpp.BareJID;
import tigase.xmpp.JID;
import tigase.xmpp.mam.MAMRepository;
import tigase.xmpp.mam.Query;
import tigase.xmpp.mam.QueryImpl;
import java.nio.charset.Charset;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.*;
import java.util.logging.Level;
import static com.mongodb.client.model.Accumulators.first;
import static com.mongodb.client.model.Aggregates.group;
import static tigase.mongodb.Helper.collectionExists;
/**
@author andrzej
*/
@Repository.Meta( supportedUris = { "mongodb:.*" } )
public class MongoHistoryProvider
}