dev@glassfish.java.net

Re: ./asadmin list-commands _ ->java.lang.StringIndexOutOfBoundsException

From: Byron Nevins <byron.nevins_at_Oracle.com>
Date: Tue, 06 Jul 2010 12:42:55 -0700

Fixed and checked-in.

the super-long command name,
_get-connection-definition-properties-and-defaults, revealed the problem.


C:\gf\v3\admin\cli>asadmin list-commands _
********** Local Commands **********
_create-instance-filesystem
_synchronize-instance

********** Remote Commands **********
__list-group-names _get-jdbc-driver-class-names
__list-predefined-authrealm-classnames _get-mcf-config-properties
__locations
_get-message-listener-config-properties
__supports-user-management
_get-message-listener-config-property-types
_create-node _get-message-listener-types
_create-node-implicit
_get-resource-adapter-config-properties
_deploy _get-restart-required
_get-activation-spec-class
_get-system-rars-allowing-pool-creation
_get-admin-object-class-names _get-validation-class-names
_get-admin-object-config-properties _get-validation-table-names
_get-admin-object-interface-names _list-app-refs
_get-built-in-custom-resources _postdeploy
_get-connection-definition-names _preundeploy
_get-connection-definition-properties-and-defaults _register-instance
_get-connector-config-java-beans _synchronize-files
_get-database-vendor-names _unregister-instance
_get-host-and-port _update-node

Command list-commands executed successfully.

================================

On 7/6/2010 12:33 PM, Byron Nevins wrote:
> interesting. the problem is a gigantic command name (> 40 chars)
>
> _get-connection-definition-properties-and-defaults
>
>
> On 7/6/2010 11:58 AM, Ludovic Champenois wrote:
>> $ ./asadmin list-commands _
>> ********** Local Commands **********
>> _create-instance-filesystem
>> _synchronize-instance
>>
>> ********** Remote Commands **********
>> Exception in thread "main" java.lang.StringIndexOutOfBoundsException:
>> String index out of range: -10
>> at java.lang.String.substring(String.java:1937)
>> at
>> com.sun.enterprise.admin.cli.ListCommandsCommand.justify(ListCommandsCommand.java:283)
>>
>> at
>> com.sun.enterprise.admin.cli.ListCommandsCommand.printRemoteCommands(ListCommandsCommand.java:271)
>>
>> at
>> com.sun.enterprise.admin.cli.ListCommandsCommand.executeCommand(ListCommandsCommand.java:123)
>>
>> at
>> com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:255)
>> at
>> com.sun.enterprise.admin.cli.AsadminMain.executeCommand(AsadminMain.java:229)
>>
>> at
>> com.sun.enterprise.admin.cli.AsadminMain.main(AsadminMain.java:167)
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>

-- 
Byron Nevins  -  Oracle Corporation
Home: 650-359-1290
Cell: 650-784-4123
Sierra: 209-295-2188