2015-11-07 49 views
0

我在Unix/Mainframe下面有簡單的jython腳本。我通過touch命令創建了該文件,然後通過UdList對其進行了編輯。我從OMVS shell調用wsadmin stragh。無論我在NODE = xyz中寫什麼,我都會得到下面的錯誤。WsAdmin.sh在第0行返回跟蹤無代碼對象... NODE =

$ 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 DISABLED -nouseAutoLink -contextroot/-MapModulesToServers MyApp的MyApp.war,WEB-INF/web.xml中的WebSphere:細胞= dtl85cel,節點= wlemyAppa,服務器= WLEMYAPP

回答

1

APP_NAME, NODE並且SERVER變量不會在您發佈的腳本中使用。你可以嘗試徹底刪除它們嗎?

有可能一些無效字符被放入前一行。我還假設你放在那裏的行號僅僅是作爲STO問題的參考,如果不是,那麼這將是語法錯誤的原因。

+0

Aguibert,這些數字是在jython文件中找到的數字。行號與這個問題有什麼關係?你知道如果通過「觸摸」命令創建這樣的文件,我會得到一個錯誤的文件格式不被wsadmin接受?我拿出了前三行,因爲他們沒有使用,現在我得到了類似的問題描述,但現在它指向APPOPTS =「 - nopreCompileJSPs」 –

+0

@JimC我只是問行號字符是否字面上在文件或不是 - 它聽起來像你添加他們在這個問題,但更容易參考。 –

1

我認爲你有一個縮進問題,請注意第15行比上面的行少一個空格。刪除前14行上的前導空格,我認爲它會清除。

+0

@JimC這將是一個問題,如果你的文本文件有前14行的前導空格。 –

+0

我刪除了前導空格,但仍然停留在此消息上:java.lang.IllegalArgumentException:java.lang.IllegalArgumentException:WASX7122 E:未找到「 - 」。爲什麼wsadmin.sh通常會抱怨「WASX7122 E:Expected」 - 「找不到」? –