Hello,
I have an error that breaks the main loop :
My webapp consists of an main loop witch timers and a serial connection on a raspberry.
Every 10 seconds there is communication with an ewternal device via serial connection.
Everything works when my weppage loads when there is no communication.
But when I press F5 the same time I communicatie with the external device via serial comm. the message loop crashes and no timer events fires anymore.
Anybody that can decypher the errormessage above?
This would be very helpfull !
Greets
John
I have an error that breaks the main loop :
Connected
kraan get id : 0
Parameter size : 0
ready!
ConnectPage
18/10/2016 09:33:26 Send : 129
receive data from serial = �
lengte buffer : 2
receive in hex : 8011
sendcommand : 1
Disconnected
4f3030303235410d0d
string die verzonden moet worden : O00025A
receive data from serial = 00;01;0.
lengte buffer : 9
receive in hex : 0630303B30313B302E
theme gezet
Connected
kraan get id : 0
receive data from serial = 0;0.0;0.0;0.0;0;0;0;0;0EECB
lengte buffer : 29
receive in hex : 303B302E303B302E303B302E303B303B303B303B303B3003454543420D
CRC OK
18/10/2016 09:33:26 Send : 129
receive data from serial = �
lengte buffer : 2
receive in hex : 8011
sendcommand : 4
5432463030433137450d0d
string die verzonden moet worden : T2F00C17E
receive data from serial = i grijpsucce
lengte buffer : 13
receive in hex : 0669206772696A707375636365
receive data from serial = s |%100B9F0
lengte buffer : 17
receive in hex : 73202020207C250331303003423946300D
receive grijpsuccess : i grijpsucces |%100B9F0
ISBUILD : true
main._appstart (java line: 440)
java.lang.RuntimeException: java.lang.RuntimeException: org.eclipse.jetty.websocket.api.WebSocketException: RemoteEndpoint unavailable, current state [CLOSED], expecting [OPEN or CONNECTED]
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:114)
at anywheresoftware.b4a.BA$3.run(BA.java:178)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(SimpleMessageLoop.java:30)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:26)
at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:131)
at be.robotronic.kraanserver.main._appstart(main.java:440)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at be.robotronic.kraanserver.main.main(
main.java:29)
Caused by: java.lang.RuntimeException: org.eclipse.jetty.websocket.api.WebSocketException: RemoteEndpoint unavailable, current state [CLOSED], expecting [OPEN or CONNECTED]
at anywheresoftware.b4j.object.WebSocket.get(WebSocket.java:120)
at anywheresoftware.b4j.object.WebSocket.access$1(WebSocket.java:110)
at anywheresoftware.b4j.object.WebSocket$JQueryElement.RunMethodWithResult(WebSocket.java:207)
at anywheresoftware.b4j.object.WebSocket$JQueryElement.GetVal(WebSocket.java:228)
at com.ab.abmaterial.ABMaterial.GetComponent(Unknown Source)
at com.ab.abmaterial.ABMCell.Component(Unknown Source)
at com.ab.abmaterial.ABMContainer.Component(Unknown Source)
at be.robotronic.kraanserver.main._decodeerpercent(main.java:1948)
at be.robotronic.kraanserver.main._astream_newdata(main.java:717)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
... 12 more
Caused by: org.eclipse.jetty.websocket.api.WebSocketException: RemoteEndpoint unavailable, current state [CLOSED], expecting [OPEN or CONNECTED]
at org.eclipse.jetty.websocket.common.WebSocketSession.getRemote(WebSocketSession.java:299)
at anywheresoftware.b4j.object.WebSocket.sendText(WebSocket.java:107)
at anywheresoftware.b4j.object.WebSocket.get(WebSocket.java:117)
... 24 more
main.main (java line: 29)
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: org.eclipse.jetty.websocket.api.WebSocketException: RemoteEndpoint unavailable, current state [CLOSED], expecting [OPEN or CONNECTED]
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:114)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at be.robotronic.kraanserver.main.main(main.java:29)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.eclipse.jetty.websocket.api.WebSocketException: RemoteEndpoint unavailable, current state [CLOSED], expecting [OPEN or CONNECTED]
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:114)
at anywheresoftware.b4a.BA$3.run(BA.java:178)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(SimpleMessageLoop.java:30)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:26)
at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:131)
at be.robotronic.kraanserver.main._appstart(main.java:440)
at sun.reflect.NativeMethodAccessorImpl.invo
ke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
... 2 more
Caused by: java.lang.RuntimeException: org.eclipse.jetty.websocket.api.WebSocketException: RemoteEndpoint unavailable, current state [CLOSED], expecting [OPEN or CONNECTED]
at anywheresoftware.b4j.object.WebSocket.get(WebSocket.java:120)
at anywheresoftware.b4j.object.WebSocket.access$1(WebSocket.java:110)
at anywheresoftware.b4j.object.WebSocket$JQueryElement.RunMethodWithResult(WebSocket.java:207)
at anywheresoftware.b4j.object.WebSocket$JQueryElement.GetVal(WebSocket.java:228)
at com.ab.abmaterial.ABMaterial.GetComponent(Unknown Source)
at com.ab.abmaterial.ABMCell.Component(Unknown Source)
at com.ab.abmaterial.ABMContainer.Component(Unknown Source)
at be.robotronic.kraanserver.main._decodeerperc
ent(main.java:1948)
at be.robotronic.kraanserver.main._astream_newdata(main.java:717)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
... 12 more
Caused by: org.eclipse.jetty.websocket.api.WebSocketException: RemoteEndpoint unavailable, current state [CLOSED], expecting [OPEN or CONNECTED]
at org.eclipse.jetty.websocket.common.WebSocketSession.getRemote(WebSocketSession.java:299)
at anywheresoftware.b4j.object.WebSocket.sendText(WebSocket.java:107)
at anywheresoftware.b4j.object.WebSocket.get(WebSocket.java:117)
... 24 more
Parameter size : 0
ready!
ConnectPage
My webapp consists of an main loop witch timers and a serial connection on a raspberry.
Every 10 seconds there is communication with an ewternal device via serial connection.
Everything works when my weppage loads when there is no communication.
But when I press F5 the same time I communicatie with the external device via serial comm. the message loop crashes and no timer events fires anymore.
Anybody that can decypher the errormessage above?
This would be very helpfull !
Greets
John