WebSockets in Lucee V5.0.1.45 (with wsRailoEndpoint)

Hi,

I have a problem with websocket installation.

I placed the gateway (WebsocketWatcher.cfc) in the server root and the*
WebsocketWatcher.cfc* and WebsocketWatcherListener.cfc as gateway
extensions. The creation of the new gateway instances was successful and
they are marked as “running” in the server. In the logs stays…

gateway.log (one of error lines with same error)
“ERROR”,“Thread-14”,“08/16/2016”,“18:48:17”,“Gateway:restinza_viewuser”,“javax.websocket.Session
not found by wsRailoEndpoint [84]”

WebsocketListener.log (is ok I think)
“INFO”,“localhost-startStop-1”,“08/16/2016”,“18:48:17”,"",“Initilizing
WebSocket interceptor for channel [10125]”

application.log
“ERROR”,“Thread-14”,“08/16/2016”,“18:48:17”,"",";javax.websocket.Session
not found by wsRailoEndpoint [84];lucee.runtime.exp.NativeException:
javax.websocket.Session not found by wsRailoEndpoint [84]
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1558)
at
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetPublicMethods(Class.java:2902)
at java.lang.Class.getMethods(Class.java:1615)
at
lucee.runtime.reflection.storage.SoftMethodStorage.store(SoftMethodStorage.java:68)
at
lucee.runtime.reflection.storage.SoftMethodStorage.getMethods(SoftMethodStorage.java:50)
at
lucee.runtime.reflection.Reflector.getMethodInstanceEL(Reflector.java:483)
at
lucee.runtime.reflection.Reflector.getMethodInstance(Reflector.java:672)
at lucee.runtime.java.JavaObject.call(JavaObject.java:234)
at lucee.runtime.java.JavaObject.call(JavaObject.java:259)
at
lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:752)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1579)
at
lucee.extension.gateway.websocketwatcher_cfc$cf.udfCall(E:\www_root\WEB-INF\lucee\components\lucee\extension\gateway\WebsocketWatcher.cfc:42)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:105)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:337)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:210)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:698)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:580)
at
lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1920)
at lucee.runtime.ComponentPageImpl.callWDDX(ComponentPageImpl.java:671)
at lucee.runtime.ComponentPageImpl.call(ComponentPageImpl.java:204)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:900)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:815)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:810)
at
lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:226)
at
lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:43)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2259)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2251)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2219)
at
lucee.runtime.gateway.GatewayEngineImpl.call(GatewayEngineImpl.java:373)
at
lucee.runtime.gateway.GatewayEngineImpl.callOneWay(GatewayEngineImpl.java:334)
at lucee.runtime.gateway.CFCGateway.callOneWay(CFCGateway.java:168)
at lucee.runtime.gateway.CFCGateway.doStart(CFCGateway.java:98)
at lucee.runtime.gateway.GatewayThread.run(GatewayThread.java:42)
Caused by: java.lang.ClassNotFoundException: javax.websocket.Session not
found by wsRailoEndpoint [84]
… 38 more
"

…and after a send via SendGatewayMessage I got the Thread error…

