Unable to un-deploy shared library from Integrated Weblogic server.

Problem:

Un-deployment of ADF shared library fails with below exception from WebLogic server.
WLS Version:  12.2.1.3

Error: weblogic.management.ManagementException: [Deployer:149001] [Version=1.1]” <YOUR LIBRARY NAME>  exists for operation “undeploy”


Solution:

1. Stop all the servers, Admin & Managed servers
2. Go to the <MW_HOME>\user_projects\domains\<DOMAIN_NAME>\config
    For eg, my location would be C:\xxxxxxxxxx\system\system12.2.1.3.42.170820.0914\DefaultDomain\config
3. Open the file config.xml (Back up the file)
4. Find your library by name , For example: dmskins
5. Delete the library element in the file.  From <library> to </library>
6. Delete the jar file as mentioned in the <Source-Path>
    For eg, my location would be C:\xxxxxxxxx\system\system12.2.1.3.42.170820.0914\DefaultDomain\servers\DefaultServer\upload\dmSkins\1.1@\app\
7. Restart the Admin and other servers

config.xml

  <library>  
   <name>dmskins#1.1@</name>  
   <target>DefaultServer</target>  
   <module-type>war</module-type>  
   <source-path>servers\DefaultServer\upload\dmSkins\1.1@\app\warDmSkins.war</source-path>  
   <security-dd-model>DDOnly</security-dd-model>  
   <staging-mode xsi:nil="true"></staging-mode>  
   <plan-staging-mode xsi:nil="true"></plan-staging-mode>  
   <cache-in-app-directory>false</cache-in-app-directory>  
  </library>  

Change /faces from ADF application url

There is an easy way to identify ADF production applications from the URL pattern. Most of the ADF applications are using the default configuration for JSF request and response processing and it generates /faces url pattern in application url .

There is an easy way to customize ADF application URL from web.xml file. Below configuration shows the default configuration.

  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern><b>/faces/*</b></url-pattern>
  </servlet-mapping>

And application URL would be http://127.0.0.1:7101/contextpath/faces/Home

Change /faces to your custom name. For eg, I am using /adffaces in my web.xml .

  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/adffaces/*</url-pattern>
  </servlet-mapping>

ADF application URL would be  http://127.0.0.1:7101/contextpath/adffaces/Home