0

I have the simple jython script below on Unix/Mainframe. I created the file via touch command and then I edited it via UdList. I am calling wsadmin stragh from OMVS shell. No matter what I write in NODE = xyz I always get the error below.

$ 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()

I removed the leading spaces but I am still stuck on this message: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: WASX7122 E: Expected "-" not found. -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:cell=dtl85cel,node=wlemyAppa,server=WLEMYAPP

Andy Guibert
  • 41,446
  • 8
  • 38
  • 61
Jim C
  • 3,957
  • 25
  • 85
  • 162

2 Answers2

1

The APP_NAME, NODE and SERVER variables are never used in the script you posted. Can you try removing them completely?

It's possible that some invalid chars are getting put in the previous line. I'm also assuming the line numbers you put there are just for reference in the STO question, if not, then that would be the cause of the syntax errors.

Andy Guibert
  • 41,446
  • 8
  • 38
  • 61
  • Aguibert, the numbers are exact the ones found in jython file. What does the line numbers have related to the issue? Do you know if by creating such file via "touch" command I would get a wrong file format not accepted by wsadmin? I took out the first three lines as they weren't used and now I get the exact similiar issue description but now it is pointing to APPOPTS = " - nopreCompileJSPs " – Jim C Nov 07 '15 at 17:59
  • @JimC I was merely asking if the line number chars were literally in the file or not -- it sounds like you added them for easier reference in this question though. – Andy Guibert Nov 08 '15 at 18:07
1

I think you have an indention problem, note that line 15 has one less leading space than the lines above. Remove the leading spaces on the first 14 lines and I think it will clear up.

Bruce T.
  • 992
  • 4
  • 5
  • @JimC this would be an issue if your text file had leading spaces for the first 14 lines. – Andy Guibert Nov 08 '15 at 18:10
  • I removed the leading spaces but I am still stuck on this message: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: WASX7122 E: Expected "-" not found. Why does wsadmin.sh usually complain about "WASX7122 E: Expected "-" not found"? – Jim C Nov 09 '15 at 18:17