thread.log
“ERROR”,“cfthread-4”,“08/16/2016”,“18:08:47”,"","cfthread-4;javax.websocket.Session
not found by wsRailoEndpoint [84];lucee.runtime.exp.NativeException:
javax.websocket.Session not found by wsRailoEndpoint [84]
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1558)
at
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetPublicMethods(Class.java:2902)
at java.lang.Class.getMethods(Class.java:1615)
at
lucee.runtime.reflection.storage.SoftMethodStorage.store(SoftMethodStorage.java:68)
at
lucee.runtime.reflection.storage.SoftMethodStorage.getMethods(SoftMethodStorage.java:50)
at
lucee.runtime.reflection.Reflector.getMethodInstanceEL(Reflector.java:483)
at
lucee.runtime.reflection.Reflector.getMethodInstance(Reflector.java:672)
at lucee.runtime.java.JavaObject.call(JavaObject.java:234)
at lucee.runtime.java.JavaObject.call(JavaObject.java:259)
at
lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:752)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1579)
at
lucee.extension.gateway.websocketwatcher_cfc$cf.udfCall(E:\www_root\WEB-INF\lucee\components\lucee\extension\gateway\WebsocketWatcher.cfc:104)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:105)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:337)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:210)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:698)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:580)
at
lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1920)
at lucee.runtime.ComponentPageImpl.callWDDX(ComponentPageImpl.java:671)
at lucee.runtime.ComponentPageImpl.call(ComponentPageImpl.java:204)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:900)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:815)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:810)
at
lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:226)
at
lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:43)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2259)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2251)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2219)
at
lucee.runtime.gateway.GatewayEngineImpl.call(GatewayEngineImpl.java:373)
at lucee.runtime.gateway.CFCGateway.call(CFCGateway.java:172)
at lucee.runtime.gateway.CFCGateway.sendMessage(CFCGateway.java:157)
at
lucee.runtime.gateway.GatewayEngineImpl.sendMessage(GatewayEngineImpl.java:160)
at
lucee.runtime.functions.gateway.SendGatewayMessage.call(SendGatewayMessage.java:38)
at
restwert.program.actu_user_cfm$cf.threadCall(E:\www_root\xxxxxxxx\actu_user.cfm:137)
at
lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:202)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:149)
Caused by: java.lang.ClassNotFoundException: javax.websocket.Session not
found by wsRailoEndpoint [84]
… 41 more
"

Has anybody an idea whats wrong in here!?

Thanks in advance and best regards
Heinz

Sorry, but I fixed the problem…

In wsRailoEndpoint.jar is* javax.websocket-api-1.0.jar* included. Don’t
know why, but the used classes are not reachable.

I removed * javax.websocket-api-1.0.jar* from wsRailoEndpoint.jar and
placed wsRailoEndpoint.jar in
{lucee}/Tomcat/lib
and not
in “any {railo-web}/WEB-INF/lib directory, or any other location in the
Java Classpath”
as described by Nick.

The by* wsRailoEndpoint.jar* used class* javax.websocket.Session* is
already defined in websocket-api.jar (as part of Tomcat).

Runs fine!
Thanks Nick!Am Dienstag, 16. August 2016 19:38:12 UTC+2 schrieb Heinz Baltes:

Hi,

I have a problem with websocket installation.

I placed the gateway (WebsocketWatcher.cfc) in the server root and the*
WebsocketWatcher.cfc* and WebsocketWatcherListener.cfc as gateway
extensions. The creation of the new gateway instances was successful and
they are marked as “running” in the server. In the logs stays…

gateway.log (one of error lines with same error)
“ERROR”,“Thread-14”,“08/16/2016”,“18:48:17”,“Gateway:restinza_viewuser”,“javax.websocket.Session
not found by wsRailoEndpoint [84]”

WebsocketListener.log (is ok I think)
“INFO”,“localhost-startStop-1”,“08/16/2016”,“18:48:17”,"",“Initilizing
WebSocket interceptor for channel [10125]”

