powered by Jive Software

Problem using pubsub with smack against openfire

I’m using the latest openfile release and the latest smack code from svn.

When I use the pubsub support, I’m getting a ClassCastException when expecting a response to be DiscoverInfo, when it is nothing. My debugging shows that the problem is probably from the openfire server.


The first packet is what the smack/pubsub stuff sent to get information about a pubsub node. Looks right to me. The second packet is the response. You’ll notice that it does not contain an inner element – which should be a element, but is missing. Hence when trying to decode the response as the expected DiscoverInfo IQ, it fails with an exception.

Since we are looking at raw packets to and from the server, I don’t see how this can be a problem with the smack pubsub stuff. It just looks like a bug in OpenFire. Anyone know?

Well, I’ve fixed the problem, but I don’t know why.

It turns out that I didn’t have the smack-config.xml file placed correctly and once I put it into place, everything started to work properly.

What is weird is that I can’t see how the server can tell the difference because now it is responding correctly to the disco#info request.