Search This Blog

Saturday, 27 October 2012

WLST (weblogic scripting tool)

Wlst is a kind of scripting tool which is a combination of jython language.  If you want to edit manged server name or some port number or you want to add  cluser or you want to configure jdbc or you  want to configure jms . How exactly we can do? By using only admin console.  By editing config.xml.  Apart from that ......  We can create and we can work with our domain using WLST.
We can work with any of these components using wlst . This wlst is like your admin console but instead of woking with console we will work with commands. Some times for security reasons console might be disabled in some environments.
What is wlst? 
Different modes of wlst?
What are the features of wlst?
 Diff b/w offline and online modes?
 Advantages of wlst ?  
MBean Architecture? 
How to create a domain using wlst?
Wlst is used only for weblogic server. Python is a oops language. Jython is Embedded scripting language. Wlst is a combination of both python and jython. Basically the syntax is python and it is embedded with jython.
      The WebLogic Scripting Tool (WLST) is a command-line scripting environment that you can use to create, manage, and monitor WebLogic Server domains. It is based on the Java scripting interpreter, Jython. 
 In addition to supporting standard Jython features such as local variables, conditional variables, and flow control statements, WLST provides a set of scripting functions (commands) that are specific to WebLogic Server. 
You can use WLST as the command-line equivalent to the WebLogic Server Administration Console (WLST online) or as the command-line equivalent to the Configuration Wizard (WLST offline).
Three types of modes : 1) Interactive mode. 2) Scripting 3) Embedded.    
Interactive mode: In which you enter a command and view the response at a command-line prompt, is useful for learning the tool, prototyping command syntax, and verifying configuration options before building a script. Using WLST interactively is particularly useful for getting immediate feedback after making a critical configuration change. The WLST scripting shell maintains a persistent connection with an instance of WebLogic Server..
Script Mode: Scripts invoke a sequence of WLST commands without requiring your input, much like a shell script. Scripts contain WLST commands in a text file with a .py file extension, for example, filename.py. You use script files with the Jython commands for running script.
Embedded mode, you instantiate the WLST interpreter in your Java code and use it to run WLST commands and scripts. All WLST commands and variables that you use in interactive and script mode can be run in embedded mode.  We don’t use this mode generally.
To invoke the wlst go to /bea/weblogic91/common/bin /wlst.cmd  and execute wlst.cmd      
Executing WLST Script file:

1. java weblogic.WLST filePath.py

