WebLogic 11 WLST redeploy behavior

766 views Asked by At

I am trying to setup production redeployment on WebLogic 11 using WLST. Applications, that I am using for that are standard oracle simple applications: http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/14-Redeployment--4465/redeploy.htm

As first, I've deployed simple.war from /tmp/deployversion1/simple.war, and it was deployed successfully. That simple.war has MANIFEST.MF:

Manifest-Version: 1.0
Class-Path: 
Created-By: Bill Bell
Weblogic-Application-Version: v1

Then, I've tried to deploy simple.war with v2 version. It has manifest:

Manifest-Version: 1.0
Class-Path: 
Created-By: Bill Bell
Weblogic-Application-Version: v2

From the Oracle documentation, if manifest has a version inside of it, I may not provide versionIdentifier parameter for deploy/redeploy. And it works for WebLogic 12.

My WLST code, thar doing the redeployment is:

redeploy(appName = 'Simple', appPath = '/tmp/deployversion2/simple.war')

After it I found, that application wasn't deployed, and in weblogic log:

<Dec 21, 2016 3:11:07 PM PST> <Error> <Deployer> <BEA-149091> <An attempt was made to deploy application 'Simple' with specified archive version 'v1'. However, the application archive as specified in the source has version 'v2'.>

But if I doing redeploy this way(versionIdentifier provided), it works fine:

redeploy(appName = 'Simple', appPath = '/tmp/deployversion2/simple.war', versionIdentifier='v2')

Also, it works if I doing deploy again, even without version:

deploy(appName = 'Simple', appPath = '/tmp/deployversion2/simple.war')

And, finally, it works if application is being deployed with weblogic.Deployer:

java weblogic.Deployer -adminurl http://localhost:7001 -user weblogic -password ******** -redeploy -source /tmp/deployversion2/simple.war -name Simple

So, I have few questions about it.

1) How can I do production redeployment using WLST for WebLogic 11 and WebLogic 12 with one script?

2) Why WLST redeploy fails, but weblogic.Deployer -redeploy works fine, if parameters are the same?

3) What the difference between deploy and redeploy, if deploy result for WebLogic 12 is exactly the same as redeploy result?

4) Can I use for WebLogic 11 deploy() instead of redeploy() to avoid BEA-149091 error?

Thanks.

0

There are 0 answers