0

我在 Unix/Mainframe 上有下面的简单 jython 脚本。我通过 touch 命令创建了文件,然后通过 UdList 对其进行了编辑。我从 OMVS shell 调用 wsadmin stragh。无论我在 NODE = xyz 中写什么,我总是会收到以下错误。

$ cd /WebSphere/was85/dtl85cel/certainNode/DeploymentManager/profiles/default
$ cd bin
$ sh wsadmin.sh -lang jython -user myUser -password myPWD-f /usr/MyCompany
Apps/myTeam/in.py
WASX7209I: Connected to process "dmgr" on node certainNode using RMI connector;  Th
e type of process is: DeploymentManager
WASX7017E: Exception received while running file "/usr/MyCompanyApps/myTeam/in.py
"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
  (no code object) at line 0
  File "<string>", line 2
         NODE = "wlemyAppa"
         ¬
SyntaxError: invalid syntax

--- 

000001, APP_NAME = "DVL-MYAPP"
000002, NODE = "wlemyAppa"
000003, SERVER = "WLEMYAPP"
000004, EARFILE = "/WebSphereDevelopment/MYAPP/dtl/curr/warfiles/MyAppEAR.ear"
000005, APPOPTS = " -nopreCompileJSPs "
000006, APPOPTS = APPOPTS + "-installed.ear.destination "
000007, APPOPTS = APPOPTS + "/WebSphereDevelopment/MYAPP/dtl/curr/deployment/ "
000008, APPOPTS = APPOPTS + "-distributeApp "
000009, APPOPTS = APPOPTS + "-nouseMetaDataFromBinary "
000010, APPOPTS = APPOPTS + "-nodeployejb "
000011, APPOPTS = APPOPTS + "-appname DVL-MYAPP "
000012, APPOPTS = APPOPTS + "-createMBeansForResources "
000013, APPOPTS = APPOPTS + "-noreloadEnabled "
000014, APPOPTS = APPOPTS + "-nodeployws "
000015,APPOPTS = APPOPTS + "-validateinstall warn "
000016,APPOPTS = APPOPTS + "-processEmbeddedConfig "
000017,APPOPTS = APPOPTS + "-filepermission "
000018,APPOPTS = APPOPTS + ".*\.dll=755#.*\.so=755#.*\.a=755#.*\.sl=755 "
000019,APPOPTS = APPOPTS + "-noallowDispatchRemoteInclude "
000020,APPOPTS = APPOPTS + "-noallowServiceRemoteInclude "
000021,APPOPTS = APPOPTS + "-asyncRequestDispatchType DISABLED "
000022,APPOPTS = APPOPTS + "-nouseAutoLink "
000023,APPOPTS = APPOPTS + "-contextroot / "
000024,APPOPTS = APPOPTS + "-MapModulesToServers "
000025,APPOPTS = APPOPTS + " MyApp MyApp.war,WEB-INF/web.xml WebSphere:"
000026,APPOPTS = APPOPTS + "cell=dtl85cel,node=myNode,server=WLEMYAPP "
000028,AdminApp.install(EARFILE, APPOPTS)
000029,AdminConfig.save()

我删除了前导空格,但仍然卡在此消息上:java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: WASX7122 E: 未找到预期的“-”。-nopreCompileJSPs -installed.ear.destination /WebSphereDevelopment/MYAPP/dtl/curr /deployment/ -distributeApp -nouseMetaDataFromBinary -nodeployejb -appname DVL-myApp -createMBeansForResources -noreloadEnabled -nodeployws -validateinstall warn-processEmbeddedConfig -filepermission。.dll=755#。.so=755#。.a=755#。.sl=755 -noallowDispatchRemoteInclude -noallowServiceRemoteInclude -asyncRequestDispatchType 已禁用 -nouseAutoLink -contextroot / -MapModulesToServers MyApp MyApp.war,WEB-INF/web.xml WebSphere:cell=dtl85cel,node=wlemyAppa,server=WLEMYAPP

4

2 回答 2

1

我认为您有缩进问题,请注意第 15 行的前导空格比上面的行少一个。删除前 14 行的前导空格,我认为它会清除。

于 2015-11-08T15:33:26.597 回答
1

和变量从未在您发布的脚本中使用APP_NAME, NODESERVER您可以尝试完全删除它们吗?

一些无效字符可能被放在前一行中。我还假设您放在那里的行号仅供 STO 问题中的参考,如果不是,那么这将是语法错误的原因。

于 2015-11-07T02:36:21.607 回答