Deploy Application war file on Weblogic Managed Server using python script   Leave a comment

Here i will list out the steps to deploy application using python script.

I am using weblogic version 10.3.6 on OEL5.5 OS

Please download the shoppingcart.war here.

Step1:

Create python script deploy.py

2

Step2:

Run the setDomainEnv.sh

1

Step3: Deploy the Application war as below

3

Once we execute we will see the below output

[oracle@weblogic domains]$ java weblogic.WLST deploy.py
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
*** WEBLOGIC : START ***
connecting to admin server....
Connecting to t3://weblogic.localdomain:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.
Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.
stopping and undeploying ....
deploying....
Deploying application from /tmp/shoppingcart.war to targets managedserv1 (upload=false) ...
<Apr 14, 2014 12:22:13 PM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, shoppingcart [archive: /tmp/shoppingcart.war], to managedserv1 .>
.Completed the deployment of Application with status completed
Current Status of your Deployment:
Deployment command type: deploy
Deployment State : completed
Deployment Message : [Deployer:149194]Operation 'deploy' on application 'shoppingcart' has succeeded on 'managedserv1'
Starting application shoppingcart.
<Apr 14, 2014 12:22:18 PM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating start operation for application, shoppingcart [archive: null], to managedserv1 .>
.Completed the start of Application with status completed
Current Status of your Deployment:
Deployment command type: start
Deployment State : completed
Deployment Message : [Deployer:149194]Operation 'start' on application 'shoppingcart' has succeeded on 'managedserv1'
disconnecting from admin server....
Disconnected from weblogic server: AdminServer

Exiting WebLogic Scripting Tool.

<Apr 14, 2014 12:22:21 PM IST> <Warning> <JNDI> <BEA-050001> <WLContext.close() was called in a different thread than the one in which it was created.>
[oracle@weblogic domains]$

We can access the application using url

http://weblogic.localdomain:7003/shoppingcart

As i deployed the application on managed server and the managed server port is 7003.

4

 

Advertisements

Posted April 14, 2014 by balaoracledba.com in Weblogic

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: