Bug 1565725 - jython: [ERROR] Failed to construct terminal; falling back to unsupported
Summary: jython: [ERROR] Failed to construct terminal; falling back to unsupported
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: jline
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Simacek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-10 15:29 UTC by Miro Hrončok
Modified: 2018-06-02 21:07 UTC (History)
7 users (show)

Fixed In Version: jline-2.14.6-1.fc28 jline-2.14.6-1.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-26 20:43:30 UTC
Type: Bug


Attachments (Terms of Use)

Description Miro Hrončok 2018-04-10 15:29:42 UTC
Description of problem:
Jython prints a Java exception on startup.

Version-Release number of selected component (if applicable):
jython-2.7.1-5.fc28.noarch
java-1.8.0-openjdk-1.8.0.162-3.b12.fc28.x86_64

How reproducible: easy

Steps to Reproduce:
1. jython

Actual results:
[ERROR] Failed to construct terminal; falling back to unsupported
java.lang.NumberFormatException: For input string: "0x100"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.valueOf(Integer.java:766)
	at jline.internal.InfoCmp.parseInfoCmp(InfoCmp.java:59)
	at jline.UnixTerminal.parseInfoCmp(UnixTerminal.java:233)
	at jline.UnixTerminal.<init>(UnixTerminal.java:64)
	at jline.UnixTerminal.<init>(UnixTerminal.java:49)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)
	at jline.TerminalFactory.getFlavor(TerminalFactory.java:209)
	at jline.TerminalFactory.create(TerminalFactory.java:100)
	at jline.TerminalFactory.get(TerminalFactory.java:184)
	at jline.TerminalFactory.get(TerminalFactory.java:190)
	at jline.console.ConsoleReader.<init>(ConsoleReader.java:240)
	at org.python.util.JLineConsole.install(JLineConsole.java:107)
	at org.python.core.Py.installConsole(Py.java:1744)
	at org.python.core.PySystemState.initConsole(PySystemState.java:1263)
	at org.python.core.PySystemState.doInitialize(PySystemState.java:1110)
	at org.python.core.PySystemState.initialize(PySystemState.java:1024)
	at org.python.core.PySystemState.initialize(PySystemState.java:980)
	at org.python.core.PySystemState.initialize(PySystemState.java:975)
	at org.python.util.jython.run(jython.java:263)
	at org.python.util.jython.main(jython.java:142)

Jython 2.7.1 (, Feb 8 2018, 02:08:29) 
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.8.0_162
Type "help", "copyright", "credits" or "license" for more information.
>>>

Expected results:
Jython 2.7.1 (, Feb 8 2018, 02:08:29) 
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.8.0_162
Type "help", "copyright", "credits" or "license" for more information.
>>>

Comment 1 coomber.harry 2018-05-23 12:20:49 UTC
I also have this problem but for sbt instead. I believe the bug is with Jline. 

Versions:
sbt: 0.13.1-9.fc28.1  
jline : 2.13-11.fc28

Steps to reproduce:
 - run sbt from terminal (may seem like it has loaded after printing the stacktrace but no commands actually work).

Stacktrace:
[ERROR] Failed to construct terminal; falling back to unsupported
java.lang.NumberFormatException: For input string: "0x100"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.valueOf(Integer.java:766)
	at jline.internal.InfoCmp.parseInfoCmp(InfoCmp.java:59)
	at jline.UnixTerminal.parseInfoCmp(UnixTerminal.java:233)
	at jline.UnixTerminal.<init>(UnixTerminal.java:64)
	at jline.UnixTerminal.<init>(UnixTerminal.java:49)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)
	at jline.TerminalFactory.getFlavor(TerminalFactory.java:209)
	at jline.TerminalFactory.create(TerminalFactory.java:100)
	at jline.TerminalFactory.get(TerminalFactory.java:184)
	at jline.TerminalFactory.get(TerminalFactory.java:190)
	at sbt.JLine$.sbt$JLine$$terminal(LineReader.scala:87)
	at sbt.JLine$.withTerminal(LineReader.scala:91)
	at sbt.JLine$.usingTerminal(LineReader.scala:97)
	at sbt.JLine$.createReader(LineReader.scala:103)
	at sbt.FullReader.<init>(LineReader.scala:135)
	at sbt.BasicCommands$$anonfun$shell$1.apply(BasicCommands.scala:149)
	at sbt.BasicCommands$$anonfun$shell$1.apply(BasicCommands.scala:146)
	at sbt.Command$$anonfun$command$1$$anonfun$apply$1.apply(Command.scala:31)
	at sbt.Command$$anonfun$command$1$$anonfun$apply$1.apply(Command.scala:31)
	at sbt.Command$.process(Command.scala:95)
	at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:100)
	at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:100)
	at sbt.State$$anon$1.process(State.scala:179)
	at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:100)
	at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:100)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
	at sbt.MainLoop$.next(MainLoop.scala:100)
	at sbt.MainLoop$.run(MainLoop.scala:93)
	at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:71)
	at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:66)
	at sbt.Using.apply(Using.scala:25)
	at sbt.MainLoop$.runWithNewLog(MainLoop.scala:66)
	at sbt.MainLoop$.runAndClearLast(MainLoop.scala:49)
	at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:33)
	at sbt.MainLoop$.runLogged(MainLoop.scala:25)
	at sbt.StandardMain$.runManaged(Main.scala:57)
	at sbt.xMain.run(Main.scala:29)
	at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:57)
	at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:57)
	at xsbt.boot.Launch$.withContextLoader(Launch.scala:77)
	at xsbt.boot.Launch$.run(Launch.scala:57)
	at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
	at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
	at xsbt.boot.Launch$.launch(Launch.scala:65)
	at xsbt.boot.Launch$.explicit(Launch.scala:45)
	at xsbt.boot.Launch$.initialized(Launch.scala:41)
	at xsbt.boot.Launch$.parsed(Launch.scala:34)
	at xsbt.boot.Launch$.configured(Launch.scala:24)
	at xsbt.boot.Launch$.apply(Launch.scala:19)
	at xsbt.boot.Launch$.apply(Launch.scala:16)
	at xsbt.boot.Boot$.runImpl(Boot.scala:32)
	at xsbt.boot.Boot$.run(Boot.scala:26)
	at xsbt.boot.Boot$.main(Boot.scala:21)
	at xsbt.boot.Boot.main(Boot.scala)

I believe that an update to jline is all that is needed to solve this since according to this github issue (https://github.com/jline/jline2/issues/281) the bug has been fixed. Version 2.14.4+ should fix this.

PS - sorry if I've messed something up with formatting/etiquette, I'm new to this.

Comment 2 Miro Hrončok 2018-05-23 12:35:42 UTC
Reassigning to jline.

Comment 3 Fedora Update System 2018-05-24 08:51:33 UTC
jline-2.14.6-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-29353e5099

Comment 4 Fedora Update System 2018-05-24 08:51:48 UTC
jline-2.14.6-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-bc6bd3c30f

Comment 5 Fedora Update System 2018-05-24 13:45:57 UTC
jline-2.14.6-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-29353e5099

Comment 6 Fedora Update System 2018-05-24 18:00:23 UTC
jline-2.14.6-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-bc6bd3c30f

Comment 7 Fedora Update System 2018-05-26 20:43:30 UTC
jline-2.14.6-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2018-06-02 21:07:01 UTC
jline-2.14.6-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.