We are attempting to setup the lucee-websocket extension, but can’t get past the following error:
“DEBUG”,“http-nio-8888-exec-4”,“09/16/2019”,“19:10:32”,“websocket”,“Failed to register endpoint /ws: Deployment of WebSocket Endpoints to the web application with path [] in host [Catalina/127.0.0.1] is not permitted due to the failure of a previous deployment”
Any help would be appreciated.
Basic setup:
/** Index.cfm */
WebsocketServer(“/ws”, new EchoListener());
echo(“registered ws”)
/** EchoListener.cfc */
component {
function onMessage(websocket, message, sessionScope, applicationScope){
return “Echo from Lucee #Server.lucee.version# [#arguments.message#]”;
}
}
Version Lucee 5.3.4.56-SNAPSHOT
Servlet Container Apache Tomcat/9.0.20
Java 1.8.0_212 (Oracle Corporation) 64bit
Host Name ws-server
OS Linux (4.15.0-58-generic) 64bit
Architecture 64bit
we installed the version 2.0.3 extension at the admin:server level and the Info Bundle(jar) shows the extension is loaded:
LuceeApps (net.twentyonesolutions.luceeapps) 2.0.1 19.7kb Lucee WebSockets Extension active
Lucee Core (lucee.core) 5.3.4.56-SNAPSHOT Sep 12, 2019 9.3mb Lucee active
LuceeWebsocket (net.twentyonesolutions.luceewebsocket) 2.0.1 36kb Lucee WebSockets Extension active
After this error we also added the following to web.xml:
<filter>
<filter-name>HttpSessionInitializerFilter</filter-name>
<filter-class>net.twentyonesolutions.servlet.filter.HttpSessionInitializerFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>HttpSessionInitializerFilter</filter-name>
<!-- modify url-pattern to match your websocket endpoints !-->
<url-pattern>/ws/*</url-pattern>
</filter-mapping>