B4J Question [ABMaterial] JavaObject error message

mcGeorge

Member
Licensed User
Longtime User
Hi @all,
I downloaded the version 4.03 and will run for e.g. the Demo application. It will be crashed always in the ABMApplication:225:

2018-01-19 20:52:14.160:INFOejs.ServerConnector:main: Stopped ServerConnector@517cd4b{HTTP/1.1,[http/1.1]}{0.0.0.0:4321}
2018-01-19 20:52:14.162:INFOejsh.ContextHandler:main: Stopped o.e.j.s.ServletContextHandler@954b04f{/,file:///C:/ABM_4.03/4.03/Demo/Objects/www/,UNAVAILABLE}
Error occurred on line: 225 (ABMApplication)
java.lang.RuntimeException: Method: getSessionCookieConfig not found in: org.eclipse.jetty.server.session.SessionHandler


B4X:
Dim joServer As JavaObject = srvr
joServer.GetFieldJO("server").RunMethod("stop", Null)
joServer.GetFieldJO("context").RunMethodJO("getSessionHandler", Null).RunMethodJO("getSessionCookieConfig", Null).RunMethod("setMaxAge", Array(31536000)) ' 1 year
   
' NEW FEATURE! Each App has its own Session Cookie
joServer.GetFieldJO("context").RunMethodJO("getSessionHandler", Null).RunMethodJO("getSessionCookieConfig", Null).RunMethod("setName", Array(ABMShared.AppName.ToUpperCase))
joServer.GetFieldJO("server").RunMethod("start", Null)
   
Dim secs As Long = ABMShared.CacheScavengePeriodSeconds ' must be defined as a long, else you get a 'java.lang.RuntimeException: Method: setIntervalSec not matched.' error
joServer.GetFieldJO("context").RunMethodJO("getSessionHandler", Null).RunMethodJO("getSessionIdManager", Null).RunMethodJO("getSessionHouseKeeper", Null).RunMethod("setIntervalSec", Array As Object(secs))

When I deactivate the row 223 to 232 (the code above) everything is running fine, but I think there is a reason for this code. What could be the mistake?

Thanks in advance
George
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…