Forgot your password?    
+ Reply to Thread
Results 1 to 1 of 1

Thread: Deploy Application to WebLogic using Weblogic.Deployer , WLST and Ant tool

  1. #1
    Expert Oracle Administrator
    Join Date
    Oct 2011
    Location
    New Delhi, India
    Posts
    427

    Deploy Application to WebLogic using Weblogic.Deployer , WLST and Ant tool

    Deployment using WLST

    deploy(appName, path, [targets], [stageMode], [planPath], [options])

    • appName: Name of the application or stand-alone Java EE module to be deployed
    • path: Name of the application directory, archive file, or root of the exploded archive directory to be deployed
    • targets (optional): Comma-separated list of the target.
    • stageMode (optional): Staging mode for the application that you are deploying.
    • planPath (optional): Name of the deployment plan file.
    • Options (optional): Comma-separated list of deployment options, specified as name/value pairs

    To Deploy , connect to WLST online and then use 'deploy'


    wls:/WLS_DOMAIN/serverConfig> deploy('hello', '/u03/fmwweb/test', 'AdminServer')

    Deploying application from /u03/fmwweb/test to targets AdminServer (upload=false) ...
    <May 18, 2012 2:12:35 AM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, hello [archive: /u03/fmwweb/test], to AdminServer .>
    .Completed the deployment of Application with status completed
    Current Status of your Deployment:
    Deployment command type: deploy
    Deployment State : completed
    Deployment Message : no message

    wls:/WLS_DOMAIN/serverConfig>

    Deployment using weblogic.Deployer



    wls:/WLS_DOMAIN/serverConfig> deploy('myHelloEjb', '/u03/fmwweb/applications', 'AdminServer')
    Deploying application from /u03/fmwweb/applications to targets AdminServer (upload=false) ...
    <May 18, 2012 5:36:55 PM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, myHelloEjb [archive: /u03/fmwweb/applications], to AdminServer .>
    .Completed the deployment of Application with status completed
    Current Status of your Deployment:
    Deployment command type: deploy
    Deployment State : completed
    Deployment Message : no message
    wls:/WLS_DOMAIN/serverConfig>

    Deployment using ant


    Before using ant to deploy your application , source your env by using $WL_HOME/server/bin/setWLSEnv.sh


    Create a build file , which ant will use for the purpose of deployment
    This contains the details of the Admin server , login credentials of weblogic ,and the the application to be deployed

    Here the web application to be deployed is 'hello.war'


    [fmwweb@dbalounge ~]$ cat ./build.xml

    <project name="hello" default="deploy">

    <property name="wls.username" value="weblogic" />

    <property name="wls.password" value="Welcome1" />

    <property name="wls.hostname" value="dbaloungeapps.com" />

    <property name="wls.port" value="7007" />

    <property name="admin.server.name" value="AdminServer" />

    <property name="deploy.target" value="AdminServer" />

    <property name="deploy.name" value="hello" />

    <property name="deploy.source" value="/u03/fmwweb/hello_app/hello.war" />

    <taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDepl oy">

    <classpath>

    <pathelement location="/u03/fmwweb/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar"/>

    </classpath>

    </taskdef>

    <target name="deploy">

    <wldeploy action="deploy" name="${deploy.name}" source="${deploy.source}" user="${wls.username}" nostage="true" password="${wls.password}" verbose="true" adminurl="t3://${wls.hostname}:${wls.port}" targets="${deploy.target}" />

    </target>

    </project>


    Once we have the build.xml , deploy using ant :


    [fmwweb@dbalounge ~]$ ant -f ./build.xml

    Buildfile: ./build.xml

    deploy:

    [wldeploy] weblogic.Deployer -nostage -verbose -noexit -name hello -source /u03/fmwweb/hello_app/hello.war -targets AdminServer -adminurl t3://dbaloungeapps.com:7007 -user weblogic -password ******** -deploy

    [wldeploy] weblogic.Deployer invoked with options: -nostage -verbose -noexit -name hello -source /u03/fmwweb/hello_app/hello.war -targets AdminServer -adminurl t3://dbaloungeapps.com:7007 -user weblogic -deploy

    [wldeploy] <May 31, 2012 11:31:53 PM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, hello [archive: /u03/fmwweb/hello_app/hello.war], to AdminServer .>

    [wldeploy] Task 4 initiated: [Deployer:149026]deploy application hello on AdminServer.

    [wldeploy] Task 4 completed: [Deployer:149026]deploy application hello on AdminServer.

    [wldeploy] Target state: deploy completed on Server AdminServer

    [wldeploy]

    [wldeploy] Target Assignments:

    [wldeploy] + hello AdminServer



    BUILD SUCCESSFUL

    Total time: 2 seconds

    [fmwweb@dbalounge ~]$


+ Reply to Thread

Similar Threads

  1. How to reset Weblogic Administrator Password
    By Hemant in forum Oracle Fusion Middleware 11G - OIM , OAM , ODS , Weblogic , Webgate ..
    Replies: 0
    Last Post: 06-07-2012, 03:56 PM
  2. Weblogic Domain Directory Structure
    By Hemant in forum Oracle Fusion Middleware 11G - OIM , OAM , ODS , Weblogic , Webgate ..
    Replies: 1
    Last Post: 05-09-2012, 01:59 PM
  3. Weblogic Domain 11g Configuration
    By Hemant in forum Oracle Fusion Middleware 11G - OIM , OAM , ODS , Weblogic , Webgate ..
    Replies: 0
    Last Post: 04-19-2012, 09:19 PM
  4. WebLogic Domain
    By Hemant in forum Oracle Fusion Middleware 11G - OIM , OAM , ODS , Weblogic , Webgate ..
    Replies: 0
    Last Post: 04-18-2012, 03:31 AM
  5. Oracle WebLogic Training in Delhi : Online WebLogic Training 11G
    By Hemant in forum Oracle Training Modules - Database RAC RMAN DataGuard GoldenGate Apps FMW Weblogic OAM OIM ODS ..
    Replies: 1
    Last Post: 02-22-2012, 02:03 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

DBA Lounge (P) Ltd. deals in Oracle Technologies on Consulting, Resourcing, Corporate Training


Online and corporate training available on Oracle Database 11g, Oracle 11g Real Application Cluster (RAC), Oracle Applications 11i/R12, Oracle Fusion Middleware 11g, Oracle Identity Management-OIM, Oracle Internet Directory 11g-OID, Oracle Business Intelligence Enterprise Edition-OBIEE, Oracle Golden Gate, Oracle Access Management-OAM, Oracle Internet Directory-ODS, Oracle Identity Analytics Architecture-OIA Statistics