application.log
“ERROR”,“Thread-14”,“08/16/2016”,“18:48:17”,"",";javax.websocket.Session
not found by wsRailoEndpoint [84];lucee.runtime.exp.NativeException:
javax.websocket.Session not found by wsRailoEndpoint [84]
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1558)
at
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetPublicMethods(Class.java:2902)
at java.lang.Class.getMethods(Class.java:1615)
at
lucee.runtime.reflection.storage.SoftMethodStorage.store(SoftMethodStorage.java:68)
at
lucee.runtime.reflection.storage.SoftMethodStorage.getMethods(SoftMethodStorage.java:50)
at
lucee.runtime.reflection.Reflector.getMethodInstanceEL(Reflector.java:483)
at
lucee.runtime.reflection.Reflector.getMethodInstance(Reflector.java:672)
at lucee.runtime.java.JavaObject.call(JavaObject.java:234)
at lucee.runtime.java.JavaObject.call(JavaObject.java:259)
at
lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:752)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1579)
at
lucee.extension.gateway.websocketwatcher_cfc$cf.udfCall(E:\www_root\WEB-INF\lucee\components\lucee\extension\gateway\WebsocketWatcher.cfc:42)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:105)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:337)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:210)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:698)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:580)
at
lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1920)
at lucee.runtime.ComponentPageImpl.callWDDX(ComponentPageImpl.java:671)
at lucee.runtime.ComponentPageImpl.call(ComponentPageImpl.java:204)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:900)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:815)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:810)
at
lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:226)
at
lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:43)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2259)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2251)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2219)
at
lucee.runtime.gateway.GatewayEngineImpl.call(GatewayEngineImpl.java:373)
at
lucee.runtime.gateway.GatewayEngineImpl.callOneWay(GatewayEngineImpl.java:334)
at lucee.runtime.gateway.CFCGateway.callOneWay(CFCGateway.java:168)
at lucee.runtime.gateway.CFCGateway.doStart(CFCGateway.java:98)
at lucee.runtime.gateway.GatewayThread.run(GatewayThread.java:42)
Caused by: java.lang.ClassNotFoundException: javax.websocket.Session not
found by wsRailoEndpoint [84]
… 38 more
"

…and after a send via SendGatewayMessage I got the Thread error…

thread.log
“ERROR”,“cfthread-4”,“08/16/2016”,“18:08:47”,"","cfthread-4;javax.websocket.Session
not found by wsRailoEndpoint [84];lucee.runtime.exp.NativeException:
javax.websocket.Session not found by wsRailoEndpoint [84]
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1558)
at
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetPublicMethods(Class.java:2902)
at java.lang.Class.getMethods(Class.java:1615)
at
lucee.runtime.reflection.storage.SoftMethodStorage.store(SoftMethodStorage.java:68)
at
lucee.runtime.reflection.storage.SoftMethodStorage.getMethods(SoftMethodStorage.java:50)
at
lucee.runtime.reflection.Reflector.getMethodInstanceEL(Reflector.java:483)
at
lucee.runtime.reflection.Reflector.getMethodInstance(Reflector.java:672)
at lucee.runtime.java.JavaObject.call(JavaObject.java:234)
at lucee.runtime.java.JavaObject.call(JavaObject.java:259)
at
lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:752)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1579)
at
lucee.extension.gateway.websocketwatcher_cfc$cf.udfCall(E:\www_root\WEB-INF\lucee\components\lucee\extension\gateway\WebsocketWatcher.cfc:104)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:105)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:337)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:210)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:698)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:580)
at
lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1920)
at lucee.runtime.ComponentPageImpl.callWDDX(ComponentPageImpl.java:671)
at lucee.runtime.ComponentPageImpl.call(ComponentPageImpl.java:204)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:900)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:815)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:810)
at
lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:226)
at
lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:43)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2259)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2251)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2219)
at
lucee.runtime.gateway.GatewayEngineImpl.call(GatewayEngineImpl.java:373)
at lucee.runtime.gateway.CFCGateway.call(CFCGateway.java:172)
at lucee.runtime.gateway.CFCGateway.sendMessage(CFCGateway.java:157)
at
lucee.runtime.gateway.GatewayEngineImpl.sendMessage(GatewayEngineImpl.java:160)
at
lucee.runtime.functions.gateway.SendGatewayMessage.call(SendGatewayMessage.java:38)
at
restwert.program.actu_user_cfm$cf.threadCall(E:\www_root\xxxxxxxx\actu_user.cfm:137)
at
lucee.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:202)
at lucee.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:149)
Caused by: java.lang.ClassNotFoundException: javax.websocket.Session not
found by wsRailoEndpoint [84]
… 41 more
"

Has anybody an idea whats wrong in here!?

Thanks in advance and best regards
Heinz