Error 404 w/ blank message

Hey All,

I’‘m getting a 404 error message whenever I send a message packet, but no description. XMPPError.toXml() yields “”. What am I missing? What’'s not being found? Does the Spark manager plug-in have anything to do with this?

Hola Carlos,

Are you using Spark or Smack? If you are using Spark then press F12 to open the Smack debugger. If you are using Smack then enable the debugger programmatically.

Once you have the debugger opened, I will need you to post the sent and received RAW XML packets. With that information I will be able to be of more help.

Regards,

– Gato

Thanks for the reply, I’‘m going nuts with this. I’'m using the Smack API, but I have the Spark manager installed on the jive server. Here is the output you requested:

sent----



recieved----



Carlos,

Thanks for the information. I now understand what you are trying to do and what is going on.

So the server name of your server is win2k-mysql[/b] and I guess that it’‘s IP address is 192.168.131.129. And the user logging in is carlos@win2k-mysql. One weird thing is that the resource you are using for your connection is the IP address of the server. That is not necessarily a problem but it my be a misunderstanding of what are resources good for. Resources are usually used to identify the user’'s connection. So if a user is logged from many places at the same time then through the resource you can distinguish each connection. Example of resources are: Work, Home, etc.

After the user logged in, the roster is requested. I see that the user carlos tried to add sonia@192.168.131.129 to his roster. Since 192.168.131.129 is not the name of the server (remember that the server name is win2k-mysql) then the server will assume that sonia belongs to a remote or foreign server. Therefore, sonia will never get the presence subscription request and that would explain why sonia does not see you online and you don’'t see sonia online.

And finally…the reason why you are getting a 404 error is that you are sending a message to a user whose JID is sonia. Remember that users JIDs (i.e. addresses) are of the form user@server so sonia alone will not match to the user sonia at win2k-mysql.

In summary, when adding sonia to your roster use the following JID or address: sonia@win2k-mysql. And when sending a message to sonia send it to sonia@win2k-mysql.

Regards,

– Gato

So what your saying is the domain a user is a member of is the server’'s name? Is that changeable, so as to be inline with email domains are hosted on the same IP address?

Thanks for the explanation of resources - I had no idea what they were for! Also, I will try sending messages/adding users to rosters using the servers name, thanks!

Carlos,

Users accounts “live” in servers. And all user accounts created in a given server will share the same domain which will be the server name. You can change the server name but you might need to update the data stored in the database. If you are using Jive Messenger as your server then you can use the import/export plugin to update users and their rosters to the new domain. You can change the server name to match the domain you are using for your email though you will require to configure your DNS and firewalls appropriately.

Regards,

– Gato

Thank you very much for your replays Gato, everything is working great now! Here’'s another quick question, how can I use the Smack API to broadcast messages to all users?

I figured out the broadcast - install the broadcast plugin, and send a message to “all@broadcast.[servername]”. Thanks for everyone’'s help!!