B4J Question B4J Debug-Mode Question

TheRealMatze

Active Member
Licensed User
Hi,
i´ve just installed B4J on my Laptop - and it works only partitially.
When i start a app (even a blank b4xpages project) in release-mode everything works as expected, but when i try in debug-mode i got this error:

Errormessage:
WARNING: package com.sun.javafx.embed.swing.oldimpl not in javafx.swing
Waiting for debugger to connect...
java.lang.ExceptionInInitializerError
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:427)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.loadClass(LauncherImpl.java:382)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplicationWithArgs$3(LauncherImpl.java:421)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
    at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.RuntimeException: java.net.SocketException: Socket closed
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:140)
    at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:100)
    at b4j.example.main.<clinit>(main.java:17)
    ... 12 more
Caused by: java.net.SocketException: Socket closed
    at java.base/sun.nio.ch.NioSocketImpl.endRead(NioSocketImpl.java:248)
    at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:327)
    at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350)
    at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803)
    at java.base/java.net.Socket$SocketInputStream.read(Socket.java:982)
    at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:244)
    at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:263)
    at java.base/java.io.DataInputStream.readByte(DataInputStream.java:269)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:229)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
    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:111)
    ... 14 more
java.lang.reflect.InvocationTargetException
    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 java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.NullPointerException
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:458)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
    ... 5 more

It´s a clean Installation with the recommended java-version. What did I forget?

Regards
Matze
 

Daestrum

Expert
Licensed User
Longtime User
Silly question, but are you trying to run two B4J IDEs in debug mode at the same time?
 
Upvote 0

Chris2

Active Member
Licensed User
Longtime User
Are the project files stored in a Dropbox, OneDrive, Google Drive folder or something similar?
 
Upvote 0

TheRealMatze

Active Member
Licensed User
Are the project files stored in a Dropbox, OneDrive, Google Drive folder or something similar?
On a local NAS, connected via wifi. Networks speed is no problem so far, wifi speed tested >100mbit in my office.

But you are right it looks like it is a kind of timeout. Sometimes it works, sometimes not.
Is there any timeout i can define? Currently it is not working again...
 
Upvote 0

Chris2

Active Member
Licensed User
Longtime User
On a local NAS, connected via wifi. Networks speed is no problem so far, wifi speed tested >100mbit in my office.

But you are right it looks like it is a kind of timeout. Sometimes it works, sometimes not.
Is there any timeout i can define? Currently it is not working again...
I was thinking more of the project being in a local folder that gets synched with OneDrive or something, rather that it being in the cloud itself.
I've come across this issue and think that it occurs more frequently when OneDrive jumps in and tries to sync the newly created files while B4J is still compiling. Pausing OneDrive seems to help.

Do you have anything like this, or an autobackup process acessing the NAS that could be jumping in as soon as new files are created during the B4J compilation?
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
Personally, I am not very fond of Microsoft's choice to put the C:\User directory and program data in the cloud as standard. Create a Data sub directory on a hard disk or in your case on a NAS in which you put your program source. Be aware of other synchronization activities running in the background during debug mode.
 
Upvote 0
Top