I'm not sure if this is a bug or other issue.
In regard to the new B4J version (9.8.0), I applied the BANanoServer fix to the BANanoServer.b4xlib file as per https://www.b4x.com/android/forum/threads/banano-server-cannot-compile.141934/.
With that fix, I am now able to fully compile my BANanoServer project in B4J 9.8.0. But ... when I open my web browser to see my running BANanoServer project app, I get the following errors that do not allow me to load my BANanoServer project on to the web browser:
On the client web browser console side:
Uncaught SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse (<anonymous>)
at s.onmessage (bananocore.js:19:2968)
On the server B4J console side:
java.lang.RuntimeException: java.lang.RuntimeException: Object should first be initialized (HttpSession).
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:140)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:98)
at anywheresoftware.b4j.object.WebSocketModule$Adapter$ThreadHandler.run(WebSocketModule.java:204)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: Object should first be initialized (HttpSession).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:49)
at anywheresoftware.b4j.object.HttpSessionWrapper.SetAttribute(HttpSessionWrapper.java:78)
at com.ab.banano.BANano.UpdateFromCacheDebug(Unknown Source)
at com.ab.banano.BANano.B4JUpdateFromCache(Unknown Source)
at b4j.example.bananoserver._updatefromcache(bananoserver.java:1583)
at b4j.example.serverindex._websocket_connected(serverindex.java:878)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
... 7 more
When I run the same BANanoServer project in the previous version of B4J, all works well.
Thank you for your help.
In regard to the new B4J version (9.8.0), I applied the BANanoServer fix to the BANanoServer.b4xlib file as per https://www.b4x.com/android/forum/threads/banano-server-cannot-compile.141934/.
With that fix, I am now able to fully compile my BANanoServer project in B4J 9.8.0. But ... when I open my web browser to see my running BANanoServer project app, I get the following errors that do not allow me to load my BANanoServer project on to the web browser:
On the client web browser console side:
Uncaught SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse (<anonymous>)
at s.onmessage (bananocore.js:19:2968)
On the server B4J console side:
java.lang.RuntimeException: java.lang.RuntimeException: Object should first be initialized (HttpSession).
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:140)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:98)
at anywheresoftware.b4j.object.WebSocketModule$Adapter$ThreadHandler.run(WebSocketModule.java:204)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: Object should first be initialized (HttpSession).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:49)
at anywheresoftware.b4j.object.HttpSessionWrapper.SetAttribute(HttpSessionWrapper.java:78)
at com.ab.banano.BANano.UpdateFromCacheDebug(Unknown Source)
at com.ab.banano.BANano.B4JUpdateFromCache(Unknown Source)
at b4j.example.bananoserver._updatefromcache(bananoserver.java:1583)
at b4j.example.serverindex._websocket_connected(serverindex.java:878)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
... 7 more
When I run the same BANanoServer project in the previous version of B4J, all works well.
Thank you for your help.