powered by Jive Software

Java.lang.NoSuchMethodError: org.jxmpp.jid.impl.JidCreate.fullFrom(Smack 4.3.0)

i would like to build a small xmpp muc chatbot with smack, but I cant make it work due to unknown (at least for me) errors and missing dependencies.

So my code is quite simple at the moment. It should just connect to the xmpp server, login and join a muc.
It looks like this.

package cloudinc.xeniajabber;

import org.jivesoftware.smack.*;
import org.jivesoftware.smack.tcp.*;
import org.jivesoftware.smackx.muc.MultiUserChat;
import org.jivesoftware.smackx.muc.MultiUserChatManager;
import org.jxmpp.jid.EntityBareJid;
import org.jxmpp.jid.impl.JidCreate;
import org.jxmpp.jid.parts.Resourcepart;

public class XMPPNET {

    AbstractXMPPConnection connection;

    public XMPPNET(String user, String pass, String domain, String host, String room, int port){

            // Create a connection to the jabber.org server on a specific port.
            XMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()
                    .setUsernameAndPassword(user, pass)
                    .setHostnameVerifier((hostname, session) -> true)
            connection = new XMPPTCPConnection(config);
            joinchatroom(room, host);
        }catch(Exception e){


    public void joinchatroom(String room, String host){
            EntityBareJid mucJid = JidCreate.entityBareFrom(room+"@conference"+host);
            Resourcepart nickname = Resourcepart.from("test");
            MultiUserChatManager manager = MultiUserChatManager.getInstanceFor(connection);
            MultiUserChat muc = manager.getMultiUserChat(mucJid);
        }catch(Exception e){

According to the instructions i read, this should do the job, But it just gives me an error:

Exception in thread "main" java.lang.NoSuchMethodError: org.jxmpp.jid.impl.JidCreate.fullFrom(Lorg/jxmpp/jid/EntityBareJid;Lorg/jxmpp/jid/parts/Resourcepart;)Lorg/jxmpp/jid/EntityFullJid;
	at org.jivesoftware.smackx.muc.MucEnterConfiguration.getJoinPresence(MucEnterConfiguration.java:72)
	at org.jivesoftware.smackx.muc.MultiUserChat.enter(MultiUserChat.java:340)
	at org.jivesoftware.smackx.muc.MultiUserChat.join(MultiUserChat.java:740)
	at org.jivesoftware.smackx.muc.MultiUserChat.join(MultiUserChat.java:631)
	at cloudinc.xeniajabber.XMPPNET.joinchatroom(XMPPNET.java:42)
	at cloudinc.xeniajabber.XMPPNET.<init>(XMPPNET.java:29)
	at cloudinc.xeniajabber.XeniaJabber.main(XeniaJabber.java:16)

It would be great if someone could help me to make it work.

I recommend to use Smack with a build system that is able to handle Maven dependencies. Those systems typically allow you to specify the dependencies and will automatically resolve all transitive dependencies. Those are the ones giving you a hard time right now and the reason why you should not use the Smack jar files directly.

Please also read Smack’s README.

1 Like