Bug 1004714

Summary: IOException in aesh console initialization results in NPE
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jan Martiska <jmartisk>
Component: CLIAssignee: Jan Martiska <jmartisk>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Martiska <jmartisk>
Severity: unspecified Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.1.1CC: brian.stansberry, olubyans
Target Milestone: ER1   
Target Release: EAP 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-15 16:21:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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