2. java weblogic.WLST Initializing WebLogic Scripting Tool (WLST) ... ...  
wls:/(offline)> execfile(‘/home/example.py') starting the script ...           

 
WLST- Online/Offline
You can use WLST as the command-line equivalent to the WebLogic Server Administration Console (WLST online) or as the command-line equivalent to the Configuration Wizard (WLST offline).
Online: You can use WLST to connect to a running Administration Server and manage the configuration of an active domain, view performance data about resources in the domain, or manage security data (such as adding or removing users). You can also use WLST to connect to Managed Servers, but you cannot modify configuration data from Managed Servers.
Offline: Without connecting to a running WebLogic Server instance, you can use WLST to create domain templates, create a new domain based on existing templates, or extend an existing, inactive domain. You cannot use WLST offline to view performance data about resources in a domain or modify security data (such as adding or removing users).                                              
Display help information for WLST commands by entering the help command:
help(‘online’)
help(‘offline’)
wls:/offline> help()
WLST is a command line scripting tool to configure and administer WebLogic Server.
Try: help('all') List all WLST commands available.
help('browse') List commands for browsing the hierarchy.
help('common') List the most commonly used commands.
help('control') List commands for controlling the domain/server.
help('deployment') List commands for deploying applications.
help('diagnostics') List commands for performing diagnostics.
help('editing') List commands for editing the configuration.
help('information') List commands for displaying information.
help('lifecycle') List commands for managing life cycle.
help('nodemanager') List commands for using Node Manager.
help('offline') List all offline commands available.
help('online') List all online commands available.
help('storeadmin') List all store admin commands.
help('trees') List commands use to navigate MBean hierarchy.
help('variables') List all global variables available.
Features -Advantages

Easily move resources from one Domain to another
Make reliable changes to config.xml without a running server
Use WLST in conjunction with any java utility tools (e.g. ant, jython scripts)
Extend WLST to add any Custom commands
WLST helps in retrieving MBeans names in a similar fashion to navigating
hierarchy of files in a file system.
Configuration MBean Hierarchy

Configuration MBean Hierarchy
Domain MBean (root)
|---MBeantype (LogMBean)
|---MBeaninstance (medrec)
|---MBeanattributes & operations (e.g. FileName)
|---MBeantype (SecurityConfigurationMBean)
|---MBeantype (ServerMBean)
|---MBeaninstance (ManagedServer1)
|---MBeanattributes & operations (e.g.AutoRestart)
When WLST first connects to an instance of WebLogic Server, cmo is initialized to the root of all configuration management objects: DomainMBean.MBean type, the value of cmo reflects the parent MBean.
MBean name, gives the name of the mbean object.

Edit Configuration MBeans
DomainMBean root contains editable copy of all configuration MBeans in the domain. The “change management process” controls distributing configuration changes in a domain representing a DB transactionedit()- used to create, delete, get, set, invoke
startEdit() - initiates modifications that are treated as a part of a batch change that is not committed to the repository until you enter the save command.
validate() - ensures that changes are valid before saving
save() - saves your changes to a pending version
activate() - initiates the distribution of the changes and releases the loc
stopEdit() - stops the current editing session and releases edit lock.
isRestartRequired(‘true’) - determines if a change made to an MBean attribute requires re-start 




Deployment using WLST.

deploy.py

print '***********************************************************************'
connect('weblogic','weblogic','t3://localhost:7001')
print '***********************************************************************'
edit()
print '***********************************************************************'
startEdit()
print '***********************************************************************'
print '***********************************************************************'
deploy('benefits','/home/application/benefits.war',targets="ms1,ms2")
print '***********************************************************************'
save()
print '***********************************************************************'
activate()
print '***********************************************************************'
disconnect()

Undeploying Application using wlst

./wlst.sh undeploy.py

connect('weblogic','weblogic','t3://localhost:8001')
print "undeploying application........."
undeploy('benefits')
print "........................."
disconnect()
exit()

Deployed Application status using wlst

print "deployed application status"
connect('weblogic','weblogic','t3://localhost:8001')
print "**************Deployed application status****************"
ls('AppDeployments')
print "*********************************************************"
disconnect()
exit()

Creating Domain using WLST

print "Reading existing domain....."
readDomain('/home/bea/user_projects/domains/prod_domain')
print "Writing the existing domain into template file...."
writeTemplate('/home/bea/user_projects/domains/prod_new_domain.jar')
print "closing the Domain ..........."
closeDomain()
print "Creating new domain with newly created template file.............."
createDomain('/home/bea/user_projects/domains/prod_new_domain.jar','/home/bea/user_projects/domains/prod_new_domain','weblogic','weblogic')

Checking the server health using WLST

connect('weblogic','weblogic','t3://localhost:7001')
domainRuntime()
cd('ServerRuntimes')
servers=domainRuntimeService.getServerRuntimes()
for server in servers:
        serverName=server.getName();
        print '**************************************************\n'
        print '##############   ',serverName,    '###############'
        print '**************************************************\n'
        print '##### Server State           #####', server.getState()
        print '##### Server ListenAddress   #####', server.getListenAddress()
        print '##### Server ListenPort      #####', server.getListenPort()
        print '##### Server Health State    #####', server.getHealthState()


exit()


Starting admin server using Nodemanger/ From remote location

Open nodemanager.properties file which is located at /home/bea/weblogic91/common/nodemanager  and change the below entry
SecureListener=false

Loging to console : Navigate to Machines->Machine-1->Node Manager-> Type : Plain




Step 1) cd /home/bea/weblogic92/common/bin
           ./wlst.sh
