How to get JSJaC 1.3 running with OpenFire?

I have a problem getting JSJac 1.3 running with OpenFire on a windows machine. I can get it to work with ejabberd but not with OpenFire. How have you configured JSJaC / OpenFire to get it to run?


This is my setup

  • Windows 2003 server

  • Openfire 3.5.1

  • JSJaC 1.3 (modified)

  • Helico ISAPI Rewrite 3 (full version, not lite)
    RewriteEngine on
    RewriteBase /
    RewriteRule http-bind/

  • I’ve added two properties to the server (found on the forum)
    xmpp.httpbind.client.requests.polling 0
    xmpp.httpbind.client.requests.wait 120

  • Enabled http-bind on Openfire

  • Added the line oArgs.authtype = ‘nonsasl’; just before opening of the connection

  • Changed var JSJACHBC_USE_BOSH_VER = true; to var JSJACHBC_USE_BOSH_VER = false;

So where am I now? Nowhere near being able to connect to the Openfire it feels like.

If I type in a web browser I get this:




Powered by Jetty://

But if I type in the page times out and I don’t even get an error message.

So… some questions starting with the big one.

  1. How do I get the system to work?

  2. Do I get the expected result when I call and ?

  3. Is there anyway to see if the client reach Openfire

  4. What should I set the domain property on the connection to?

Some new updates.

I have changed the “Client to Server” port to 6222 from 5222 because of running an ejabberd server on the same machine.

When looking in Firebug I see that I send this message:

<body hold=‘1’ xmlns=‘’ to=‘’ wait=‘300’ rid=‘655318’ route=‘xmpp:’ secure=‘false’ newkey=‘f63362327f0c3352f60e9d0aa7199aed9feab141’/>

and get this reply:

[Exception…Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) nsIXMLHttpRequest.status–"

nsresult: “0x80040111NS_ERROR_NOT_AVAILABLE)” location: “JS frame ::[] :: anonymous :: line 2545”


I guess this is a cross-domain scripting problem, but why do I get it for Openfire and not ejabberd? Any ideas?

UPDATE (these are the entires in info.log)

2008.05.08 18:26:30 Multi User Chat domain: conference.

2008.05.08 18:26:30 Publish-Subscribe domain: pubsub.

2008.05.08 18:26:48 Started server (unencrypted) socket on port: 5269

2008.05.08 18:26:48 Started plain (unencrypted) socket on port: 6222

2008.05.08 18:26:48 Started SSL (encrypted) socket on port: 6223

2008.05.08 18:27:13 Multi User Chat domain: conference.

2008.05.08 18:27:13 Publish-Subscribe domain: pubsub.

2008.05.08 18:27:13 Openfire 3.5.1

2008.05.08 18:27:15 Admin console listening at:

2008.05.08 18:27:15 Started server (unencrypted) socket on port: 5269

2008.05.08 18:27:15 Started plain (unencrypted) socket on port: 6222

2008.05.08 18:27:15 Started SSL (encrypted) socket on port: 6223

Could it not be working because I set the value for the Openfire server (in the wizard, the option where you specify the “Server”) to the IP of the machine it is running on? Ie, I set it to and not “”? What should the value be set to?


"Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE)

http://nsixmlhttprequest.status/http://nsIXMLHttpRequest.status" nsresult: "0x80040111

(NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: :: anonymous :: line 2545" data:


On line 2545 in JSJaC:

if (this._req[c-main].r.status != 200 || !this._req[c-main].r.responseXML) {

And here is the reson for the error (

This happens when you have a XMLHttpRequest onerror handler in which you tried to read the result’s status (or statusText) when that value is not available, usually meaning it was broken off, or it failed in a specific way.

The W3 specs tell you that you shouldn’t try to read status in the onerror handler because for some problems it may not be set, and that in this case an error must be raised. This error is specific to Gecko (Firefox, Mozilla) because it adheres to those specs closer than most other browsers. The Gecko specs also tell you not to do this (…as I recall, I can’t actually find it right now).

The cause is often that the browser never got a reponse with a HTTP status to parse out, for example via requests that are broken off on the client, a connection that broke because of some connectivity problem, and sometimes a (seriously) malformed server response.

I steped through the code and, indeed, the status is null and it looks like the app times out.

Any idea of where I can go from here?

Ok, it’s been confirmed again; I hate coding and I hate computers in general !!.

It seems that I had an error in my rewrite rule was wrong, I’m not sure how many times I read the answer in other forum posts and didn’t belive it.

You have to have trailing slash at the end of your rewrite rule so:

RewriteRule http-bind-openfire/

should be:

RewriteRule http-bind-openfire/

It still feels strange that It works without the trailing slash with ejabberd and not with Openfire. Oh well.

Thanks everyone that’s helped me with this.

Good morning,

how have you get it work ??

I’ve been seaching for many days and I don’t find how to resolve this configuration…

Where do you put rewrite rules ?

"RewriteEngine on \RewriteBase / \RewriteRule http-bind/ [] [P] "

In a .htaccess file in the website directory?

Thanks in advance for your answer.

I run on Win2003 so I use IIS as a webserver.

I use a proxy, ISAP Rewrite 3 from Helico (it has to be the full version, otherwise there is no proxy support) and I place my rules there. The proxy is a bit pricey, 99USD per server, so if you have any other suggestions of how to get the proxying to work I’d be glad to hear them.

I get it work on Windows XP with IIS 5.1 and Isapi 3.

However, on Windows 2003, I get an 401 error, not-authorized.

Did you get this error ?

How did you resolve it ?