使用逗号作为值的Websphere Jython AdminConfig.modify会导致异常

时间:2017-07-27 16:57:46

标签: websphere jython websphere-8

我有一个脚本,用于在WebSphere服务器上设置JVM属性。除非值包含逗号,否则该脚本将完美运行。我似乎无法为此找到解决方法。有没有人知道解决这个问题的方法?

示例代码

def SetJVMProp(jvm):
    attr_name  = ['name', 'globalDataFil ter.stockcount.maintenance']
    attr_value = ['value', 'FUEL,DELETED_PRODUCTS,MERCH_AND_PURCH_GROUP']
    attr_required = ['required', "false"]
    attr_description = ['description', '']
    attr_list = [attr_name, attr_value, attr_required, attr_description]
    property=['systemProperties',[attr_list]]
    AdminConfig.modify(jvm, [property])

例外:

Unexpected error:  <type 'com.ibm.ws.scripting.ScriptingException'>com.ibm.ws .scripting.ScriptingException: java.lang.IllegalArgumentException:java.lang .IllegalArgumentException: WASX7122E: Expected "]"  not found. Attribute=value had invalid value=FUE for input parameter ['name'"globalDataFilter.stockcount.maintenance"]  ['value'"FUE",DELETED_PRODUCTS,MERCH_AND_PURCH_GROUP'] ['required' 'false'] ['description' '']

Websphere:8.5.5 Jython:2.5.4rc1

0 个答案:

没有答案