Step 2) Start Node manager :
           i) /home/bea/weblogic92/server/bin/startNodeManager.sh
            or
           ii)  startNodeManager(verbose='true', NodeManagerHome='/home/bea/weblogic92/common/nodemanager',ListenPort='5556', ListenAddress='localhost')
Step 3) Connect to Nodemanager
        wls:/offline> nmConnect('weblogic', 'weblogic', 'localhost', '5556', 'dev_domain','/home/bea/user_projects/domains/dev_domain','plain')
Connecting to Node Manager ...
Successfully Connected to Node Manager.

Step 4) start AdminServer
     wls:/nm/dev_domain>  prps = makePropertiesObject('weblogic.ListenPort=7001')
wls:/nm/dev_domain>  nmStart('AdminServer',props=prps)
Starting server AdminServer ...
Successfully started server AdminServer ...

Checking the server status using nodemanager


wls:/nm/dev_domain> nmServerStatus('AdminServer')

RUNNING


To Kill server using Nodemanager

wls:/nm/dev_domain> nmKill('AdminServer')
Killing server AdminServer ...
Successfully killed server AdminServer ...


To check nodemanager version

wls:/nm/dev_domain> nmVersion()
The Node Manager version that you are currently connected to is 9.2.3.0.

To stop nodemanger

stopNodeManager()

Disconnect from nodemanger


nmDisconnect()


Creating users and assigning to groups (usercreation.py)


connect('weblogic','weblogic','t3://localhost:7001')
serverConfig()
cd('/SecurityConfiguration/base_domain/Realms/myrealm/AuthenticationProviders/DefaultAuthenticator')
cmo.createUser('pavan','pavan123',"")
cmo.addMemberToGroup('Administrators','pavan')
disconnect()
exit()

Changing password for existing user (passwordchange.py)

DomainName = "base_domain"

ADMINUrl = "t3://localhost:7001"

ADMINUser = "pavan"

oldPassword = "pavan123"

newPassword = "pavan456"

print  '*****************'
connect(ADMINUser,oldPassword,ADMINUrl)

cd('/SecurityConfiguration/'+DomainName+'/Realms/myrealm/AuthenticationProviders/DefaultAuthenticator')

cmo.resetUserPassword(ADMINUser,newPassword)

print  '*****************'

disconnect()

print '*** connecting with new password***......................................'


connect(ADMINUser,newPassword,ADMINUrl)


How to delete a message from JMS queue

connect('weblogic', 'weblogic', 't3://localhost:7003')
serverRuntime()
cd('/JMSRuntime/MS1.jms/JMSServers/dizzyworldJMSServer/Destinations/DizzyworldJMSModule!dizzyworldqueue')
cmo.deleteMessages('')



  

HR Round Interview


                                                                   
                                             
http://www.careerride.com/hr-interview-questions-for-experienced.aspx

a career progression and how much you enjoy taking up new challenges

how your skills, experience and personal qualities fit into the requirements of this particular position. 

every new job needs a person to do something new and you have an ability to grasp new things quickly. Back this up with an 
example from your last job. 

say that competition and new challenges motivate you at work.

#########
The reasons for switching the job could be numerous. The best answer to offer for this question is to say, “for better prospects”.

Now they can ask you another question, what do you mean by better prospects? To this you can say, better prospects in terms of 
experience, and exposure. 


say something like, “Over last 8 months a lot of restructuring was going on in the company and 40 positions became surplus. One of them was mine 
but I have learnt a lot during my tenure at XYZ company and I am sure I can add a lot of value to a position like the one we are discussing about”. 

#######

