Issues
Websocket Extension not loading with Lucee 6.2
Description
Environment
On Lucee base Docker image lucee/lucee:6.2.0.321-light
Using Websocket Extension (07082C66-510A-4F0B-B5E63814E2FDF7BE) from the lucee download registry.
Details
Assignee
Michael OffnerMichael OffnerReporter
Nick KwiatkowskiNick KwiatkowskiPriority
NewLabels
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
Affects versions
Details
Details
Assignee
Reporter
Priority
Labels
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
Affects versions
Activity
JP27 March 2025 at 04:31
I upgraded to Lucee 6.2.1.83-SNAPSHOT and Websockets 3.0.0.15-SNAPSHOT and when calling websocketInfo()
I get the exception: javax/websocket/DeploymentException
The first exception in application.log is:
"ERROR","main","03/26/2025","22:29:32","configuration","javax/websocket/DeploymentException;javax/websocket/DeploymentException;javax.websocket.DeploymentException not found by org.lucee.websocket.extension [52];java.lang.NoClassDefFoundError: javax/websocket/DeploymentException
at lucee.invoc.wrap.v4.org.lucee.extension.websocket.WebSocketEndpointFactory.____init_____1qhflwddpi62f.apply(Unknown Source)
at lucee.runtime.reflection.pairs.ConstructorInstance.invoke(ConstructorInstance.java:64)
at lucee.transformer.dynamic.meta.dynamic.ConstructorDynamic.newInstance(ConstructorDynamic.java:74)
at lucee.runtime.config.ConfigWebFactory._loadStartupHook(ConfigWebFactory.java:4490)
at lucee.runtime.config.ConfigWebFactory.load(ConfigWebFactory.java:697)
at lucee.runtime.config.ConfigServerFactory.load(ConfigServerFactory.java:260)
at lucee.runtime.config.ConfigServerFactory.newInstance(ConfigServerFactory.java:161)
at lucee.runtime.engine.CFMLEngineImpl.getConfigServerImpl(CFMLEngineImpl.java:799)
at lucee.runtime.engine.CFMLEngineImpl.<init>(CFMLEngineImpl.java:433)
at lucee.runtime.engine.CFMLEngineImpl.getInstance(CFMLEngineImpl.java:719)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at lucee.loader.engine.CFMLEngineFactory.getEngine(CFMLEngineFactory.java:1720)
at lucee.loader.engine.CFMLEngineFactory.initEngine(CFMLEngineFactory.java:665)
at lucee.loader.engine.CFMLEngineFactory.initEngineIfNecessary(CFMLEngineFactory.java:285)
at lucee.loader.engine.CFMLEngineFactory.getInstance(CFMLEngineFactory.java:184)
at lucee.loader.engine.CFMLEngineFactory.getInstance(CFMLEngineFactory.java:218)
at lucee.loader.servlet.jakarta.CFMLServlet.init(CFMLServlet.java:39)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:837)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:794)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:698)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4224)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4511)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:599)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:571)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:654)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1130)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1933)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1041)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:425)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1629)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:109)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:389)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:336)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:776)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:772)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1203)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1193)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:749)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:203)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:415)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:870)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
at org.apache.catalina.startup.Catalina.start(Catalina.java:761)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
Caused by: java.lang.ClassNotFoundException: javax.websocket.DeploymentException not found by org.lucee.websocket.extension [52]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1591)
at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1976)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 60 more
Zac Spitzer25 March 2025 at 22:13Edited
Fixed the CI, added some incredibly detailed tests (a one liner for now) and a README.md
https://github.com/lucee/extension-websocket/actions/runs/14071102872
Zac Spitzer25 March 2025 at 13:34
Coz we support upgrading in place, for people on Tomcat 9, the future is Jakarta
Nick Kwiatkowski25 March 2025 at 12:58
@Michael Offner – any reason why we still need to support javax, considering Lucee 6.2.1+ will only be jakarta?
Michael Offner25 March 2025 at 10:17
this is the only extension we have “supporting” javax and jakarta, pain comes with jakarta, sorry for that.
When installing Websocket extension (07082C66-510A-4F0B-B5E63814E2FDF7BE) via Lucee Admin, ENV variable or by uploading the .lex file, websocket listener does not register with the tomcat container.
Get the following error :
ERROR [server.websocket] endpoint-factory->Cannot invoke "jakarta.websocket.server.ServerContainer.addEndpoint(java.lang.Class)" because "oServerContainer" is null java.lang.NullPointerException: Cannot invoke "jakarta.websocket.server.ServerContainer.addEndpoint(java.lang.Class)" because "oServerContainer" is null at org.lucee.extension.websocket.WebSocketEndpointFactory.register(WebSocketEndpointFactory.java:151) ~[org.lucee.websocket.extension-1.0.0.11-RC.jar:?] at org.lucee.extension.websocket.WebSocketEndpointFactory.register(WebSocketEndpointFactory.java:86) [org.lucee.websocket.extension-1.0.0.11-RC.jar:?] at org.lucee.extension.websocket.WebSocketEndpointFactory$Registrar.run(WebSocketEndpointFactory.java:264) [org.lucee.websocket.extension-1.0.0.11-RC.jar:?]
Result: websocket connections to the server fail and do not trigger .CFCs in the websocket directory.