Hello.
This is the first time I have encountered this error. In debug compilation the application is working. It compiles in Release but displays an error. The application is a simple server with one API and MqttBroker. Server can work with SSL and without it.
Code from main.java line 64
Which corresponds to the code in B4J
The config variable is mapped and works fine, all entries are present.
This is the first time I have encountered this error. In debug compilation the application is working. It compiles in Release but displays an error. The application is a simple server with one API and MqttBroker. Server can work with SSL and without it.
Error:
main._appstart (java line: 64)
java.lang.NullPointerException
at b4j.example.main._appstart(main.java:64)
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:564)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:109)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:96)
at b4j.example.main.main(main.java:28)
Code from main.java line 64
Java:
if ((_config.Get((Object)("ssl"))).equals((Object)("0"))) {
//BA.debugLineNum = 36;BA.debugLine="StartServer(\"srvr\", config.Get(\"port\"))";
_startserver("srvr",(int)(BA.ObjectToNumber(_config.Get((Object)("port")))));
//BA.debugLineNum = 37;BA.debugLine="Log(\"Run server port: \"&config.Get(\"port\"))";
anywheresoftware.b4a.keywords.Common.LogImpl("365551","Run server port: "+BA.ObjectToString(_config.Get((Object)("port"))),0);
}else {
//BA.debugLineNum = 39;BA.debugLine="Log(\"Starting HTTPS\")";
anywheresoftware.b4a.keywords.Common.LogImpl("365553","Starting HTTPS",0);
//BA.debugLineNum = 41;BA.debugLine="If config.Get(\"lc\")=\"1\" Then";
Which corresponds to the code in B4J
B4X:
If config.Get("ssl") = "0" Then
StartServer("srvr", config.Get("port"))
Log("Run server port: "&config.Get("port"))
Else
Log("Starting HTTPS")
The config variable is mapped and works fine, all entries are present.
Last edited: