B4J Question [BANanoServer] StartServerHTTP2

LJG

Member
Hello,
I am learning from the BANanoServer DemoServer that came with Banano5.10. I am trying to learn how to get the SSL part to work but I am having issues. Please help me learn and understand how to properly configure and use BANanoServer's StartServerHTTP2 to get the SSL/HTTPS to work properly. My focus is on PWA apps and HTTPS is critical for my project (and thank you again for B4J and BANano - what an amazing combination of work).

Here is the break down of my StartServerHTTP2 issue and question:

1) I created a keystore.jks self-cert file using the jdk-11.0.1 keytool.

2) I put the "keystore.jks" file in the Objects folder of the demo.

3) I added an SSLPort number to the server.ini.

4) I added the keystore.jks information to the code:
If Server.PortSSL <> 0 Then
Server.StartServerHTTP2("keystore.jks", "password123456", "password123456")
(I also tried putting a path using File.DirApp in the first value of StartServerHTTP2 ("keystore.jks") - but that doesn't work.)
Else
Server.StartServer
End If

5) I get the following error:
2020-10-29 09:41:03.414:INFO::main: Logging initialized @3233ms to org.eclipse.jetty.util.log.StdErrLog
bananoserver._startserverhttp2 (java line: 1435)
java.lang.ClassNotFoundException: b4j.example.true
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at anywheresoftware.b4j.object.ServerWrapper.Start(ServerWrapper.java:181)
at b4j.example.bananoserver._startserverhttp2(bananoserver.java:1435)
at b4j.example.main._appstart(main.java:80)
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:91)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
at b4j.example.main.main(main.java:28)
main.main (java line: 28)
java.lang.RuntimeException: java.lang.ClassNotFoundException: b4j.example.true
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:120)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
at b4j.example.main.main(main.java:28)
Caused by: java.lang.ClassNotFoundException: b4j.example.true
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at anywheresoftware.b4j.object.ServerWrapper.Start(ServerWrapper.java:181)
at b4j.example.bananoserver._startserverhttp2(bananoserver.java:1435)
at b4j.example.main._appstart(main.java:80)
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:91)
... 2 more

Thanks for your help.
 
Top