ERROR: java.lang.ClassNotFoundException: oracle.adf.share.http.ServletADFContext on CCB startup, help button not working (Doc ID 2169605.1)

Last updated on DECEMBER 13, 2016

Applies to:

Oracle Utilities Customer Care and Billing - Version 2.5.0.2.0 and later
Information in this document applies to any platform.

Symptoms

On : 2.5.0.2.0 version

ACTUAL BEHAVIOR
---------------
After upgrading an instance with Oracle Help for Web (OHW) from CCB 2.5.0.1.0 / FW 4.3.0.1.0 to CCB 2.5.0.2.0 / FW 4.3.0.2.0, you will find that patch 21784370, which added adf-share-support-12.1.3.0.41.jar to $SPLEBASE/etc/lib is removed.  As a result, the following error will return when starting the application when tailing the weblogic_current.log:
_______________________________________________________________


java.lang.NoClassDefFoundError: oracle/adf/share/logging/handler/InternalADFHandler
May 12, 2016 3:58:12 PM oracle.adf.view.rich.webapp.AdfFacesCachingFilter init
SEVERE:
java.lang.RuntimeException: class weblogic.servlet.internal.WebAppServletContext
at oracle.adf.share.ADFContext.initADFContext(ADFContext.java:2674)
at oracle.adfinternal.view.faces.caching.filter.AdfFacesCachingFilterImpl.init(AdfFacesCachingFilterImpl.java:66)
at oracle.adf.view.rich.webapp.AdfFacesCachingFilter.init(AdfFacesCachingFilter.java:38)
at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterManager.java:374)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.FilterManager.initFilter(FilterManager.java:125)
at weblogic.servlet.internal.FilterManager.loadFilter(FilterManager.java:88)
at weblogic.servlet.internal.FilterManager.preloadFilters(FilterManager.java:68)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1844)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2876)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1661)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:823)
at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:360)
at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:356)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:138)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:216)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:211)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:73)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:24)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:226)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:418)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:210)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:118)
at weblogic.server.AbstractServerService.postConstruct(AbstractServerService.java:78)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.glassfish.hk2.utilities.reflection.ReflectionHelper.invoke(ReflectionHelper.java:1017)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:388)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:430)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2488)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:606)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:231)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:254)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:413)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2488)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Caused by: java.lang.ClassNotFoundException: oracle.adf.share.http.ServletADFContext
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:357)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:318)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:80)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:186)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:50)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at oracle.adf.share.common.ClassUtils.forName(ClassUtils.java:53)
at oracle.adf.share.ADFContext.initADFContext(ADFContext.java:2580)
... 67 more
_______________________________________________________________


Manually adding adf-share-support.jar back to $SPLEBASE/etc/lib, will fix the above error, but will cause the help button in the instance to malfunction, displaying a blank page instead of help.  In addition, the following will be seen in the logs:
_______________________________________________________________
SEVERE: java.lang.NoClassDefFoundError: Could not initialize class oracle.adf.share.config.ADFConfigFactory$InstanceHolder
javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class oracle.adf.share.config.ADFConfigFactory$InstanceHolder
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:387)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at oracle.help.web.rich.OHWFilter.doFilter(OHWFilter.java:375)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:502)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:502)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:327)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:229)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3436)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3402)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class oracle.adf.share.config.ADFConfigFactory$InstanceHolder
at oracle.adf.share.config.ADFConfigFactory.getInstance(ADFConfigFactory.java:91)
at oracle.adf.share.config.ADFConfigFactory.findOrCreateADFConfig(ADFConfigFactory.java:86)
at oracle.adf.share.config.ADFConfigFactory.findOrCreateADFConfig(ADFConfigFactory.java:64)
at oracle.adf.share.ADFContext.getADFConfigEx(ADFContext.java:1029)
at oracle.adf.share.ADFContext.getADFConfig(ADFContext.java:978)
at oracle.adfinternal.view.faces.rewrite.config.AdfRewriteConfigParser.getUriRewriter(AdfRewriteConfigParser.java:76)
at oracle.adfinternal.view.faces.rewrite.context.UriRewriteEncoder.applyEncoder(UriRewriteEncoder.java:36)
at oracle.adfinternal.view.faces.config.rich.URLEncodingConfigurator.getExternalContext(URLEncodingConfigurator.java:56)
at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.getExternalContext(GlobalConfiguratorImpl.java:376)
at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.(FacesContextFactoryImpl.java:84)
at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:62)
at oracle.adfinternal.view.faces.context.RichFacesContextFactory.getFacesContext(RichFacesContextFactory.java:47)
at com.sun.faces.context.InjectionFacesContextFactory.getFacesContext(InjectionFacesContextFactory.java:121)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:583)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
... 26 more

javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class oracle.adf.share.config.ADFConfigFactory$InstanceHolder
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:387)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at oracle.help.web.rich.OHWFilter.doFilter(OHWFilter.java:375)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NoClassDefFoundError: Could not initialize class oracle.adf.share.config.ADFConfigFactory$InstanceHolder
at oracle.adf.share.config.ADFConfigFactory.getInstance(ADFConfigFactory.java:91)
at oracle.adf.share.config.ADFConfigFactory.findOrCreateADFConfig(ADFConfigFactory.java:86)
at oracle.adf.share.config.ADFConfigFactory.findOrCreateADFConfig(ADFConfigFactory.java:64)
at oracle.adf.share.ADFContext.getADFConfigEx(ADFContext.java:1029)
at oracle.adf.share.ADFContext.getADFConfig(ADFContext.java:978)
Truncated. see log file for complete stacktrace
>
_______________________________________________________________



If you review the patch info for bug 21784370, you will notice that it states that the new error should not affect the ability to use the instance or OHW (oracle help for web). 
_______________________________________________________________
Description
When starting up an OUAF environment that has Oracle Help for Web (OHW) setup, the following
errors come up on the console logs:
java.lang.ClassNotFoundException: oracle.adf.share.http.ServletADFContext
The application still launches and OHW is accessible/usable.
However, when navigating around OHW, the following errors also come up:
java.lang.ClassNotFoundException: oracle.adf.share.weblogic.WLSThreadLocalManager
Two important points that should be noted about this bug:
1. The two 'class definition not found' error messages do not affect the OUAF Help functionality. It
is still useable.
2. While the fix for this bug intends to address the two 'class definition not found' error messages
described above, there is a subsequent error message that is encountered during OUAF Help
usage/navigation:
"SEVERE: ADF detected an ADFContext leak.
Please see the documentation for more information about handling ADFContext leaks.
For more information about the leaking ADFContext please enable logging for
oracle.adf.share.ADFContext at FINEST level.

Please see the documentation for more information about handling ADFContext leaks.
For more information about the leaking ADFContext please enable logging for
oracle.adf.share.ADFContext at FINEST level.
>
Sep 09, 2015 11:30:30 AM oracle.adf.share.ADFContext getCurrent
WARNING: Automatically initializing a DefaultContext for getCurrent.
Caller should ensure that a DefaultContext is proper for this use.
Memory leaks and/or unexpected behaviour may occur if the automatic initialization is performed
improperly.
This message may be avoided by performing initADFContext before using getCurrent().
For more information please enable logging for oracle.adf.share.ADFContext at FINEST level."
This is also a harmless error message and needs to be fixed on the Help engine (OHW/ADF)
itself.
A separate bug fix will be provided to address this. Kindly refer to Bug 21811196 for more details
_______________________________________________________________




 

Changes

STEPS TO REPRODUCE
-----------------------
The issue can be reproduced at will with the following steps:
1. Install Oracle Help for Web on an instance with CCB 2.5.0.2.0 or upgrade an instance with Oracle Help for Web to this version.

The issue with the help button not functioning can be reproduce by manually adding the removed adf-share-support.jar to the $SPLEBASE/etc/lib directory

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