I can adjust very well in a team but if required to work alone with more responsibility on some project, I can handle that also very effectively. 


#########


can say that, I know the job well and I have the qualities which need me to lead here. I believe I am ready to take a more challenging and 
responsible role than the one I am currently playing. 

#########

can say that your style of management is situational. 

########

can say that your work style is performance oriented and you love to enjoy the work.

#########

I will try to establish the reasons for non-performance of the team and eradicate them. 

##########

I should be comfortable with something in the range of 7 to 8 lakhs.

#########

can answer this question by saying that you will discuss the issue with your senior and ask his views on your growth in the present job and 
if you see that there is a potential to grow in the present job, you will stick otherwise you will politely inform him about your decision to move ahead in life.  

########

Ant Script deployment in weblogic 10.3

Step 1:Create build.xml file


<project name="testapp" default="deploy">
<property name="wls.username" value="weblogic"/>
<property name="wls.password" value="weblogic"/>
<property name="wls.hostname" value="localhost"/>
<property name="wls.port" value="7001"/>
<property name="admin.server.name" value="AdminServer"/>
<property name="deploy.targets" value="ms1,ms2"/>
<property name="deploy.name1" value="jsf"/>
<property name="deploy.name2" value="jstl"/>
<property name="deploy.name3" value="bstr"/>
<property name="deploy.name4" value="medrec"/>
<property name="deploy.name5" value="physician"/>
<property name="deploy.source.jsf" value="C:\bea\wlserver_10.3\common\deployable-libraries\jsf-1.2.war"/>
<property name="deploy.source.jstl" value="C:\bea\wlserver_10.3\common\deployable-libraries\jstl-1.2.war"/>
<property name="deploy.source.browserstarter" value="C:\bea\wlserver_10.3\samples\server\medrec\modules\browser-starter\target\browser-starter.war"/>
<property name="deploy.source.medrec" value="C:\bea\wlserver_10.3\samples\server\medrec\modules\medrec\assembly\target\medrec.ear"/>
<property name="deploy.source.physician" value="C:\bea\wlserver_10.3\samples\server\medrec\modules\physician\assembly\target\physician.ear"/>
<taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy">
<classpath>
<pathelement location="C:\bea\wlserver_10.3\server\lib\weblogic.jar"/>
</classpath>
</taskdef>
<target name="deploy">

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

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

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

<wldeploy action="deploy"
        name="${deploy.name3}"
        source="${deploy.source.browserstarter}"
        user="${wls.username}"
       nostage="true"
        password="${wls.password}"
        verbose="true"
        library="false"
        adminurl="t3://${wls.hostname}:${wls.port}"
        targets="${deploy.targets}"/>
 </target>
<target name="undeploy">
<wldeploy action="undeploy"
        name="${deploy.name5}"
        failonerror="false"
         user="${wls.username}"
         password="${wls.password}"
         verbose="true"
         adminurl="t3://${wls.hostname}:${wls.port}"
targets="${deploy.targets}"/>
<wldeploy action="undeploy"
        name="${deploy.name4}"
        failonerror="false"
        user="${wls.username}"
        password="${wls.password}"
        verbose="true"
        adminurl="t3://${wls.hostname}:${wls.port}"
        targets="${deploy.targets}"/>
<wldeploy action="undeploy"
        name="${deploy.name3}"
        failonerror="false"
        user="${wls.username}"
       password="${wls.password}"
       verbose="true"
       adminurl="t3://${wls.hostname}:${wls.port}"
       targets="${deploy.targets}"/>
<wldeploy action="undeploy"
        name="${deploy.name2}"
        failonerror="false"
        user="${wls.username}"
        password="${wls.password}"
        verbose="true"
        adminurl="t3://${wls.hostname}:${wls.port}"
      targets="${deploy.targets}"/>
