Update of Shared Library and re-deployment of Applications Which Use It Giving HTTP-401 Unauthorised Error and Server Restart is Needed

(Doc ID 1959270.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle WebCenter Portal - Version 11.1.1.8.4 and later
Information in this document applies to any platform.

Symptoms

After redeploying a new version of a shared library and its WebCenter Portal application, when accessing the application, an error is displayed.

Error 401--Unauthorized


The URL finally displayed is /TestApplication-Portal-context-root/adfAuthentication?success_url=/faces/jsp/error404.jsp

After restarting the managed server, the application works again.

The requirement was to have minimal downtime while the shared library was being updated.  Restarting the managed server is not acceptable due to the long downtime.


Installation
Issue reproduces intermittently with the following scenario
- 11.1.1.8.4 WCP installation
- 10.3.6.0.8 WLS installation
- Policy & Credential store of the domain in Oracle Database
- Seems to reproduce more consistently when Domain is in PRODUCTION MODE


Steps to reproduce

Do initial deployment
==============
1. Deploy shared libraries sharedLib1war and sharedLib2war using Admin Console
2. Deploy parent_shared_lib.war which references sharedLib1war and sharedLib2war using Admin Console
3. Deploy TestApplication application which references parent_shared_lib.war using EM Console
4. Test access to TestApplication -- eg http://myserver.oracle.com:8892/TestApplication-Portal-context-root
5. Login and logout - all is working fine.

Update the library
===========
6. Increase the parent_shared_lib.war library version by updating MANIFEST.MF within the .war and increasing Implementation-Version
eg change
Implementation-Version: 11.1.21
to
Implementation-Version: 11.1.22
7. In the Admin Console - Deployments choose to 'Lock and Edit'
8. Select parent_shared_lib library and click 'Update'
9. Choose to also redeploy TestApplication application
10. Confirm that the version number is the new one
11. When completed, Activate changes

Test new version
===========
12. Go to http://myserver.oracle.com:8892/TestApplication-Portal-context-root
    If the problem occurs it will redirect to http://myserver.oracle.com:8892/TestApplication-Portal-context-root/adfAuthentication?success_url=/faces/jsp/error404.jsp
    If it works (the problem doesn't occur), it will redirect to http://myserver.oracle.com:8892/TestApplication-Portal-context-root/faces/wcnav_defaultSelection

In both occasions the Admin Server log shows the deployment to be successful :-

Working
####<Nov 6, 2014 11:00:30 AM GMT-00:00> <Info> <J2EE Deployment SPI> <myserver.oracle.com> <AdminServer> <[ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <23dddd3994b362cc:4dc5227d:1497fc30001:-8000-00000000000029f8> <1415271630164> <BEA-260121> <Initiating redeploy operation for application, parent_shared_lib.webapp#11.1.1@11.1.21 [archive: /refresh/home/Desktop/parent_shared_lib.war], to WC_CustomPortal .> 

####<Nov 6, 2014 11:00:41 AM GMT-00:00> <Info> <J2EE Deployment SPI> <myserver.oracle.com> <AdminServer> <[ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <23dddd3994b362cc:4dc5227d:1497fc30001:-8000-00000000000029f8> <1415271641124> <BEA-260121> <Initiating redeploy operation for application, TestApplication_application1 [archive: /refresh/oracle/myserver/user_projects/domains/wc_domain/sysman/upload/deploy/TestApplication_application1/archive/TestApplication_application1.ear], to WC_CustomPortal .>
####<Nov 6, 2014 11:01:39 AM GMT-00:00> <Info> <Deployer> <myserver.oracle.com> <AdminServer> <[ACTIVE] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <23dddd3994b362cc:4dc5227d:1497fc30001:-8000-00000000000029fc> <1415271699584> <BEA-149038> <Initiating Task for TestApplication_application1 : [Deployer:149026]deploy application TestApplication_application1 on WC_CustomPortal.>
####<Nov 6, 2014 11:01:39 AM GMT-00:00> <Info> <Deployer> <myserver.oracle.com> <AdminServer> <[ACTIVE] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <23dddd3994b362cc:4dc5227d:1497fc30001:-8000-00000000000029fc> <1415271699594> <BEA-149038> <Initiating Task for parent_shared_lib.webapp [LibSpecVersion=11.1.1,LibImplVersion=11.1.22] : [Deployer:149117]deploy library parent_shared_lib.webapp [LibSpecVersion=11.1.1,LibImplVersion=11.1.22] on WC_CustomPortal.>

...then after activating changes
####<Nov 6, 2014 11:03:48 AM GMT-00:00> <Info> <Deployer> <myserver.oracle.com> <AdminServer> <[ACTIVE] ExecuteThread: '12' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <23dddd3994b362cc:4dc5227d:1497fc30001:-8000-0000000000002a16> <1415271828251> <BEA-149074> <Successfully completed deployment task: [Deployer:149117]deploy library parent_shared_lib.webapp [LibSpecVersion=11.1.1,LibImplVersion=11.1.22] on WC_CustomPortal.>
####<Nov 6, 2014 11:03:48 AM GMT-00:00> <Info> <Deployer> <myserver.oracle.com> <AdminServer> <[ACTIVE] ExecuteThread: '12' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <23dddd3994b362cc:4dc5227d:1497fc30001:-8000-0000000000002a16> <1415271828251> <BEA-149074> <Successfully completed deployment task: [Deployer:149026]deploy application TestApplication_application1 on WC_CustomPortal.>


Not working
####<Nov 6, 2014 11:08:49 AM GMT-00:00> <Info> <J2EE Deployment SPI> <myserver.oracle.com> <AdminServer> <[ACTIVE] ExecuteThread: '19' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <23dddd3994b362cc:4dc5227d:1497fc30001:-8000-0000000000002a2b> <1415272129039> <BEA-260121> <Initiating redeploy operation for application, parent_shared_lib.webapp#11.1.1@11.1.22 [archive: /refresh/home/Desktop/parent_shared_lib.war], to WC_CustomPortal .>
####<Nov 6, 2014 11:08:59 AM GMT-00:00> <Info> <J2EE Deployment SPI> <myserver.oracle.com> <AdminServer> <[ACTIVE] ExecuteThread: '19' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <23dddd3994b362cc:4dc5227d:1497fc30001:-8000-0000000000002a2b> <1415272139148> <BEA-260121> <Initiating redeploy operation for application, TestApplication_application1 [archive: /refresh/oracle/myserver/user_projects/domains/wc_domain/sysman/upload/deploy/TestApplication_application1/archive/TestApplication_application1.ear], to WC_CustomPortal .>
####<Nov 6, 2014 11:09:54 AM GMT-00:00> <Info> <Deployer> <myserver.oracle.com> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <23dddd3994b362cc:4dc5227d:1497fc30001:-8000-0000000000002a2f> <1415272194940> <BEA-149038> <Initiating Task for TestApplication_application1 : [Deployer:149026]deploy application TestApplication_application1 on WC_CustomPortal.> ####<Nov 6, 2014 11:09:54 AM GMT-00:00> <Info> <Deployer> <myserver.oracle.com> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <23dddd3994b362cc:4dc5227d:1497fc30001:-8000-0000000000002a2f> <1415272194941> <BEA-149038> <Initiating Task for parent_shared_lib.webapp [LibSpecVersion=11.1.1,LibImplVersion=11.1.23] : [Deployer:149117]deploy library parent_shared_lib.webapp [LibSpecVersion=11.1.1,LibImplVersion=11.1.23] on WC_CustomPortal.>

...then after activating changes
####<Nov 6, 2014 11:10:57 AM GMT-00:00> <Info> <Deployer> <myserver.oracle.com> <AdminServer> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <23dddd3994b362cc:4dc5227d:1497fc30001:-8000-0000000000002a3f> <1415272257460> <BEA-149074> <Successfully completed deployment task: [Deployer:149117]deploy library parent_shared_lib.webapp [LibSpecVersion=11.1.1,LibImplVersion=11.1.23] on WC_CustomPortal.>
####<Nov 6, 2014 11:10:57 AM GMT-00:00> <Info> <Deployer> <myserver.oracle.com> <AdminServer> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <23dddd3994b362cc:4dc5227d:1497fc30001:-8000-0000000000002a3f> <1415272257460> <BEA-149074> <Successfully completed deployment task: [Deployer:149026]deploy application TestApplication_application1 on WC_CustomPortal.>

 

The Custom Portal Managed Server access_log looks different when it fails.

Working
11.22.33.44 - - [06/Nov/2014:10:55:11 +0000] "GET /TestApplication-Portal-context-root/ HTTP/1.1" 200 360
11.22.33.44 - - [06/Nov/2014:10:55:11 +0000] "GET /TestApplication-Portal-context-root/faces/wcnav_defaultSelection HTTP/1.1" 200 8295
11.22.33.44 - - [06/Nov/2014:10:55:12 +0000] "GET /TestApplication-Portal-context-root/faces/wcnav_defaultSelection;jsessionid=FUaEvmj074w2M3G7cZK47TqUopdUU9BR624ZXeoKrOOIKu3wQvD5!-955100146?_afrLoop=65240697688899&_afrWindowMode=0&_afrWindowId=null HTTP/1.1" 200 20562
11.22.33.44 - - [06/Nov/2014:10:55:14 +0000] "GET /TestApplication-Portal-context-root/afr/AdfTranslations-11.1.1.7.0-4127en.js?loc=en&skinId=portal.desktop HTTP/1.1" 200 38410
11.22.33.44 - - [06/Nov/2014:10:55:14 +0000] "GET /TestApplication-Portal-context-root/afr/ss.gif HTTP/1.1" 200 14936
11.22.33.44 - - [06/Nov/2014:10:55:14 +0000] "GET /TestApplication-Portal-context-root/adf/styles/cache/portal-desktop-6z8smb-en-ltr-ie-8.0-cmp.css HTTP/1.1" 200 226908
11.22.33.44 - - [06/Nov/2014:10:55:14 +0000] "GET /TestApplication-Portal-context-root/adf/jsLibs/Locale1_2_12_3_3.js HTTP/1.1" 200 11772
11.22.33.44 - - [06/Nov/2014:10:55:14 +0000] "GET /TestApplication-Portal-context-root/afr/partition/ie/n/default/opt/boot-11.1.1.7.0-4127.js HTTP/1.1" 200 305481
11.22.33.44 - - [06/Nov/2014:10:55:14 +0000] "GET /TestApplication-Portal-context-root/afr/partition/ie/n/default/opt/core-11.1.1.7.0-4127.js HTTP/1.1" 200 420395
11.22.33.44 - - [06/Nov/2014:10:55:15 +0000] "GET /TestApplication-Portal-context-root/adf/styles/cache/portal-desktop-6z8smb-en-ltr-ie-8.0-cmp2.css HTTP/1.1" 200 206537

Non working
11.22.33.44 - - [06/Nov/2014:11:11:06 +0000] "GET /TestApplication-Portal-context-root/faces/wcnav_defaultSelection HTTP/1.1" 200 8145
11.22.33.44 - - [06/Nov/2014:11:11:07 +0000] "GET /TestApplication-Portal-context-root/faces/wcnav_defaultSelection?_afrLoop=66195464911699&_afrWindowMode=0&_afrWindowId=17p6dxtpu5_1 HTTP/1.1" 302 453
11.22.33.44 - - [06/Nov/2014:11:11:39 +0000] "GET /TestApplication-Portal-context-root/adfAuthentication?success_url=/faces/jsp/error404.jsp HTTP/1.1" 401 1468


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms