Troubleshooting
Problem
Your attempts to execute the Jython command AdminConfig.modify() using square brackets "[" at the beginning of value fails.
Symptom
When attempting to create or update a J2EEResourceProperty using wsadmin Jython command: AdminConfig.modify(), a java.lang.IllegalArgumentException exception is returned, if the value of the property begins with the "[" character.
For example, this command:
AdminConfig.modify('(cells/ebzCell01|resources.xml#J2EEResourceProperty_1327700267852)', '[[name "test"] [type "java.lang.String"] [description ""] [value "[]"] [required "false"]]')
produces this output:
WASX7015E: Exception running command: "AdminConfig.modify('(cells/ebzCell01|resources.xml#J2EEResourceProperty_1327700267852)', '[[name "test"] [type "java.lang.String"] [description ""] [value "[]"][required "false"]]')"; exception information:
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: WASX7123E: Unexpected "]" found.
Attribute= had invalid value= for input parameter=]
Cause
The Parser that is being used for the AdminConfig command treats square bracket as the beginning of a list declaration, which causes the java.lang.IllegalArgumentException exception.
Environment
This issue applies to all the platforms and all the WebSphere Application Server versions that support Jython as a scripting language for wsadmin interface
Resolving The Problem
Use the administrative console to create or update the J2EEResourceProperty since it will not result in this problem using square brackets as a value.
To resolve or avoid the wsadmin exception, insert white space or blank before the square bracket "[".
For example:
AdminConfig.modify('(cells/ebzCell01|resources.xml#J2EEResourceProperty_1327700267852)', '[[name "test"] [type "java.lang.String"] [description ""] [value " []"] [required "false"]]')
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21587193