Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove out-of-sync, deleted autodeployed apps from Weblogic

being new to Weblogic, I followed some readme files to deploy apps to Weblogic, by copying the war files to the autodeploy folder. They automatically showed in the Weblogic console, so far so good.

Later, I deleted some of these apps from the autodeploy folder, expecting them to also disappear from the Deployments page. To my surprise, once I started the server, they were still there, and I couldn't remove them either: Weblogic was saying that I needed to delete the wars from the autodeploy folder (!).

Of course, I should have read the documentation first, that states the following:

Auto-Deploying, Redeploying, and Undeploying Archived Applications

To auto-deploy an archived application, copy its archive file to the /autodeploy directory. WebLogic Server automatically sets the application’s deployment mode to stage mode.

A deployment unit that was auto-deployed can be dynamically redeployed while the server is running. To dynamically redeploy, copy the new version of the archive file over the existing file in the /autodeploy directory.

To undeploy an archived deployment unit that was auto-deployed, delete the application from the /autodeploy directory. WebLogic Server stops the application and removes it from the configuration. Note: If you delete an application from the /autodeploy directory when the server is not active, WebLogic Server will not detect that the application was deleted even when the server is again in an active state. In order to prevent an out-of-sync domain tree, BEA recommends that you only remove applications from the /autodeploy directory when the server is in an active state.

Since I've deleted the files while the server was down, they still show up there. What is not in this particular documentation is how to fix it once it's out-of-sync.

like image 656
Tarek Avatar asked Jan 13 '15 15:01

Tarek


People also ask

How do you turn off the auto deployment feature in WebLogic Server?

To undeploy an application that was auto-deployed in exploded format, use the weblogic. Deployer -undeploy command, or use the WebLogic Server Administration Console to remove the deployment configuration. Then remove the application files from the /autodeploy directory.


1 Answers

The answer is quite simple.

  1. Navigate to your Weblogic's domain folder using a File Manager (Windows Explorer or Nautilus, for instance).

  2. Open the config.xml file in the config folder;

  3. Find the apps you've deleted between the <app-deployment> tags.

  4. Remove them from the xml file;

  5. Restart your server.

like image 66
Tarek Avatar answered Sep 22 '22 09:09

Tarek