powered by Jive Software

Message Listener returns messages with Null Body

I have installed OpenFire 3.6.4 and have it running on a Windows 7 (64-bit) machine. I created a really simple test client using Smack 3.1.0 and I am not seeing the behaviour that I expected.

I created a small class based off of the Smack documentation (http://www.igniterealtime.org/builds/smack/docs/latest/documentation/overview.ht ml) and I am expecting to see the text of the messages I sent come back in the message body of the MessageListeners that I have setup it… instead I get nulls.

I have attached my source code file, and here is the ouput that i receive:

B Received message: null

B Received message: null

A Received message: TestUser_B - null

A Received message: TestUser_B - null

Any assistance is appreciated.

Thank you,

Justin
SimpleConnectionSample.java.zip (752 Bytes)

While debugging this a little more, I noticed that the “Error” property within the Messages I am receiving within my MessageHandlers are populated with the following information:

error
XMPPError (id=1340)

  • applicationExtensions
    ArrayList (id=1346)
  • code
    404
  • condition
    "remote-server-not-found" (id=1347)
  • message
    null
  • type
    XMPPError$Type (id=1334)
  • name
    "CANCEL" (id=1336)
  • ordinal
    1

I am new to XMPP… can anyone help explain why this is happening?

Thanks,

Justin

Here is some more information on this issue:

The machine that has the OpenFire XMPP Server on it is my development machine and I am running my client test on that same machine. When I execute my test client (written with Smack, included in my first post) I get the following in my Debug Log within OpenFire:

java.lang.Exception: Failed to create connection to remote server
at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.sendPa cket(OutgoingSessionPromise.java:252)
at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.run(Ou tgoingSessionPromise.java:216)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2009.09.03 21:22:49 OutgoingSessionPromise: Error sending packet to remote server (fast discard):

Not much YBYSQ0

Any ideas on why this connection isn’t being made? Again, I am running OpenFire and my test client on the same machine.

Thanks,

Justin

Hi - I am new to XMPP and OpenFire. I am hitting the same exact problem. Does anyone know how to solve this?

If you are dealing with local server then you must put the postfix to the to-user i.e to-user@your-pc-name