Trong Tran created GTNPORTAL-3528:
-------------------------------------
Summary: CDI Portlet deployment under Tomcat doesn't work with Weld
2.2.2.Final
Key: GTNPORTAL-3528
URL:
https://issues.jboss.org/browse/GTNPORTAL-3528
Project: GateIn Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.7.1.Final
Reporter: Trong Tran
Fix For: 3.7.2.Final, 3.9.0.Final
In the documentation
https://docs.jboss.org/author/display/GTNPORTAL37/CDI+Portlet+Development.... It
guides to deploy and run CDI Portlet in GateIn Portal with Weld 1.1.8.Final
Now I'm trying to use newer version of Weld 2.2.2.Final. BUT it leads me to following
exception when we use RequestScoped (you could take the example at
https://github.com/jboss-developer/jboss-portal-quickstarts/tree/6.2.x-de...)
{code}
Caused by: org.jboss.weld.context.ContextNotActiveException: WELD-001303: No active
contexts for scope type javax.enterprise.context.RequestScoped
at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:687)
at
org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:79)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:78)
at org.gatein.quickstart.cdi.DataBean$Proxy$_$$_WeldClientProxy.setMessage(Unknown
Source)
at org.gatein.quickstart.cdi.CDIFilter.doFilter(CDIFilter.java:49)
at
org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159)
at
org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:80)
at
org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:529)
at
org.gatein.pc.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
at
org.gatein.pc.portlet.aspects.EventPayloadInterceptor.invoke(EventPayloadInterceptor.java:197)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
at
org.gatein.pc.portlet.aspects.RequestAttributeConversationInterceptor.invoke(RequestAttributeConversationInterceptor.java:119)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
at org.gatein.pc.portlet.aspects.CCPPInterceptor.invoke(CCPPInterceptor.java:65)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
at org.gatein.pc.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:49)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
at
org.gatein.pc.portlet.aspects.SessionInvalidatorInterceptor.invoke(SessionInvalidatorInterceptor.java:55)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
at
org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.access$201(ContextDispatcherInterceptor.java:46)
at
org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor$CallableImpl.call(ContextDispatcherInterceptor.java:119)
at
org.exoplatform.portal.webui.application.ExoServerContext$1.doCallback(ExoServerContext.java:49)
at
org.gatein.wci.command.CommandDispatcher$CallbackCommand.execute(CommandDispatcher.java:82)
at
org.gatein.wci.command.TomcatCommandDispatcher$1.execute(TomcatCommandDispatcher.java:61)
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 org.gatein.wci.command.CommandServlet.doGet(CommandServlet.java:135)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:605)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:544)
at org.gatein.wci.command.CommandServlet.include(CommandServlet.java:84)
at
org.gatein.wci.command.TomcatCommandDispatcher.include(TomcatCommandDispatcher.java:97)
at
org.gatein.wci.tomcat.TC7ServletContainerContext.include(TC7ServletContainerContext.java:113)
at org.gatein.wci.ServletContainer.include(ServletContainer.java:395)
at
org.exoplatform.portal.webui.application.ExoServerContext.dispatch(ExoServerContext.java:45)
at
org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:65)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
at
org.exoplatform.portal.pc.aspects.PortletLifecyclePhaseInterceptor.invoke(PortletLifecyclePhaseInterceptor.java:30)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
at
org.gatein.pc.portlet.aspects.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:69)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
at org.gatein.pc.portlet.aspects.ValveInterceptor.invoke(ValveInterceptor.java:84)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
at
org.gatein.pc.portlet.container.ContainerPortletInvoker.invoke(ContainerPortletInvoker.java:131)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
at
org.gatein.pc.portlet.state.producer.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java:263)
at
org.gatein.pc.federation.impl.FederatedPortletInvokerService.invoke(FederatedPortletInvokerService.java:163)
at
org.gatein.pc.federation.impl.FederatingPortletInvokerService.invoke(FederatingPortletInvokerService.java:246)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
at
org.gatein.pc.portlet.aspects.PortletCustomizationInterceptor.invoke(PortletCustomizationInterceptor.java:76)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
at
org.gatein.pc.portlet.aspects.ConsumerCacheInterceptor.invoke(ConsumerCacheInterceptor.java:165)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
at org.exoplatform.portal.webui.application.UIPortlet.invoke(UIPortlet.java:1012)
at
org.exoplatform.portal.webui.application.UIPortletLifecycle.processRender(UIPortletLifecycle.java:195)
... 160 more
{code}
Note: it works if I use ApplicationScoped instead.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)