Author |
Message
|
sleepyjamie |
Posted: Mon Nov 30, 2015 5:12 pm Post subject: Trying to update application from command line |
|
|
Centurion
Joined: 29 Apr 2015 Posts: 135
|
I am trying to update an application from the command line using wsadmin and jython. I read the documentation and everything appears to be correct. The command works if I run "wsadmin -lang jython" and within the subshell
AdminApplication.updateApplicationUsingDefaultMerge("myApp", "/tmp/myapp.ear")
However when I try to execute using an inline command I get the following error.
c:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\bin>wsadmin -lang jython -c AdminApplication.updateApplicationUsingDefaultMerge("myApp", "/tmp/myapp.ear")
WASX7209I: Connected to process "server1" on node VM0EYDNMPNode01 using SOAP connector; The type of process is: UnManagedProcess
WASX7411W: Ignoring the following provided option: [/tmp/myapp.ear)]
Traceback (innermost last):
(no code object) at line 0
File "<input>", line 1
SyntaxError: invalid syntax
Any help would be appreciated. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 30, 2015 5:40 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20448 Location: LI,NY
|
I see you are using a -c argument like for a command shell. But is this the appropriate syntax?
Have you tried just using input redirect?
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
sleepyjamie |
Posted: Mon Nov 30, 2015 6:09 pm Post subject: |
|
|
Centurion
Joined: 29 Apr 2015 Posts: 135
|
fjb_saper wrote: |
I see you are using a -c argument like for a command shell. But is this the appropriate syntax?
Have you tried just using input redirect?
Have fun  |
Probably not the correct syntax.
Can you point me to some documentation related to this input redirect. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Dec 01, 2015 4:49 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20448 Location: LI,NY
|
file2 containing WAS jython commands ex
Code: |
AdminApplication.updateApplicationUsingDefaultMerge("myApp", "/tmp/myapp.ear") |
Make sure you end the content with the command to exit jython
file1 containing the call to jython ex
Code: |
wsadmin -lang jython |
actual command line for execution
Code: |
file1 < file2 > file2.log 2>&1 |
Now all you have to do is check the log file file2.log....
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|