Bug 1004714 - IOException in aesh console initialization results in NPE
Summary: IOException in aesh console initialization results in NPE
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CLI
Version: 6.1.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER1
: EAP 6.2.0
Assignee: Jan Martiska
QA Contact: Jan Martiska
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-05 10:10 UTC by Jan Martiska
Modified: 2013-12-15 16:21 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-15 16:21:29 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFLY-2009 0 Major Resolved IOException in aesh console initialization results in NPE 2013-12-04 14:02:23 UTC

Description Jan Martiska 2013-09-05 10:10:24 UTC
In source file org.jboss.as.cli.impl.Console, method Factory.getConsole:
if the constructor call "new org.jboss.aesh.console.Console()" leads to an IOException, it is only logged and then ignored, always yielding a NullPointerException just a few lines later (console.addCompletion(new Completion() ...)

I think the IOException should rather be rethrown wrapped in a CliInitializationException, so the resulting exception will not lose track of why this happened. Allowing a NPE go out of the internals is a wrong approach.

(We hit this issue with IOException happening intermittently on HP-UX when ~/.aesh_history is read over NFS. I am not sure if that can be fixed, needs some more investigation.)

Comment 1 Alexey Loubyansky 2013-09-05 12:59:42 UTC
Oh, yes, thanks for reporting.

Comment 2 JBoss JIRA Server 2013-09-06 06:33:14 UTC
Jan Martiska <jmartisk> updated the status of jira WFLY-2009 to Resolved

Comment 3 JBoss JIRA Server 2013-09-06 06:33:14 UTC
Jan Martiska <jmartisk> made a comment on jira WFLY-2009

merged.

Comment 5 Jan Martiska 2013-09-18 07:30:24 UTC
Verified in 6.2.0.ER1


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