java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual

Java.net JIRA | Andrei Ivanov | 2 years ago
  1. 0

    [JAVASERVERFACES-3613] Detection of CDI @ViewScoped logs scary stacktrace - Java.net JIRA

    java.net | 1 year ago
    java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual
  2. 0

    After the upgrade to 2.2.9, at the deploy of the application I see a scary stacktrace (I assume the fix for JAVASERVERFACES-3400 is the source): {noformat} 19-Dec-2014 13:27:07.804 INFO [http-apr-8443-exec-9] com.sun.faces.application.view.ViewScopeManager.<init> CDI @ViewScoped manager unavai java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual at com.sun.faces.application.view.ViewScopeManager.<init>(Unknown Source) at com.sun.faces.application.view.ViewScopeManager.getInstance(Unknown Source) at com.sun.faces.application.view.ViewScopeEventListener.processEvent(Unknown Source) at javax.faces.event.SystemEvent.processListener(Unknown Source) at javax.faces.event.ComponentSystemEvent.processListener(Unknown Source) at com.sun.faces.application.ApplicationImpl.processListeners(Unknown Source) at com.sun.faces.application.ApplicationImpl.invokeListenersFor(Unknown Source) at com.sun.faces.application.ApplicationImpl.publishEvent(Unknown Source) at javax.faces.component.UIViewRoot.getViewMap(Unknown Source) at javax.faces.component.UIViewRoot.getViewMap(Unknown Source) at com.sun.faces.mgbean.BeanManager$ScopeManager$ViewScopeHandler.handle(Unknown Source) at com.sun.faces.mgbean.BeanManager$ScopeManager.pushToScope(Unknown Source) at com.sun.faces.mgbean.BeanManager.createAndPush(Unknown Source) at com.sun.faces.mgbean.BeanManager.create(Unknown Source) at com.sun.faces.el.ManagedBeanELResolver.resolveBean(Unknown Source) at com.sun.faces.el.ManagedBeanELResolver.getValue(Unknown Source) at com.sun.faces.el.DemuxCompositeELResolver._getValue(Unknown Source) at com.sun.faces.el.DemuxCompositeELResolver.getValue(Unknown Source) at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:80) at org.apache.el.parser.AstValue.getTarget(AstValue.java:68) at org.apache.el.parser.AstValue.invoke(AstValue.java:226) at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267) at com.sun.faces.facelets.el.TagMethodExpression.invoke(Unknown Source) at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(Unknown Source) at com.sun.faces.application.ActionListenerImpl.processAction(Unknown Source) at org.primefaces.application.DialogActionListener.processAction(DialogActionListener.java:45) at org.primefaces.application.DialogActionListener.processAction(DialogActionListener.java:45) at javax.faces.component.UIViewAction.broadcast(Unknown Source) at javax.faces.component.UIViewRoot.broadcastEvents(Unknown Source) at javax.faces.component.UIViewRoot.processApplication(Unknown Source) at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(Unknown Source) at com.sun.faces.lifecycle.Phase.doPhase(Unknown Source) at com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source) at javax.faces.webapp.FacesServlet.service(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:176) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:176) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.ericsson.gscro.common.security.web.filter.SecurityMdcFilter.doFilter(SecurityMdcFilter.java:60) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:176) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestF at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessin at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegra at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:144) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:613) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:277) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2407) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2396) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: javax.enterprise.context.spi.Contextual at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1295) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1147) ... 105 more {noformat} My suggestion is to only log the exception message on *INFO* level and the stacktrace on *DEBUG*.

    Java.net JIRA | 2 years ago | Andrei Ivanov
    java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual
  3. 0

    [JAVASERVERFACES-3400] CDI @ViewScoped not working with 2.2.7+ - Java.net JIRA

    java.net | 11 months ago
    java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    RESTEasy / Mailing Lists

    sourceforge.net | 4 months ago
    java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual
  6. 0

    RESTEasy - 拨云剑文章搜索

    boyunjian.com | 1 year ago
    java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      javax/enterprise/context/spi/Contextual

      at com.sun.faces.application.view.ViewScopeManager.<init>()
    2. JSF
      ViewScopeEventListener.processEvent
      1. com.sun.faces.application.view.ViewScopeManager.<init>(Unknown Source)
      2. com.sun.faces.application.view.ViewScopeManager.getInstance(Unknown Source)
      3. com.sun.faces.application.view.ViewScopeEventListener.processEvent(Unknown Source)
      3 frames
    3. JavaEE 7
      ComponentSystemEvent.processListener
      1. javax.faces.event.SystemEvent.processListener(Unknown Source)
      2. javax.faces.event.ComponentSystemEvent.processListener(Unknown Source)
      2 frames
    4. JSF
      ApplicationImpl.publishEvent
      1. com.sun.faces.application.ApplicationImpl.processListeners(Unknown Source)
      2. com.sun.faces.application.ApplicationImpl.invokeListenersFor(Unknown Source)
      3. com.sun.faces.application.ApplicationImpl.publishEvent(Unknown Source)
      3 frames
    5. JavaEE 7
      UIViewRoot.getViewMap
      1. javax.faces.component.UIViewRoot.getViewMap(Unknown Source)
      2. javax.faces.component.UIViewRoot.getViewMap(Unknown Source)
      2 frames
    6. JSF
      DemuxCompositeELResolver.getValue
      1. com.sun.faces.mgbean.BeanManager$ScopeManager$ViewScopeHandler.handle(Unknown Source)
      2. com.sun.faces.mgbean.BeanManager$ScopeManager.pushToScope(Unknown Source)
      3. com.sun.faces.mgbean.BeanManager.createAndPush(Unknown Source)
      4. com.sun.faces.mgbean.BeanManager.create(Unknown Source)
      5. com.sun.faces.el.ManagedBeanELResolver.resolveBean(Unknown Source)
      6. com.sun.faces.el.ManagedBeanELResolver.getValue(Unknown Source)
      7. com.sun.faces.el.DemuxCompositeELResolver._getValue(Unknown Source)
      8. com.sun.faces.el.DemuxCompositeELResolver.getValue(Unknown Source)
      8 frames
    7. Pax Jsp
      MethodExpressionImpl.invoke
      1. org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:80)
      2. org.apache.el.parser.AstValue.getTarget(AstValue.java:68)
      3. org.apache.el.parser.AstValue.invoke(AstValue.java:226)
      4. org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267)
      4 frames
    8. JSF
      TagMethodExpression.invoke
      1. com.sun.faces.facelets.el.TagMethodExpression.invoke(Unknown Source)
      1 frame
    9. JavaEE 7
      MethodBindingMethodExpressionAdapter.invoke
      1. javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(Unknown Source)
      1 frame
    10. JSF
      ActionListenerImpl.processAction
      1. com.sun.faces.application.ActionListenerImpl.processAction(Unknown Source)
      1 frame
    11. primefaces
      DialogActionListener.processAction
      1. org.primefaces.application.DialogActionListener.processAction(DialogActionListener.java:45)
      2. org.primefaces.application.DialogActionListener.processAction(DialogActionListener.java:45)
      2 frames
    12. JavaEE 7
      UIViewRoot.processApplication
      1. javax.faces.component.UIViewAction.broadcast(Unknown Source)
      2. javax.faces.component.UIViewRoot.broadcastEvents(Unknown Source)
      3. javax.faces.component.UIViewRoot.processApplication(Unknown Source)
      3 frames
    13. JSF
      LifecycleImpl.execute
      1. com.sun.faces.lifecycle.InvokeApplicationPhase.execute(Unknown Source)
      2. com.sun.faces.lifecycle.Phase.doPhase(Unknown Source)
      3. com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
      3 frames
    14. JavaEE 7
      FacesServlet.service
      1. javax.faces.webapp.FacesServlet.service(Unknown Source)
      1 frame
    15. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    16. Tomcat WS
      WsFilter.doFilter
      1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      1 frame
    17. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    18. Spring ORM
      OpenEntityManagerInViewFilter.doFilterInternal
      1. org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:176)
      1 frame
    19. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      1 frame
    20. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    21. Spring ORM
      OpenEntityManagerInViewFilter.doFilterInternal
      1. org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:176)
      1 frame
    22. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      1 frame
    23. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    24. com.ericsson.gscro
      SecurityMdcFilter.doFilter
      1. com.ericsson.gscro.common.security.web.filter.SecurityMdcFilter.doFilter(SecurityMdcFilter.java:60)
      1 frame
    25. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    26. Spring ORM
      OpenEntityManagerInViewFilter.doFilterInternal
      1. org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:176)
      1 frame
    27. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      1 frame
    28. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    29. Spring Security
      FilterChainProxy$VirtualFilterChain.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
      2. org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
      3. org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
      4. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      5. org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
      6. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      7. org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
      8. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      9. org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
      10. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      10 frames