JPro-one / JPro-Tickets

The right place to report about bugs or suggest improvements for JPro.
https://www.jpro.one
9 stars 4 forks source link

JPro Server does not restart on macOS #90

Open mipastgt opened 3 years ago

mipastgt commented 3 years ago

When I launch the JPro Server for the first time, everything works as expected. However, when I try to lauch it again, after some code changes for example, I get:

% mvn jpro:restart
...
[INFO] --- jpro-maven-plugin:2020.1.5:restart (default-cli) @ de.mpmediasoft.mpcopilot.main.desktop ---
[INFO] Waiting for JPro Server
Exception in thread "Thread-19" java.lang.Exception: Prevented System.exit
    at com.jpro.internal.server.Initializer$$anon$3.checkOnlyPermission(Initializer.scala:130)
    at com.jpro.internal.server.Initializer$$anon$3.checkPermission(Initializer.scala:135)
    at java.base/java.lang.SecurityManager.checkExit(SecurityManager.java:620)
    at java.base/java.lang.Runtime.halt(Runtime.java:276)
    at com.jpro.internal.server.Initializer$$anon$4.run(Initializer.scala:181)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/Users/mpaus/.m2/repository/com/google/inject/guice/4.2.3/guice-4.2.3.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[info] a.e.s.Slf4jLogger - Slf4jLogger started
[info] play.api.Play - Application started (Prod) (no global state)
[info] p.c.s.AkkaHttpServer - Enabling HTTP/2 on Akka HTTP server...
[info] p.c.s.AkkaHttpServer - Listening for HTTP on /[0:0:0:0:0:0:0:0]:8080
[info] c.jpro.activity - Starting the server
[info] c.j.i.s.Initializer$ -  *** Starting JPro: https://www.jpro.one/ ***
[info] c.j.i.s.Initializer$ - OS: Mac OS X
[info] c.j.i.s.Initializer$ - JPro: 2020.1.5
[info] c.j.i.s.Initializer$ - Java version: 15.0.2
[info] c.j.i.s.Initializer$ - JVM: 15.0.2 Oracle Corporation
[info] c.j.i.s.Initializer$ - redirected OUT / ERR
[info] c.j.i.s.Initializer$ - installed SLF4JBridge
[info] c.j.i.s.MonocleInitializer$ - screen: null
[info] c.j.i.s.Initializer$ - finished init!
[info] c.j.i.s.Initializer$ - JavaFX version: 15.0.1.1-jpro+0-2021-01-03-134129
[info] c.j.i.c.m.ChartJSONImExporter - Imported chart data Thu Apr 15 11:56:27 CEST 2021
[info] c.j.i.c.m.DynamicDataModel - Started Monitoring chart data...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

There seems to be some exception which prevents a system exit. Even when I try to reboot the machine I get:

Bildschirmfoto 2021-04-15 um 11 44 29
FlorianKirmaier commented 3 years ago

JPro by default prevents System.exit(), because a lot of programs call it when an application is closed. I would usually use jproRun and jproRelease. With jpro.preventSystemExit=falsein the jpro.conf you can disable this "feature". Have to investigate the "restart" issue. I think these are basically 2 issues, jproRestart not working properly, and the restart of the OS is blocked. Gonna keep the ticket open, until we have investigated this.

mipastgt commented 3 years ago

Just for your info. I could not find any System.exit() in my code and Platform.exit() is only called if I explicitly hit the close button, which I did not do. I closed the application by closing the browser window.