dev@glassfish.java.net

Re: Issue Encountered When Running asadmin Commands

From: Byron Nevins <byron.nevins_at_oracle.com>
Date: Mon, 28 Mar 2011 10:25:24 -0700

There are 2 easy solutions

(1) simply run the command with no args at all. asadmin will prompt you
and not be confused about it being an asadmin option
*asadmin create-jvm-options*

(2) Escape with a backslash:
*asadmin create-jvm-options \-Xwhatever*



On 3/27/2011 7:19 PM, Yi Yang wrote:
> Hi Tom,
>
> Thanks very much for your reply!
>
> I've tried your solution, it did not work...
>
> It failed with the same error message.
>
> Best regards,
> Jerry
>
> On 3/25/2011 21:50, Tom Mueller wrote:
>> Another way to avoid this issue is to do the following:
>>
>> asadmin create-jvm-options -- -XX\:+LogVMOutput
>>
>> Note the extra "--" after the subcommand name which causes the parser
>> to stop interpreting the arguments as options.
>>
>> The fix for issue 16037 was checked into the GlassFish trunk after
>> 3.1 was completed, so the fix isn't in any shipping release yet. It
>> is in the nightly build of the trunk.
>>
>> Tom
>>
>>
>> On 3/25/2011 6:22 AM, Yi Yang wrote:
>>> Dear Experts,
>>>
>>> I've encountered the following problem while issuing an
>>> create-jvm-options command:
>>> ------------------------
>>> asadmin> create-jvm-options -XX\:+LogVMOutput
>>> Non-boolean option: X, not allowed in argument: -XX:+LogVMOutput
>>> Usage: asadmin [-H|--host <host(default:localhost)>]
>>> [-p|--port <port(default:4848)>] [-u|--user
>>> <user(default:admin)>]
>>> [-W|--passwordfile <passwordfile>]
>>> [-t|--terse[=<terse(default:false)>]]
>>> [-s|--secure[=<secure(default:false)>]]
>>> [-e|--echo[=<echo(default:false)>]]
>>> [-I|--interactive[=<interactive(default:true)>]]
>>> [-?|--help[=<help(default:false)>]]
>>> create-jvm-options [command-specific options]
>>> Command create-jvm-options failed.
>>> asadmin> exit
>>> Command multimode failed.
>>> --------------------------
>>> The -XX option appeared to be recognized as asadmin's arguments.
>>> However, if I run this command in single mode specifying the --host,
>>> then the command could be correctly interpreted.
>>>
>>> I've searched the Issue Tracking DB and found similar issue been
>>> reported before (GLASSFISH-16037) tagged as resolved, but in my
>>> case, the problem still exists.
>>>
>>> Thanks very much for your help!
>>>
>>> Best regards,
>>> Jerry Yang
>>> Oracle Berkeley DB
>>>

-- 
Oracle <http://www.oracle.com>
Byron Nevins | Principal MTS
Phone: +1 6503958992 <tel:+1%206503958992>
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to 
developing practices and products that help protect the environment