You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously with 3.21.0 you didn't need to add resource hints for jna libs on a Linux. This was nice as you don't need to bundle things you don't need.
With 3.23.0 if libjnidispatch.so is not resolvable from an image a dump terminal is created.
2023-06-03T15:42:35.283+01:00 DEBUG 25192 --- [main] com.sun.jna.Native : Looking in classpath from jdk.internal.loader.ClassLoaders$AppClassLoader@f5f2bb7 for /com/sun/jna/linux-x86-64/libjnidispatch.so
2023-06-03T15:42:35.292+01:00 WARN 25192 --- [main] org.jline : input is tty: {}true
2023-06-03T15:42:35.292+01:00 WARN 25192 --- [main] org.jline : output is tty: {}false
2023-06-03T15:42:35.292+01:00 WARN 25192 --- [main] org.jline : error is tty: {}false
2023-06-03T15:42:35.292+01:00 WARN 25192 --- [main] org.jline : Creating a dumb terminal
Simply adding hint for libjnidispatch.so gets you a PosixSysTerminal. There's additional errors as I didn't add graal jni hints.
2023-06-03T17:12:06.736+01:00 DEBUG 20066 --- [main] com.sun.jna.Native : Looking in classpath from jdk.internal.loader.ClassLoaders$AppClassLoader@f5f2bb7 for /com/sun/jna/linux-x86-64/libjnidispatch.so
2023-06-03T17:12:06.736+01:00 DEBUG 20066 --- [main] com.sun.jna.Native : Found library resource at resource:/com/sun/jna/linux-x86-64/libjnidispatch.so
2023-06-03T17:12:06.736+01:00 DEBUG 20066 --- [main] com.sun.jna.Native : Extracting library to /home/jvalkealahti/.cache/JNA/temp/jna10043564291288107886.tmp
2023-06-03T17:12:06.737+01:00 DEBUG 20066 --- [main] com.sun.jna.Native : Trying /home/jvalkealahti/.cache/JNA/temp/jna10043564291288107886.tmp
2023-06-03T17:12:06.737+01:00 DEBUG 20066 --- [main] com.sun.jna.Native : Found jnidispatch at /home/jvalkealahti/.cache/JNA/temp/jna10043564291288107886.tmp
2023-06-03T17:12:06.743+01:00 DEBUG 20066 --- [main] org.jline : Error creating jna based terminal: Structure.getFieldOrder() on class org.jline.terminal.impl.jna.linux.CLibrary$termios returns names ([c_cc, c_cflag, c_iflag, c_ispeed, c_lflag, c_line, c_oflag, c_ospeed]) which do not match declared field names ([])
java.lang.Error: Structure.getFieldOrder() on class org.jline.terminal.impl.jna.linux.CLibrary$termios returns names ([c_cc, c_cflag, c_iflag, c_ispeed, c_lflag, c_line, c_oflag, c_ospeed]) which do not match declared field names ([])
at com.sun.jna.Structure.getFields(Structure.java:1122) ~[spring-shell-samples:5.13.0 (b0)]
2023-06-03T17:12:06.762+01:00 DEBUG 20066 --- [main] org.jline : Registering shutdown-hook: Thread[JLine Shutdown Hook,5,main]
2023-06-03T17:12:06.762+01:00 DEBUG 20066 --- [main] org.jline : Adding shutdown-hook task: org.jline.terminal.impl.PosixSysTerminal$$Lambda$ed1978c058246167f7b76bed6f10a8df8e337aa6@6089f7a9
2023-06-03T17:12:06.762+01:00 DEBUG 20066 --- [main] org.jline : Using terminal PosixSysTerminal
2023-06-03T17:12:06.763+01:00 DEBUG 20066 --- [main] org.jline : Using pty ExecPty
I was looking recent changes in a TerminalBuilder but got a bit confused what actually happens. Looks like jna side is not actually needed but something goes south during the initialisation phase.
The text was updated successfully, but these errors were encountered:
Previously with
3.21.0
you didn't need to add resource hints for jna libs on a Linux. This was nice as you don't need to bundle things you don't need.With
3.23.0
iflibjnidispatch.so
is not resolvable from an image a dump terminal is created.Simply adding hint for
libjnidispatch.so
gets you aPosixSysTerminal
. There's additional errors as I didn't add graal jni hints.I was looking recent changes in a
TerminalBuilder
but got a bit confused what actually happens. Looks like jna side is not actually needed but something goes south during the initialisation phase.The text was updated successfully, but these errors were encountered: