Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
# uname -a Linux <redacted hostname> 4.18.0-305.el8.ppc64le #1 SMP Thu Apr 29 08:53:15 EDT 2021 ppc64le ppc64le ppc64le GNU/Linux # cat /etc/redhat-release Red Hat Enterprise Linux release 8.4 (Ootpa) # java -version openjdk version "11.0.12" 2021-07-20 LTS OpenJDK Runtime Environment 18.9 (build 11.0.12+7-LTS) OpenJDK 64-Bit Server VM 18.9 (build 11.0.12+7-LTS, mixed mode, sharing)
# uname -a Linux <redacted hostname> 4.18.0-305.el8.ppc64le #1 SMP Thu Apr 29 08:53:15 EDT 2021 ppc64le ppc64le ppc64le GNU/Linux # cat /etc/redhat-release Red Hat Enterprise Linux release 8.4 (Ootpa) # java -version openjdk version "11.0.12" 2021-07-20 LTS OpenJDK Runtime Environment 18.9 (build 11.0.12+7-LTS) OpenJDK 64-Bit Server VM 18.9 (build 11.0.12+7-LTS, mixed mode, sharing)
Description
When trying to run phoenix-sqlline.py or phoenix-sqlline-thin.py on Linux PPC,
we get the following exception:
Exception in thread "main" com.sun.jna.LastErrorException: [25] Inappropriate ioctl for device at com.sun.jna.Native.invokeVoid(Native Method) at com.sun.jna.Function.invoke(Function.java:415) at com.sun.jna.Function.invoke(Function.java:361) at com.sun.jna.Library$Handler.invoke(Library.java:265) at com.sun.proxy.$Proxy0.ioctl(Unknown Source) at org.jline.terminal.impl.jna.linux.LinuxNativePty.getSize(LinuxNativePty.java:95) at org.jline.terminal.impl.AbstractPosixTerminal.getSize(AbstractPosixTerminal.java:60) at org.jline.terminal.Terminal.getWidth(Terminal.java:196) at sqlline.SqlLine.getConsoleReader(SqlLine.java:594) at sqlline.SqlLine.begin(SqlLine.java:511) at sqlline.SqlLine.start(SqlLine.java:267) at sqlline.SqlLine.main(SqlLine.java:206)
Upgrading to the latest sqlline 1.12 will result in the sqlline.py starting normally, but it will not accept any keyboard input.
Replacing the currently used sqlline-*-jar-with-dependencies.jar JAR with the plain sqlline jar, and NOT adding the JNA and JANSI terminal variants and their dependencies fixes the problem.
Doing that, however, would break or at least seriously degrade sqlline functionality on Windows.