Websocket plugin install failed

I installed openfire 4.1.5 succ.

i failed to install plugin "Openfire Websocket 1.1.4",

2017.07.05 20:34:41 ERROR [pool-29-thread-1]: org.jivesoftware.openfire.container.PluginManager - An exception occurred while loading plugin ‘websocket’:

java.lang.NoSuchMethodError: org.jivesoftware.openfire.http.HttpBindManager.getContexts()Lorg/eclipse/jetty/ server/handler/ContextHandlerCollection;

at org.jivesoftware.openfire.websocket.WebSocketPlugin.initializePlugin(WebSocketP lugin.java:66)

at org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.java :410)

at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMoni tor.java:276)

at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMoni tor.java:264)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

so i can not connect to openfire by websocket .

I want to know how to fix it.

thks

This PR fixes the issue, but has not been accepted yet. In the meantime, you can use my compiled plugin

websocket plugin has been broken since Openfire 4.1.4. This PR implem… by deleolajide · Pull Request #835 · igniterealti…
websocket.jar (121753 Bytes)

Thanks, Dele Olajide. It can be installed succ.

But,when i connected openfire by websocket,I got a 302 http redirection ,not a normal websocket response.

my code :

var connectionState = [“connecting…”, “established”, “closing…”, “closed”];

var host = “ws://xx.xx.xx.xx:7070/ws/”;

if (window.WebSocket !== ‘undefined’) {

var connection = new WebSocket(host, “xmpp”);

console.log(connectionState[connection.readyState]);

connection.onopen = wsOpen;

}

function wsOpen(event) {

console.log(event);

console.log(connectionState[connection.readyState]);

var steam = “”;

connection.send(steam);

}

I want to know how to fix this, thanks

Just use Strophe Javascript XMPP library. It supports both http-bind and websocket. It will save you a lot of headache.

I tried Strophe ,and i still got an 302 http redirection, it should be a websocket response, not a http response.

Hi Dele,

I was wondering if you know any xmpp libraries for IOS/Android that will work with websocket plugin?