B4J Question [abmaterial]Sometimes shows such error message!

liulifeng77

Active Member
Licensed User
Longtime User
but my webapp runs well!(users always visit it by cellphone)

java.lang.RuntimeException: java.lang.IllegalStateException: Not valid for write: id=node0v2eidagvreg91gl8fvdbckrg16 created=1508847752220 accessed=1508847818735 lastaccessed=1508847818361 maxInactiveMs=1800000 expiry=1508849618751
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:119)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:77)
at anywheresoftware.b4j.object.WebSocketModule$Adapter$1.run(WebSocketModule.java:126)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(SimpleMessageLoop.java:30)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:26)
at anywheresoftware.b4j.object.WebSocketModule$Adapter$ThreadHandler.run(WebSocketModule.java:191)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalStateException: Not valid for write: id=node0v2eidagvreg91gl8fvdbckrg16 created=1508847752220 accessed=1508847818735 lastaccessed=1508847818361 maxInactiveMs=1800000 expiry=1508849618751
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:489)
at anywheresoftware.b4a.keywords.Common.CallSubNew3(Common.java:443)


at b4j.example.kq_info._page_parseevent(kq_info.java:1148)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
... 10 more
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Not valid for write: id=node0v2eidagvreg91gl8fvdbckrg16 created=1508847752220 accessed=1508847818735 lastaccessed=1508847818361 maxInactiveMs=1800000 expiry=1508849618751
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:119)




at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:480)
... 16 more
Caused by: java.lang.IllegalStateException: Not valid for write: id=node0v2eidagvreg91gl8fvdbckrg16 created=1508847752220 accessed=1508847818735 lastaccessed=1508847818361 maxInactiveMs=1800000 expiry=1508849618751
at org.eclipse.jetty.server.session.Session.checkValidForWrite(Session.java:611)
at org.eclipse.jetty.server.session.Session.setAttribute(Session.java:757)
at anywheresoftware.b4j.object.HttpSessionWrapper.SetAttribute(HttpSessionWrapper.java:61)
at com.ab.abmaterial.ABMPage.SaveNavigationBarPosition(Unknown Source)
at com.ab.abmaterial.ABMPage.SaveNavigationBarPosition(Unknown Source)
at b4j.example.kq_info._page_navigationbarclicked(kq_info.java:1071)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
... 17 more
preparing for url refresh
 

mindful

Active Member
Licensed User
I can't say exactly why but it seems that page.SaveNavigationBarPosition is tring to write to seasion it's position but it can't ... maybe because the session exipred or you invalidated the session or you are calling the savenavigation... method where you shouldn't .. please post b4j version, abmaterial version, jserver lobrary version ... some code ... etc.
 
Upvote 0

mindful

Active Member
Licensed User
yes, if session exipred and clicked the navigationbar, It will shows that error message.
You have a problem with the way you set you session to expire (ABM.GetSession does this for you and other methods too) and also with the way you initialize the abmpage class .... in the later method you need to provide a value for the sesssionmaxinactivetime that has to be the same or lower than the actual sessionmaxinactivetime (the one set in ABM.GetSession) because this tells the javascript that runs in the browser to make a request (therefore keep your session alive) once every the value you provided / 2.

So if you call ABM.GetSession with a value of 1800 it would be wise to call the initialiaze (or initalizewiththeme) method of abmpage with the same 1800 value for sessionmaxinactivetime....
 
Upvote 0
Top