B4J Question [solved] What does this error mean and how to correct it?

Mark Read

Well-Known Member
Licensed User
Longtime User
Just downloaded the new Raspbian and installed to a fresh SD Card. Did update and upgrade and then followed the steps as detailed here:

https://www.b4x.com/android/forum/threads/javafx-installation-on-raspberry-pi-help-needed.63403/

in order to allow UI apps on my RPi.

Trying to run the google maps example from Erel gives me this error in B4J, bouncing smiley works. I have no idea what it means or how to correct it. Any help please.

Program started.
Java HotSpot(TM) Client VM warning: You have loaded library /opt/jdk1.8.0_73/jre/lib/arm/libjfxwebkit.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
main._appstart (java line: 63)
java.lang.UnsatisfiedLinkError: /opt/jdk1.8.0_73/jre/lib/arm/libjfxwebkit.so: /opt/jdk1.8.0_73/jre/lib/arm/libjfxwebkit.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(NativeLibLoader.java:201)
at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:94)
at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:39)
at com.sun.webkit.WebPage.lambda$static$39(WebPage.java:127)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.webkit.WebPage.<clinit>(WebPage.java:126)
at javafx.scene.web.WebEngine.<init>(WebEngine.java:824)
at javafx.scene.web.WebEngine.<init>(WebEngine.java:811)
at j
avafx.scene.web.WebView.<init>(WebView.java:271)
at com.lynden.gmapsfx.GoogleMapView.<init>(GoogleMapView.java:70)
at com.lynden.gmapsfx.GoogleMapView.<init>(GoogleMapView.java:55)
at anywheresoftware.b4j.objects.GoogleMapWrapper.Initialize(GoogleMapWrapper.java:63)
at b4j.example.main._appstart(main.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at b4j.example.main.start(main.java:36)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295)
at jav
a.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294)
at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
at java.lang.Thread.run(Thread.java:745)
 
Last edited:

Mark Read

Well-Known Member
Licensed User
Longtime User
opps, forget it. Missed the fact that a webview will not work - sorry.
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
Longtime User
Hi Mark, I've the same your problem.
How did you solved it?
The webview does not works at all.
If I put it into the designer, the bridge stops saying that the WebView is not initialized, even if correctly declared into the Globals.
If instead I remove it from the Designer and try to instantiate it directly with this:
B4X:
#Region  Project Attributes
    #MainFormWidth: 1024
    #MainFormHeight: 600
#End Region

Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form
    Private btnHome As Button
    Private Label1 As Label
    Private Timer1 As Timer
   
    Private Canvas1 As Canvas
    Private WebView1 As WebView
End Sub

Sub AppStart (Form1 As Form, Args() As String)
    MainForm = Form1
    MainForm.SetFormStyle("UNIFIED")
    'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
    WebView1.Initialize("WebView1")
    WebView1.Top=150
    WebView1.Left=0
    WebView1.PrefWidth=1200
    WebView1.Visible=True
    WebView1.Enabled=True
    MainForm.RootPane.LoadLayout("frmMain")
    MainForm.Show
   
    Timer1.Initialize("Timer1",1000)
    Timer1.Enabled=True
End Sub

then the Bridge stop saying:

