I'm trying to implement a web chat but i receive some SASL Authentication error on my jsp pages.
The server i'm using is an open source XMPP server, wildfire(currently openfire).
I imported the smack api into the java bean (session) to connect and login to the XMPP server via my netbeans tomcat server.
When only a client log in at one time, there is no error. But when multiple users try to login in the same time, some of them will receive that error.
If you are using JwChat/JSJaC, then you need to use non-sasl authentication with OpenFire.
Details here http://zeank.in-berlin.de/2007/08/31/jsjac-v10-is-out/
I've imported the smack api into my javabean class, and setting the
scope to session on the client side. So that means the user login/sent message using
the tomcat server.
example: 5 people logon to my server via the
web chat client i made, then on the server side i will see 5 session
using the same IP (the ip of the tomcat server).
Whenever the
client perform an action(sending message etc.), i'll use form action to
call a servlet to send message/presence/logout using the methods in the
javabean.
I don't know if this is the right way, to implement webchats, cause when i started implementing this, the jsjac lib is not yet avaliable.
Any one have any idea what is the problem?
This is a simplified architecture
Client <---> Tomcat server <---> Wildfire server
Well, I use smack for a client, and JSJaC/JwChat for another.
smack should work using SASL, but OpenFire has a bug concerning compression (JM-1115).
Edit: if there's anything in the logs, post excerpts. smack has a debug feature, have you used it? It allows you to see the packets sent/received. Use it as described in the documents
java -Dsmack.debugEnabled=true SomeApp
I enabled the debugger, and try sending a custom iq packet when the client login. And display the data inside the packet on the jsp page (the packet contain "connection successfully created" as the body of the iq).
On the tomcat log, i get the same error again.
But at the debugger, all packet were sent and able to receive the result packet. Even the connection that have the SASL error was also able to receive the result packet from server.
However, the connection that receive the SASL error was not able to show "connection successfully created" text on the browser.