ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Application Server » Trying to update application from command line

Post new topic  Reply to topic
 Trying to update application from command line « View previous topic :: View next topic » 
Author Message
sleepyjamie
PostPosted: Mon Nov 30, 2015 5:12 pm    Post subject: Trying to update application from command line Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Nov 30, 2015 5:40 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
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
View user's profile Send private message Send e-mail
sleepyjamie
PostPosted: Mon Nov 30, 2015 6:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Tue Dec 01, 2015 4:49 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Application Server » Trying to update application from command line
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.