<wldeploy action="undeploy"
        name="${deploy.name1}"
        failonerror="false"
        user="${wls.username}"
        password="${wls.password}"
        verbose="true"
       adminurl="t3://${wls.hostname}:${wls.port}"
       targets="${deploy.targets}"/>
</target>
</project>

Step 2: Set the classpath
 Execute setDomainEnv.sh script.

Step3: Execute the below command for deployment

ant -f build.xml deploy

Step4: Execute the below command for undeploying the application

ant -f build.xml undeploy



Thursday, 25 October 2012

java weblogic.Deployer command line utility


Syntax:
java weblogic.Deployer [options]  [-deploy|-redeploy|-undeploy|-start|-stop|-listapps]    [file(s)]
Weblogic.Deployer used to perform various deployment tasks
1.Deploy an application: we can deloy an application by using weblogic.Deployer utility.
To deploy a new application:
Java weblogic.Deployer –adminurl t3://localhost:7001 –username system –password weblogic  -name app –source  /myapp/app.ear –targets server1,server2 –deploy
2.Redeploy an application: weblogic.Deployer allows us to redeploy an entire application or a part of application.
To redeploy an application:
Java weblogic.Deployer –adminurl t3://localhost:7001 –username system –password weblogic –name app –redeploy
To redeploy a part of application:
Java weblogic.Deployer –adminurl t3://localhost:7001 –username system –password weblogic –targets server1,server2
 –redeploy jsps/*.jsp
3.Undeploy an application: Utility allows to undeploy an application.
To undeploy an application:
Java weblogic.Deployer –adminurl t3://localhost:7001 –username system –password weblogic –name app –undeploy
targets –server1,server2
4.Listing deployment applications and tasks: Deployer utility can list the all deployed applications and tasks.
To list all deployed applications:
Java weblogic.Deployer –adminurl t3://localhost:7001 –username system –password weblogic –listapps
To list all deployment tasks:
Java weblogic.Deployer –adminurl t3://localhost:7001 –username system –password weblogic –listtask
4.cancel a deployment task: You can cancel a deployment task using Deployer utility.
To cancel a deployment task:
Java weblogic.Deployer –adminurl t3://localhost:7001 –username system –password weblogic –cancel id tag
Examples:
1.Deploy an application:

java weblogic.Deployer -adminurl t3://localhost:7001 -username weblogic -password weblogic1 -name benefits -source c:\student\course\labs\Lab08\exercise\applications\benefits.war -targets ms1,ms2,ms3 -deploy


Output:


weblogic.Deployer invoked with options:  -adminurl t3://localhost:7001 -username weblogic -name benefits -source c:\student\course\labs\Lab08\exercise\applications\benefits.war -targets ms1,ms2,ms3 -deploy
<Oct 25, 2012 11:04:22 AM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, benefits [archive: c:\student\course\labs
\Lab08\exercise\applications\benefits.war] , to ms1 ms2 ms3 .>


Task 6 initiated: [Deployer:149026]deploy application benefits on ms1,ms3,ms2.
Task 6 completed: [Deployer:149026]deploy application benefits on ms1,ms3,ms2.
Target state: deploy completed on Server ms1
Target state: deploy completed on Server ms3
Target state: deploy completed on Server ms2

2.Redeploy an application:

java weblogic.Deployer -adminurl t3://localhost:7001 -username weblogic -password weblogic1 -name benefits -redeploy

Output:

weblogic.Deployer invoked with options:  -adminurl t3://localhost:7001 -username weblogic -name benefits -redeploy
<Oct 25, 2012 11:21:57 AM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating redeploy operation for application, benefits [archive: null], to configured targets.>


Task 9 initiated: [Deployer:149026]redeploy application benefits on ms1,ms3,ms2.
Task 9 completed: [Deployer:149026]redeploy application benefits on ms1,ms3,ms2.
Target state: redeploy completed on Server ms1
Target state: redeploy completed on Server ms3
Target state: redeploy completed on Server ms2

3.Undeploy an application:

java weblogic.Deployer -adminurl t3://localhost:7001 -username weblogic -password weblogic1 -name benefits -undeploy


Output:
weblogic.Deployer invoked with options:  -adminurl t3://localhost:7001 -username weblogic -name benefits -undeploy
<Oct 25, 2012 11:14:54 AM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating undeploy operation for application, benefits [archive: null], to configured targets.>
Task 7 initiated: [Deployer:149026]remove application benefits on ms1,ms3,ms2.
Task 7 completed: [Deployer:149026]remove application benefits on ms1,ms3,ms2.
Target state: undeploy completed on Server ms1
Target state: undeploy completed on Server ms3
Target state: undeploy completed on Server ms2

4. Listing deployment applications:

java weblogic.Deployer -adminurl t3://localhost:7001 -username weblogic -password weblogic1 -listapps


Output:

weblogic.Deployer invoked with options:  -adminurl t3://localhost:7001 -username weblogic -listapps

benefits
Number of Applications Found : 1

5. Listing deployment tasks:
java weblogic.Deployer -adminurl t3://localhost:7001 -username weblogic -password weblogic1 -listtask

Output:
weblogic.Deployer invoked with options:  -adminurl t3://localhost:7001 -username weblogic -listtask


Task 1 completed: [Deployer:149026]stop application benefits on cl1.
Target state: listtask completed on Cluster cl1
Task 2 completed: [Deployer:149026]start application benefits on cl1.
Target state: listtask completed on Cluster cl1
Task 3 completed: [Deployer:149026]stop application benefits on cl1.
Target state: listtask completed on Cluster cl1
Task 5 failed: [Deployer:149026]deploy application benefits on ms1,ms3,ms2.
Target state: listtask failed on Server ms1
weblogic.management.DeploymentException: [Deployer:149258]Server failed to remove the staged files 'C:\bea\user_projects\domains\wlg_domain\servers\ms1\stage\benefits\benefits.war' for application 'benefits' completely. Check the directory and make sure no other application using this directory. This will result in inappropriate results when this server gets partitioned and trying to deploy this application.


Target state: listtask failed on Server ms3
weblogic.management.DeploymentException: [Deployer:149258]Server failed to remove the staged files 'C:\bea\user_projects\domains\wlg_domain\servers\ms3\stage\benefits\benefits.war' for application 'benefits' completely. Check the directory and make sure no other application using this directory. This will result in inappropriate results when this server gets partitioned and trying to deploy this application.
Target state: listtask failed on Server ms2
weblogic.management.DeploymentException: [Deployer:149258]Server failed to remove the staged files 'C:\bea\user_projects\domains\wlg_domain\servers\ms2\stage\benefits\benefits.war' for application 'benefits' completely. Check the directory and make sure no other application using this directory. This will result in inappropriate results when this server gets partitioned and trying to deploy this application.
Task 6 completed: [Deployer:149026]deploy application benefits on ms1,ms3,ms2.
Target state: listtask completed on Server ms1
Target state: listtask completed on Server ms3
Target state: listtask completed on Server ms2
Task 7 completed: [Deployer:149026]remove application benefits on ms1,ms3,ms2.
Target state: listtask completed on Server ms1
Target state: listtask completed on Server ms3
Target state: listtask completed on Server ms2
Task 8 completed: [Deployer:149026]deploy application benefits on ms1,ms3,ms2.
Target state: listtask completed on Server ms1
Target state: listtask completed on Server ms3
Target state: listtask completed on Server ms2
Task 9 completed: [Deployer:149026]redeploy application benefits on ms1,ms3,ms2.
Target state: listtask completed on Server ms1
Target state: listtask completed on Server ms3
Target state: listtask completed on Server ms2


Errors:

Java weblogic.Deployer -adminurl t3://localhost:7001 -username weblogic -password weblogic1 -name benefits -source C:\student\course\labs\Lab08\exercise\applications\benefits.war -targets ms1,ms2,ms3 -deploy

Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/Deployer
SOL:

Set the class path.

C:\bea\user_projects\domains\wlg_domain\bin>setDomainEnv.cmd


Error:


java weblogic.Deployer -adminurl t3://localhost:7001 -username weblogic -password weblogic1 -name benefits -source  C:\student\course\labs\Lab08\exercise\applications\benefits.war -targets ms1,ms2,ms3 -deploy


weblogic.Deployer invoked with options:  -adminurl t3://localhost:7001 -username
 weblogic ûpassword weblogic1 -name benefits ûsource C:\student\course\labs\Lab0
8\exercise\applications\benefits.war -targets ms1,ms2,ms3 -deploy
No source specified for operation
Sol: 

Check the source parameter and correct it.

Error:


java weblogic.Deployer -adminurl t3://localhost:7001 -username weblogic -password weblogic1 -name benefits -source c:\student\course\labs\Lab08\exercises\applications\benefits.war -targets ms1,ms2,ms3 -deploy


weblogic.Deployer invoked with options:  -adminurl t3://localhost:7001 -username
 weblogic -name benefits -source c:\student\course\labs\Lab08\exercises\applicat
ions\benefits.war -targets ms1,ms2,ms3 -deploy
The file, 'c:\student\course\labs\Lab08\exercises\applications\benefits.war', does not exist.


Sol:


Check the source file path and correct it.
Error:
java weblogic.Deployer -adminurl t3://localhost:7001 -username weblogic -password weblogic1 -name benefits -source c:\student\course\labs\Lab08\exercise\applications\benefits.war -targets ms1,ms2,ms3 -deploy


weblogic.Deployer invoked with options:  -adminurl t3://localhost:7001 -username
 weblogic -name benefits -source c:\student\course\labs\Lab08\exercise\applicati
ons\benefits.war -targets ms1,ms2,ms3 -deploy
<Oct 25, 2012 10:58:39 AM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initia
ting deploy operation for application, benefits [archive: c:\student\course\labs
\Lab08\exercise\applications\benefits.war], to ms1 ms3 ms2 .>
Task 5 initiated: [Deployer:149026]deploy application benefits on ms1,ms3,ms2.
Task 5 failed: [Deployer:149026]deploy application benefits on ms1,ms3,ms2.
Target state: deploy failed on Server ms1
weblogic.management.DeploymentException: [Deployer:149258]Server failed to remove the staged files 'C:\bea\user_projects\domains\wlg_domain\servers\ms1\stage\benefits\benefits.war' for application 'benefits' completely. Check the directory and make sure no other application using this directory. This will result in inappropriate results when this server gets partitioned and trying to deploy this application.
Target state: deploy failed on Server ms3
weblogic.management.DeploymentException: [Deployer:149258]Server failed to remove the staged files 'C:\bea\user_projects\domains\wlg_domain\servers\ms3\stage\benefits\benefits.war' for application 'benefits' completely. Check the directorand make sure no other application using this directory. This will result in inappropriate results when this server gets partitioned and trying to deploy this application.
Target state: deploy failed on Server ms2
weblogic.management.DeploymentException: [Deployer:149258]Server failed to remov
e the staged files 'C:\bea\user_projects\domains\wlg_domain\servers\ms2\stage\be
nefits\benefits.war' for application 'benefits' completely. Check the directory
and make sure no other application using this directory. This will result in ina
ppropriate results when this server gets partitioned and trying to deploy this a
pplication.
Sol:
Remove the application from the staging directory and try deploying the application.
Staging path:
C:\bea\user_projects\domains\wlg_domain\servers\ms1\stage\benefits\benefits.war'
C:\bea\user_projects\domains\wlg_domain\servers\ms2\stage\benefits\benefits.war'
C:\bea\user_projects\domains\wlg_domain\servers\ms3\stage\benefits\benefits.war'