Waiting for debugger to connect...
Program started.
Java HotSpot(TM) Client VM warning: You have loaded library /opt/jdk1.8.0_73/jre/lib/arm/libjfxwebkit.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
java.lang.UnsatisfiedLinkError: /opt/jdk1.8.0_73/jre/lib/arm/libjfxwebkit.so: /opt/jdk1.8.0_73/jre/lib/arm/libjfxwebkit.so: classe ELF errata: ELFCLASS64 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(NativeLibLoader.java:201)
at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:94)
at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:39)
at com.sun.webkit.WebPage.lambda$static$39(WebPage.java:127)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.webkit.WebPage.<clinit>(WebPage.java:126)
at javafx.scene.web.WebEngine.<init>(WebEngine.java:824)
at javafx.scene.web.WebEngine.<init>(WebEngine.java:811)
at
javafx.scene.web.WebView.<init>(WebView.java:271)
at anywheresoftware.b4j.objects.WebViewWrapper.innerInitialize(WebViewWrapper.java:32)
at anywheresoftware.b4j.objects.NodeWrapper.Initialize(NodeWrapper.java:75)
at b4j.example.main._appstart(main.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:612)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:229)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.
java:497)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:90)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at b4j.example.main.start(main.java:36)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294)
at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
at java.lang.Thread.run(Thread.java:745)
java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: /opt/jdk1.8.0_73/jre/lib/arm/libjfxwebkit.so: /opt/jdk1.8.0_73/jre/lib/arm/libjfxwebkit.so: classe ELF errata: ELFCLASS64 (Possible cause: architecture word width mismatch)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:114)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:90)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at b4j.example.main.start(main.java:36)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294)
at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
at j
ava.lang.Thread.run(Thread.java:745)
Caused by: java.lang.UnsatisfiedLinkError: /opt/jdk1.8.0_73/jre/lib/arm/libjfxwebkit.so: /opt/jdk1.8.0_73/jre/lib/arm/libjfxwebkit.so: classe ELF errata: ELFCLASS64 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(NativeLibLoader.java:201)
at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:94)
at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:39)
at com.sun.webkit.WebPage.lambda$static$39(WebPage.java:127)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.webkit.WebPage.<clinit>(WebPage.java:126)
at javafx.scene.web.WebEngine.<init>(WebEngine.java:824)
at javafx.sc
ene.web.WebEngine.<init>(WebEngine.java:811)
at javafx.scene.web.WebView.<init>(WebView.java:271)
at anywheresoftware.b4j.objects.WebViewWrapper.innerInitialize(WebViewWrapper.java:32)
at anywheresoftware.b4j.objects.NodeWrapper.Initialize(NodeWrapper.java:75)
at b4j.example.main._appstart(main.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:612)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:229)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java
:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
... 11 more


Thank you for your reply.
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
Hallo Mike, sorry I have no solution. I am not sure if the problem is the webview or in my case google maps.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
The "problem" it that, from a few versions back, the Java stack packed with raspian no longer supports UI Apps! Oracle dropped support for the JavaFX framework
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
Longtime User
Hi to all and thank you for your time for the answer.
About the Oracle's drop of UI apps with Java in raspbian, I've learned reading the forum i nthe last 36 non-stopping hours.
But then this raise another question: what is the best solution if we need to make Ui apps with B4J ?

Thank you again.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Simple answer: ABMaterial
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
Longtime User
Thank you
Simple answer: ABMaterial
Thank for your answer.
As you should have understood, I'm new to this language/Framework.
Is possible to use ABMaterial within the WYSIWYG editor?
If so, how?

Basically, if I want to make an UI application that must be shown directly onto the Respberry display, how it can be done? Is ABMaterial the right choice?
If so, in wich container that app run? Into the Raspberry's Web Browser? and if so, there is a way to autorun such kind of application as soon the Raspberry starts?

I know, a lot of questions. I hope that you GURUs can point me into the right direction.

Thank again a lot.
 
Last edited:
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Unfortunately no, ABMaterial is a framework on its own... It has a not so simple learning curve but once you've managed to understand it, the sky is the limited
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
Longtime User
Thank you Cableguy. Probably your answer was sent before I've edited my previous message.
So probably you've missed the remaining portion of the message that I copy/paste below:

Basically, if I want to make an UI application that must be shown directly onto the Respberry display, how it can be done? Is ABMaterial the right choice?
If so, in wich container that app run? Into the Raspberry's Web Browser? and if so, there is a way to autorun such kind of application as soon the Raspberry starts?

I know, a lot of questions. I hope that you GURUs can point me into the right direction.


Thank again a lot.
 
Upvote 0
Top