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

Error: Malformed input or input contains unmappable characters, how to solve? #169

Open ctoabidmaqbool1 opened 5 months ago

ctoabidmaqbool1 commented 5 months ago

Recently my jPro app stops running, It's on Linux VPS Hosting, However on my local PC e.g. Window 10 my jPro app is running fine, how to detect/debugs and fix the issue?

root@host:/var/www/myapp.com/bin# ./restart.sh
JPro will be started.
installed SLF4JBridge
[INFO ] c.jpro.activity - Starting the server
[INFO ] c.j.i.s.JProInitializer$ -  *** Starting JPro: https://www.jpro.one/ ***
[INFO ] c.j.i.s.JProInitializer$ - OS: Linux
[INFO ] c.j.i.s.JProInitializer$ - JPro: 2024.1.0
[INFO ] c.j.i.s.JProInitializer$ - Java version: 17.0.2
[INFO ] c.j.i.s.JProInitializer$ - JVM: 17.0.2 Oracle Corporation
[INFO ] c.j.i.s.JProInitializer$ - JavaFX jar: file:/var/www/myapp.com/jfx/linux/javafx-graphics-17.0.7.2-jpro+0-linux.jar
[INFO ] c.j.i.s.JProInitializer$ - Configuring logging from url: 'jar:file:/var/www/myapp.com/jprolibs/jpro-server_2.12-2024.1.0.jar!/logback-jpro-default.xml'
[ERROR] c.j.i.s.JProInitializer$ - OS doesn't support umlaut - canceling startup.
java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /folder/ümläüuts
        at java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:121)
        at java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:68)
        at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)
        at java.base/java.io.File.toPath(File.java:2387)
        at com.jpro.internal.server.JProInitializer$.$anonfun$initialize$4(JProInitializer.scala:120)
        at com.jpro.internal.server.JProInitializer$.execute(JProInitializer.scala:70)
        at com.jpro.internal.server.JProInitializer$.initialize(JProInitializer.scala:118)
        at com.jpro.internal.server.JProInitializer$.init(JProInitializer.scala:32)
        at com.jpro.internal.server.JProStarter$.$anonfun$startFromBoot$2(JProStarter.scala:34)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
root@host:/var/www/myapp.com/bin#
FlorianKirmaier commented 5 months ago

Checkout this ticket for more details: https://bugs.openjdk.org/browse/JDK-8321737

Usually, the terminal is misconfigured, which you are using. The effect of this is that certain operations (like handling files with umlauts, especially uploading) no longer work properly. This is tricky to detect, so we decided it would be better to just not start the server at all in this case - so it's easier to fix. Usually, this is related to the environment variables.

We mainly encountered this when starting servers from the Terminal from Mac with SSH using certain parameters.

Alternatively, you can disable the check with jpro.checkOSEncoding in the jpro.conf (not recommended)

ctoabidmaqbool1 commented 5 months ago

@FlorianKirmaier Thanks, your response helped me a lot. And my problem is solved.

As you told, there was some problem in some of my terminals, e.g. WebMin Control Panel (terminal) and Code-Server (terminal). Will try to fix it latter.

But in my local teminal e.g. Solar-Putty, ./restart.sh or ./restart-background.sh works like a charam without any issue!

In short there is a some problem in online termial but my local works. Two of my jPro Apps are now working again, which was shutdown when i was restarted.