powered by Jive Software

PubSub returns XMPPError: bad-request - modify in upgraded Openfire

I have a PubSub Smack client which works perfectly fine when publishes to a node at Openfire server 4.0.3.

When I upgraded the Openfire server to 4.2.3 with all the configurations remain intact. I received the error message “XMPPError: bad-request - modify” whenever the same client publishes. May I know what could be wrong?

The exception is as follow:

D/SMACK: SENT (0): <iq to='pubsub.imserver' id='HR4P8-480' type='set'><pubsub xmlns='http://jabber.org/protocol/pubsub'><publish node='http://jabber.org/protocol/geoloc'><item xmlns='http://jabber.org/protocol/pubsub' id='241099@imserver/Smack'><geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'> <country>Singapore</country> <lat>1.3362793</lat> <locality>100 Jurong East Street 21</locality> <lon>103.7439193</lon> <accuracy>15</accuracy></geoloc></item></publish></pubsub></iq><r xmlns='urn:xmpp:sm:3'/>

D/SMACK: RECV (0): <iq type="error" id="HR4P8-837" from="pubsub.imserver" to="241099@imserver/Smack"><pubsub xmlns="http://jabber.org/protocol/pubsub"><publish node="http://jabber.org/protocol/geoloc"><item id="241099@imserver/Smack"><geoloc xmlns="http://jabber.org/protocol/geoloc" xml:lang="en"> <country>Singapore</country> <lat>1.3362854</lat> <locality>100 Jurong East Street 21</locality> <lon>103.7439281</lon> <accuracy>14</accuracy></geoloc></item></publish></pubsub><error code="400" type="modify"><bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><item-forbidden xmlns="http://jabber.org/protocol/pubsub#errors"/></error></iq>

You show a non-error IQ response. Are you sure that the exception is thrown as cause of the request? Always include the full stacktrace!

Sorry my bad, I have updated the correct exception.

The issue has been resolved. I think something in the Openfire PubSub might have broken when I copied database files from Openfire 4.0.3 to 4.2.3. I have taken the following steps ensure nothing is broken:

Firstly migrate Openfire 4.0.3 to another server:

  1. Install Openfire 4.0.3 as usual;
  2. Replace /opt/openfire/embedded-db directory

Secondly upgrade Openfire from 4.0.3 to 4.2.3:

  1. Install Openfire 4.2.3,
  2. Point the directory to C:\Program Files (x86)\Openfire which contains Openfire 4.0.3 files