[jboss-jira] [JBoss JIRA] (AS7-5008) host-controller module does parse command line args too late

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Sun Nov 25 12:57:21 EST 2012


    [ https://issues.jboss.org/browse/AS7-5008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736805#comment-12736805 ] 

Brian Stansberry commented on AS7-5008:
---------------------------------------

Oops; much of my last comment was based on me being an idiot. The error I introduced to look into what the output looked like lead into the parseValue() method that produces no error message. So, of course I didn't see one. When I do something that actually results in an error message to System.err, it appears in the console as an ERROR log, as desired.

So, I'll process your patch now (BTW, thanks!), but with an added commit that does the following:

1) Add a System.err.println call to parseValue()
2) Appends "Use domain.sh --help for information on valid command line arguments." to the parsing error messages.

If there are other parsing errors that aren't writing error messages, a patch fixing that would be welcome, as would be a patch cleaning up the System.exit/abort stuff.
                
> host-controller module does parse command line args too late
> ------------------------------------------------------------
>
>                 Key: AS7-5008
>                 URL: https://issues.jboss.org/browse/AS7-5008
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Domain Management
>    Affects Versions: 7.1.1.Final, 7.2.0.Alpha1
>            Reporter: Bernd Eckenfels
>            Assignee: Brian Stansberry
>            Priority: Minor
>              Labels: as, usage
>
> When starting the host controller module to use the -v or -h command line switches (which are supported in the code) there will be no result. The reason for this is, that the host-controller reads the authKey before it parses the command line for the manual invok. Also it looks like the redirected input/output leads to the case that no usage() can be writte anyway.
> org.jboss.as.process.protocol.StreamUtils.readFully(StreamUtils.java:124)
> org.jboss.as.host.controller.Main.main(Main.java:82)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> java.lang.reflect.Method.invoke(Unknown Source)
> org.jboss.modules.Module.run(Module.java:260)
> org.jboss.modules.Main.main(Main.java:291)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list