0
votes

I am trying to redeploy the war through command line. I am trying this:

java -classpath "C:/bea/weblogic12c/wlserver_12.1/server/lib/weblogic.jar" weblogic.Deployer -adminurl t3://localhost:7101 -user username -password password -upload -redeploy -name myapp -source myApp.war -targets myServer

But, It does not work and I am getting this error:

[java] Target state: redeploy failed on Server myServer [java] weblogic.management.DeploymentException: Applicationmyapp is a WAR file, but it contains > 1 component.

I dont want to undeploy and deploy again. Is there a way to deploy/redeploy without undeploy? Thanks.

2

2 Answers

0
votes

It has been my experience that the redeploy will work with only EAR files. For WAR files, I have always had to redeploy in two steps (undeploy and deploy separately) when using the command line.

0
votes

Same error with weblogic.WSLT (the richer scripting tool) using here the command:

wls:/mydomain/serverConfig> redeploy ('myWebApplication')

...but if you supply an explicit appPath option on the redeploy command line, it works! e.g.

wls:/mydomain/serverConfig> redeploy ('myWebApplication', appPath='/wl/deploy/myWebApp-1.0.war')