Packet.getStanzaFrom() NoSuchMethodError

Matt Q Public
Added about 1 year ago

I'm writing a Component, and have been getting errors with JIDs. Here I'm trying to find out who a packet is from, so I can do a thing.


public void processPacket(Packet packet) {        


        // Do my thing.



When I run this Component, and send it a packet, I get the following error:

2017-11-03 22:52:16.315 [in_0-tigase-remote-component] ThreadExceptionHandler.uncaughtException() SEVERE: Uncaught thread: "in_0-tigase-remote-component" exception

java.lang.NoSuchMethodError: tigase.server.Packet.getStanzaFrom()Ltigase/xmpp/jid/JID;

at TigaseRemoteComponent.processPacket(

at tigase.server.AbstractMessageReceiver$

Why can't it find the Packet.getStanzaFrom() method?

Replies (2)

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

Recently we moved classes JID and BareJID from package tigase.xmpp to package tigase.xmpp.jid@. Looking at your error it looks like you are developing your component using newest snapshot build of Tigase XMPP Server, which has @JID and BareJID already moved but you are starting component on the server where an older version of Tigase XMPP Server is deployed (build from before the move).

Please try to upgrade your installation to newest snapshot build of Tigase XMPP Server and this should solve this error.

Added by Matt Q Public about 1 year ago

Yes, it was a version mismatch. Fixed it. Thank you.