4 Replies Latest reply on Sep 21, 2011 2:30 AM by 889191

    java.lang.NoClassDefFoundError: javax/faces/context/FacesContext

    889191
      I am having problems running my web application using jdeveloper jsf.
      When I try to access the page the following error occurs.

      java.lang.NoClassDefFoundError: javax/faces/context/FacesContext
           at org.springframework.web.jsf.FacesContextUtils.getWebApplicationContext(FacesContextUtils.java:51)
           at br.imediato.ireciclados.controller.ResumoBean.<init>(ResumoBean.java:20)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
           at java.lang.Class.newInstance0(Class.java:355)
           at java.lang.Class.newInstance(Class.java:308)
           at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:188)
           at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:102)
           at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
           at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
           at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)
           at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116)
           at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
           at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
           at com.sun.faces.el.ChainAwareVariableResolver.resolveVariable(ChainAwareVariableResolver.java:107)
           at oracle.javatools.resourcebundle.BundleVariableResolver.resolveVariable(BundleVariableResolver.java:45)
           at oracle.javatools.resourcebundle.BundleVariableResolver.resolveVariable(BundleVariableResolver.java:45)
           at com.sun.faces.el.VariableResolverChainWrapper.getValue(VariableResolverChainWrapper.java:115)
           at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
           at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
           at com.sun.el.parser.AstIdentifier.getValue(Unknown Source)
           at com.sun.el.parser.AstValue.getValue(Unknown Source)
           at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
           at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
           at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:73)
           at org.apache.myfaces.trinidad.component.FacesBeanWrapper.getProperty(FacesBeanWrapper.java:61)
           at org.apache.myfaces.trinidad.component.UIXTable$RowKeyFacesBeanWrapper.getProperty(UIXTable.java:630)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.getProperty(UIXComponentBase.java:1475)
           at org.apache.myfaces.trinidad.component.UIXIterator.getValue(UIXIterator.java:760)
           at org.apache.myfaces.trinidad.component.UIXCollection.__flushCachedModel(UIXCollection.java:1785)
           at org.apache.myfaces.trinidad.component.UIXCollection.encodeBegin(UIXCollection.java:603)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1650)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:606)
           at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
           at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2194)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer.access$500(PanelBoxRenderer.java:40)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer$ChildEncoderCallback.processComponent(PanelBoxRenderer.java:2413)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer$ChildEncoderCallback.processComponent(PanelBoxRenderer.java:2396)
           at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
           at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
           at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._encodeAllChildren(PanelBoxRenderer.java:1510)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._renderContentRow(PanelBoxRenderer.java:1440)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer.encodeAll(PanelBoxRenderer.java:381)
           at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:606)
           at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
           at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2194)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelDashboardRenderer.access$900(PanelDashboardRenderer.java:51)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelDashboardRenderer$ChildVisitorCallback.processComponent(PanelDashboardRenderer.java:825)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelDashboardRenderer$ChildVisitorCallback.processComponent(PanelDashboardRenderer.java:769)
           at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
           at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
           at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelDashboardRenderer.encodeAll(PanelDashboardRenderer.java:340)
           at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
           at oracle.adfinternal.view.faces.taglib.region.IncludeTag$FacetWrapper.encodeAll(IncludeTag.java:547)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:606)
           at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
           at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2194)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._renderPane(PanelSplitterRenderer.java:1593)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer.encodeAll(PanelSplitterRenderer.java:279)
           at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:606)
           at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:879)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1294)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:351)
           at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:316)
           at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:606)
           at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:623)
           at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
           at oracle.adfinternal.view.faces.renderkit.rich.PageTemplateRenderer.encodeAll(PageTemplateRenderer.java:68)
           at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:606)
           at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:623)
           at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
           at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:274)
           at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:606)
           at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:623)
           at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
           at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1277)
           at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
           at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655)
           at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:91)
           at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:399)
           at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:350)
           at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
           at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
           at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
           at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1027)
           at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:334)
           at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:232)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
           at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
           at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
           at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
           at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
           at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
           at java.security.AccessController.doPrivileged(Native Method)
           at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
           at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
           at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
           at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
           at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
           at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
           at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
           at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
           at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
           at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
      Caused By: java.lang.ClassNotFoundException: javax.faces.context.FacesContext
           at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
           at java.security.AccessController.doPrivileged(Native Method)
           at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
           at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
           at org.springframework.web.jsf.FacesContextUtils.getWebApplicationContext(FacesContextUtils.java:51)
           at br.imediato.ireciclados.controller.ResumoBean.<init>(ResumoBean.java:20)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
           at java.lang.Class.newInstance0(Class.java:355)
           at java.lang.Class.newInstance(Class.java:308)
           at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:188)
           at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:102)
           at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
           at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
           at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)
           at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116)
           at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
           at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
           at com.sun.faces.el.ChainAwareVariableResolver.resolveVariable(ChainAwareVariableResolver.java:107)
           at oracle.javatools.resourcebundle.BundleVariableResolver.resolveVariable(BundleVariableResolver.java:45)
           at oracle.javatools.resourcebundle.BundleVariableResolver.resolveVariable(BundleVariableResolver.java:45)
           at com.sun.faces.el.VariableResolverChainWrapper.getValue(VariableResolverChainWrapper.java:115)
           at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
           at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
           at com.sun.el.parser.AstIdentifier.getValue(Unknown Source)
           at com.sun.el.parser.AstValue.getValue(Unknown Source)
           at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
           at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
           at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:73)
           at org.apache.myfaces.trinidad.component.FacesBeanWrapper.getProperty(FacesBeanWrapper.java:61)
           at org.apache.myfaces.trinidad.component.UIXTable$RowKeyFacesBeanWrapper.getProperty(UIXTable.java:630)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.getProperty(UIXComponentBase.java:1475)
           at org.apache.myfaces.trinidad.component.UIXIterator.getValue(UIXIterator.java:760)
           at org.apache.myfaces.trinidad.component.UIXCollection.__flushCachedModel(UIXCollection.java:1785)
           at org.apache.myfaces.trinidad.component.UIXCollection.encodeBegin(UIXCollection.java:603)

      Edited by: user2532936 on 20/09/2011 19:25
        • 1. Re: java.lang.NoClassDefFoundError: javax/faces/context/FacesContext
          889191
          I was trying to access the FacesContext from the constructor of my bean Now when I try to access from a method I am getting the error

          Root cause of ServletException.
          java.lang.LinkageError: loader constraint violation: when resolving method "org.springframework.web.jsf.FacesContextUtils.getWebApplicationContext(Ljavax/faces/context/FacesContext;)Lorg/springframework/web/context/WebApplicationContext;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, br/imediato/ireciclados/controller/ResumoBean, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for resolved class, org/springframework/web/jsf/FacesContextUtils, have different Class objects for the type javax/faces/context/FacesContext used in the signature
               at br.imediato.ireciclados.controller.ResumoBean.getListaAlertasNaoLidos(ResumoBean.java:27)

          In my facesConfig.xml

          <el-resolver>org.springframework.web.jsf.el.WebApplicationContextFacesELResolver</el-resolver>
          • 2. Re: java.lang.NoClassDefFoundError: javax/faces/context/FacesContext
            Suresh Karunarathne
            Hi.. Can you try as follows,try to access FacesContext from postConstruct method
                @PostConstruct
                public void initAfterConstruct(){
                   //put your code here 
                }
            • 3. Re: java.lang.NoClassDefFoundError: javax/faces/context/FacesContext
              889191
              Hi, thanks for your reply.
              Even trying to use a posconstructor the problem persists

              ]] Root cause of ServletException.
              com.sun.faces.spi.InjectionProviderException: com.oracle.pitchfork.interfaces.LifecycleCallbackException: Failure to invoke public void br.imediato.ireciclados.controller.ResumoBean.initAfterConstruct() on bean class class br.imediato.ireciclados.controller.ResumoBean with args: []
                   at com.bea.faces.WeblogicInjectionProvider.invokePostConstruct(WeblogicInjectionProvider.java:40)
                   at com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:223)
                   at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:105)
                   at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
                   at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
                   at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)
                   )
                   at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
                   at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
                   at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
                   at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
                   at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
              Caused By: com.oracle.pitchfork.interfaces.LifecycleCallbackException: Failure to invoke public void br.imediato.ireciclados.controller.ResumoBean.initAfterConstruct() on bean class class br.imediato.ireciclados.controller.ResumoBean with args: []
                   at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.invokeLifecycleMethod(Jsr250Metadata.java:335)
                   at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.invokeLifecycleMethod(Jsr250Metadata.java:326)
                   at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.invokeLifecycleMethods(Jsr250Metadata.java:320)
                   at weblogic.servlet.internal.WebComponentContributor.invokeLifecycleMethods(WebComponentContributor.java:296)
                   at weblogic.servlet.internal.WebComponentContributor.notifyPostConstruct(WebComponentContributor.java:285)
                   at com.bea.faces.WeblogicInjectionProvider.invokePostConstruct(WeblogicInjectionProvider.java:38)
                   at com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:223)
                   at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:105)
                   at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
                   at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
                   at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)
                   at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116)
                   at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
                   at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
                   at com.sun.faces.el.ChainAwareVariableResolver.resolveVariable(ChainAwareVariableResolver.java:107)
                   at oracle.javatools.resourcebundle.BundleVariableResolver.resolveVariable(BundleVariableResolver.java:45)
                   at oracle.javatools.resourcebundle.BundleVariableResolver.resolveVariable(BundleVariableResolver.java:45)
                   at com.sun.faces.el.VariableResolverChainWrapper.getValue(VariableResolverChainWrapper.java:115)
                   at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
                   at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
                   at com.sun.el.parser.AstIdentifier.getValue(Unknown Source)
                   at com.sun.el.parser.AstValue.getValue(Unknown Source)
                   at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
                   at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
                   
                   at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
                   at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
                   at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
                   at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
              Caused By: java.lang.reflect.InvocationTargetException
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:597)
                   at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.invokeLifecycleMethod(Jsr250Metadata.java:332)
                   at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.invokeLifecycleMethod(Jsr250Metadata.java:326)
                   at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.invokeLifecycleMethods(Jsr250Metadata.java:320)
                   at weblogic.servlet.internal.WebComponentContributor.invokeLifecycleMethods(WebComponentContributor.java:296)
                   
                   at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
              Caused By: java.lang.NoClassDefFoundError: javax/faces/context/FacesContext
                   at org.springframework.web.jsf.FacesContextUtils.getWebApplicationContext(FacesContextUtils.java:51)
                   at br.imediato.ireciclados.controller.ResumoBean.getListaAlertasNaoLidos(ResumoBean.java:34)
                   at br.imediato.ireciclados.controller.ResumoBean.obterAlertasNaoLidos(ResumoBean.java:77)
                   at br.imediato.ireciclados.controller.ResumoBean.initAfterConstruct(ResumoBean.java:27)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:597)
                   at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.invokeLifecycleMethod(Jsr250Metadata.java:332)
                   at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.invokeLifecycleMethod(Jsr250Metadata.java:326)
                   at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.invokeLifecycleMethods(Jsr250Metadata.java:320)
                   at weblogic.servlet.internal.WebComponentContributor.invokeLifecycleMethods(WebComponentContributor.java:296)
                   at weblogic.servlet.internal.WebComponentContributor.notifyPostConstruct(WebComponentContributor.java:285)
                   at com.bea.faces.WeblogicInjectionProvider.invokePostConstruct(WeblogicInjectionProvider.java:38)
                   at com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:223)
                   at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:105)
                   at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
                   at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
                   at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)
                   at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116)
                   at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
                   at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
                   at com.sun.faces.el.ChainAwareVariableResolver.resolveVariable(ChainAwareVariableResolver.java:107)
                   at oracle.javatools.resourcebundle.BundleVariableResolver.resolveVariable(BundleVariableResolver.java:45)
                   at oracle.javatools.resourcebundle.BundleVariableResolver.resolveVariable(BundleVariableResolver.java:45)
                   at com.sun.faces.el.VariableResolverChainWrapper.getValue(VariableResolverChainWrapper.java:115)
                   at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
                   at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
                   at com.sun.el.parser.AstIdentifier.getValue(Unknown Source)
                   at com.sun.el.parser.AstValue.getValue(Unknown Source)
                   at com.sun.el.ValueExpressionImpl.getValue(Unkno
              Caused By: java.lang.ClassNotFoundException: javax.faces.context.FacesContext
                   at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
                   at java.security.AccessController.doPrivileged(Native Method)
                   at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
                   at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
                   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
                   at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
                   at org.springframework.web.jsf.FacesContextUtils.getWebApplicationContext(FacesContextUtils.java:51)
                   at br.imediato.ireciclados.controller.ResumoBean.getListaAlertasNaoLidos(ResumoBean.java:34)
                   at br.imediato.ireciclados.controller.ResumoBean.obterAlertasNaoLidos(ResumoBean.java:77)
                   at br.imediato.ireciclados.controller.ResumoBean.initAfterConstruct(ResumoBean.java:27)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:597)
                   at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.invokeLifecycleMethod(Jsr250Metadata.java:332)
                   at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.invokeLifecycleMethod(Jsr250Metadata.java:326)
                   at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.invokeLifecycleMethods(Jsr250Metadata.java:320)
                   at weblogic.servlet.internal.WebComponentContributor.invokeLifecycleMethods(WebComponentContributor.java:296)
              • 4. Re: java.lang.NoClassDefFoundError: javax/faces/context/FacesContext
                889191
                Guys, I think the problem is related to the configuration of the adf faces + spring.
                For some reason the spring is not having access to the FacesContext.
                It would be a classloader problem?

                I'm using SpringBeanFacesELResolver to manage my BackingBeans.

                java.lang.NoClassDefFoundError: javax/faces/context/FacesContext
                     at org.springframework.web.jsf.el.SpringBeanFacesELResolver.getWebApplicationContext(SpringBeanFacesELResolver.java:89)
                     at org.springframework.web.jsf.el.SpringBeanFacesELResolver.getBeanFactory(SpringBeanFacesELResolver.java:78)
                     at org.springframework.beans.factory.access.el.SpringBeanELResolver.getValue(SpringBeanELResolver.java:49)
                     at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
                     at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
                     at com.sun.el.parser.AstIdentifier.getValue(Unknown Source)
                     at com.sun.el.parser.AstValue.getValue(Unknown Source)
                     at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
                     at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
                     at com.sun.faces.application.ApplicationImpl.createComponentApplyAnnotations(ApplicationImpl.java:1889)
                     at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:1109)
                     at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.createComponent(ComponentTagHandlerDelegateImpl.java:511)
                     at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:157)
                     at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
                     at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
                     at oracle.adfinternal.view.faces.facelets.rich.PopupHandler.applyNextHandler(PopupHandler.java:84)
                     at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
                     at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
                     at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
                     at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
                     at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
                     at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
                     at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
                     at com.sun.faces.facelets.tag.jsf.core.FacetHandler.apply(FacetHandler.java:104)
                     at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
                     at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
                     at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
                     at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
                     at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
                     at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
                     at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)