Duplicate user problem in Gatein + mySQL
by tung do thanh
Hi all,
I tested registry 2 users aaa and Aaa in Gatein-3.1.6-PLF in 2 case:
1) gatein + hsqldb: allow registry both
2) gatein + mysql: not allow registry aaa and Aaa, it throw exceptions
org.picketlink.idm.common.exception.IdentityException: IdentityObject
already present in this IdentityStore:name=AAA; type=USER;
realm=HibernateRealm{name='idm_realm'}
at
org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.createIdentityObject(HibernateIdentityStoreImpl.java:528)
at
org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.createIdentityObject(HibernateIdentityStoreImpl.java:494)
at
org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository.createIdentityObject(WrapperIdentityStoreRepository.java:128)
at
org.picketlink.idm.impl.api.session.managers.PersistenceManagerImpl.createUser(PersistenceManagerImpl.java:132)
at
org.exoplatform.services.organization.idm.UserDAOImpl.createUser(UserDAOImpl.java:133)
at
org.exoplatform.webui.organization.UIAccountInputSet.save(UIAccountInputSet.java:129)
at
org.exoplatform.webui.organization.UIAccountForm$SaveActionListener.execute(UIAccountForm.java:103)
at org.exoplatform.webui.event.Event.broadcast(Event.java:89)
at
org.exoplatform.webui.core.lifecycle.UIFormLifecycle.processAction(UIFormLifecycle.java:123)
at
org.exoplatform.webui.core.lifecycle.UIFormLifecycle.processAction(UIFormLifecycle.java:40)
at
org.exoplatform.webui.core.UIComponent.processAction(UIComponent.java:137)
at
org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle.processAction(UIApplicationLifecycle.java:58)
at
org.exoplatform.webui.core.UIComponent.processAction(UIComponent.java:137)
at
org.exoplatform.webui.core.UIApplication.processAction(UIApplication.java:115)
at
org.exoplatform.webui.application.portlet.PortletApplication.processAction(PortletApplication.java:169)
at
org.exoplatform.webui.application.portlet.PortletApplicationController.processAction(PortletApplicationController.java:80)
at
org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:558)
at
org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:109)
at
org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:72)
at
org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:506)
at
org.gatein.pc.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.EventPayloadInterceptor.invoke(EventPayloadInterceptor.java:197)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.RequestAttributeConversationInterceptor.invoke(RequestAttributeConversationInterceptor.java:119)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.CCPPInterceptor.invoke(CCPPInterceptor.java:65)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:49)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.access$001(ContextDispatcherInterceptor.java:49)
at
org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor$1.doCallback(ContextDispatcherInterceptor.java:123)
at
org.gatein.wci.command.CommandDispatcher$CallbackCommand.execute(CommandDispatcher.java:82)
at sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source)
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 org.gatein.wci.command.CommandServlet.doPost(CommandServlet.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at org.gatein.wci.command.CommandServlet.include(CommandServlet.java:84)
at
org.gatein.wci.command.CommandDispatcher.include(CommandDispatcher.java:58)
at
org.gatein.wci.tomcat.TC6ServletContainerContext.include(TC6ServletContainerContext.java:87)
at
org.gatein.wci.impl.DefaultServletContainer.include(DefaultServletContainer.java:198)
at
org.gatein.pc.portlet.impl.spi.AbstractServerContext.dispatch(AbstractServerContext.java:69)
at
org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:77)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:69)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.ValveInterceptor.invoke(ValveInterceptor.java:75)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.container.ContainerPortletInvoker.invoke(ContainerPortletInvoker.java:117)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.state.producer.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java:231)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.PortletCustomizationInterceptor.invoke(PortletCustomizationInterceptor.java:76)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.ConsumerCacheInterceptor.invoke(ConsumerCacheInterceptor.java:229)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.federation.impl.FederatedPortletInvokerService.invoke(FederatedPortletInvokerService.java:152)
at
org.gatein.pc.federation.impl.FederatingPortletInvokerService.invoke(FederatingPortletInvokerService.java:177)
at
org.exoplatform.portal.webui.application.UIPortlet.invoke(UIPortlet.java:896)
at
org.exoplatform.portal.webui.application.UIPortletActionListener$ProcessActionActionListener.execute(UIPortletActionListener.java:105)
at org.exoplatform.webui.event.Event.broadcast(Event.java:89)
at
org.exoplatform.portal.webui.application.UIPortletLifecycle.processAction(UIPortletLifecycle.java:127)
at
org.exoplatform.portal.webui.application.UIPortletLifecycle.processAction(UIPortletLifecycle.java:62)
at
org.exoplatform.webui.core.UIComponent.processAction(UIComponent.java:137)
at
org.exoplatform.portal.webui.workspace.UIPortalApplicationLifecycle.processAction(UIPortalApplicationLifecycle.java:73)
at
org.exoplatform.portal.webui.workspace.UIPortalApplicationLifecycle.processAction(UIPortalApplicationLifecycle.java:37)
at
org.exoplatform.webui.core.UIComponent.processAction(UIComponent.java:137)
at
org.exoplatform.webui.core.UIApplication.processAction(UIApplication.java:115)
at
org.exoplatform.portal.application.PortalRequestHandler.execute(PortalRequestHandler.java:107)
at
org.exoplatform.web.WebAppController.service(WebAppController.java:161)
at
org.exoplatform.portal.application.PortalController.onService(PortalController.java:127)
at
org.exoplatform.container.web.AbstractHttpServlet.service(AbstractHttpServlet.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.exoplatform.web.filter.ExtensibleFilter$ExtensibleFilterChain.doFilter(ExtensibleFilter.java:114)
at
org.exoplatform.web.filter.ExtensibleFilter.doFilter(ExtensibleFilter.java:84)
at
org.exoplatform.web.filter.GenericFilter.doFilter(GenericFilter.java:78)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.exoplatform.web.CacheUserProfileFilter.doFilter(CacheUserProfileFilter.java:72)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.exoplatform.frameworks.jcr.web.ThreadLocalSessionProviderInitializedFilter.doFilter(ThreadLocalSessionProviderInitializedFilter.java:116)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.exoplatform.services.security.web.SetCurrentIdentityFilter.doFilter(SetCurrentIdentityFilter.java:90)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.exoplatform.web.login.ClusteredSSOFilter.doFilter(ClusteredSSOFilter.java:73)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.exoplatform.container.web.PortalContainerFilter.doFilter(PortalContainerFilter.java:69)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:421)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Dec 20, 2010 3:54:34 PM org.exoplatform.webui.core.UIApplication
processAction
SEVERE: Error during the processAction phase
java.lang.IllegalArgumentException: User cannot be null
at
org.picketlink.idm.impl.api.session.managers.AbstractManager.checkNotNullArgument(AbstractManager.java:271)
at
org.picketlink.idm.impl.api.session.managers.AttributesManagerImpl.updatePassword(AttributesManagerImpl.java:558)
at
org.exoplatform.services.organization.idm.UserDAOImpl.persistUserInfo(UserDAOImpl.java:449)
at
org.exoplatform.services.organization.idm.UserDAOImpl.createUser(UserDAOImpl.java:141)
at
org.exoplatform.webui.organization.UIAccountInputSet.save(UIAccountInputSet.java:129)
at
org.exoplatform.webui.organization.UIAccountForm$SaveActionListener.execute(UIAccountForm.java:103)
at org.exoplatform.webui.event.Event.broadcast(Event.java:89)
at
org.exoplatform.webui.core.lifecycle.UIFormLifecycle.processAction(UIFormLifecycle.java:123)
at
org.exoplatform.webui.core.lifecycle.UIFormLifecycle.processAction(UIFormLifecycle.java:40)
at
org.exoplatform.webui.core.UIComponent.processAction(UIComponent.java:137)
at
org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle.processAction(UIApplicationLifecycle.java:58)
at
org.exoplatform.webui.core.UIComponent.processAction(UIComponent.java:137)
at
org.exoplatform.webui.core.UIApplication.processAction(UIApplication.java:115)
at
org.exoplatform.webui.application.portlet.PortletApplication.processAction(PortletApplication.java:169)
at
org.exoplatform.webui.application.portlet.PortletApplicationController.processAction(PortletApplicationController.java:80)
at
org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:558)
at
org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:109)
at
org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:72)
at
org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:506)
at
org.gatein.pc.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.EventPayloadInterceptor.invoke(EventPayloadInterceptor.java:197)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.RequestAttributeConversationInterceptor.invoke(RequestAttributeConversationInterceptor.java:119)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.CCPPInterceptor.invoke(CCPPInterceptor.java:65)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:49)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.access$001(ContextDispatcherInterceptor.java:49)
at
org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor$1.doCallback(ContextDispatcherInterceptor.java:123)
at
org.gatein.wci.command.CommandDispatcher$CallbackCommand.execute(CommandDispatcher.java:82)
at sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source)
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 org.gatein.wci.command.CommandServlet.doPost(CommandServlet.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at org.gatein.wci.command.CommandServlet.include(CommandServlet.java:84)
at
org.gatein.wci.command.CommandDispatcher.include(CommandDispatcher.java:58)
at
org.gatein.wci.tomcat.TC6ServletContainerContext.include(TC6ServletContainerContext.java:87)
at
org.gatein.wci.impl.DefaultServletContainer.include(DefaultServletContainer.java:198)
at
org.gatein.pc.portlet.impl.spi.AbstractServerContext.dispatch(AbstractServerContext.java:69)
at
org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:77)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:69)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.ValveInterceptor.invoke(ValveInterceptor.java:75)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.container.ContainerPortletInvoker.invoke(ContainerPortletInvoker.java:117)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.state.producer.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java:231)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.PortletCustomizationInterceptor.invoke(PortletCustomizationInterceptor.java:76)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.portlet.aspects.ConsumerCacheInterceptor.invoke(ConsumerCacheInterceptor.java:229)
at
org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:87)
at
org.gatein.pc.federation.impl.FederatedPortletInvokerService.invoke(FederatedPortletInvokerService.java:152)
at
org.gatein.pc.federation.impl.FederatingPortletInvokerService.invoke(FederatingPortletInvokerService.java:177)
at
org.exoplatform.portal.webui.application.UIPortlet.invoke(UIPortlet.java:896)
at
org.exoplatform.portal.webui.application.UIPortletActionListener$ProcessActionActionListener.execute(UIPortletActionListener.java:105)
at org.exoplatform.webui.event.Event.broadcast(Event.java:89)
at
org.exoplatform.portal.webui.application.UIPortletLifecycle.processAction(UIPortletLifecycle.java:127)
at
org.exoplatform.portal.webui.application.UIPortletLifecycle.processAction(UIPortletLifecycle.java:62)
at
org.exoplatform.webui.core.UIComponent.processAction(UIComponent.java:137)
at
org.exoplatform.portal.webui.workspace.UIPortalApplicationLifecycle.processAction(UIPortalApplicationLifecycle.java:73)
at
org.exoplatform.portal.webui.workspace.UIPortalApplicationLifecycle.processAction(UIPortalApplicationLifecycle.java:37)
at
org.exoplatform.webui.core.UIComponent.processAction(UIComponent.java:137)
at
org.exoplatform.webui.core.UIApplication.processAction(UIApplication.java:115)
at
org.exoplatform.portal.application.PortalRequestHandler.execute(PortalRequestHandler.java:107)
at
org.exoplatform.web.WebAppController.service(WebAppController.java:161)
at
org.exoplatform.portal.application.PortalController.onService(PortalController.java:127)
at
org.exoplatform.container.web.AbstractHttpServlet.service(AbstractHttpServlet.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.exoplatform.web.filter.ExtensibleFilter$ExtensibleFilterChain.doFilter(ExtensibleFilter.java:114)
at
org.exoplatform.web.filter.ExtensibleFilter.doFilter(ExtensibleFilter.java:84)
at
org.exoplatform.web.filter.GenericFilter.doFilter(GenericFilter.java:78)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.exoplatform.web.CacheUserProfileFilter.doFilter(CacheUserProfileFilter.java:72)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.exoplatform.frameworks.jcr.web.ThreadLocalSessionProviderInitializedFilter.doFilter(ThreadLocalSessionProviderInitializedFilter.java:116)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.exoplatform.services.security.web.SetCurrentIdentityFilter.doFilter(SetCurrentIdentityFilter.java:90)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.exoplatform.web.login.ClusteredSSOFilter.doFilter(ClusteredSSOFilter.java:73)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.exoplatform.container.web.PortalContainerFilter.doFilter(PortalContainerFilter.java:69)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:421)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Pls discus about this problem, how to fix it?
Thanks for your advise.
--
*Thanh Tung Do
Software engineer - eXo Platform SEA.
Add: Floor 7&8 - Thai Ha Building, 18/11 Thai Ha Str., Hanoi
Email: tungdt.dtt(a)gmail.com
Company website: www.exoplatform.org <http://www.exoplatform.vn>*
13 years, 12 months
Request dispatching clarification
by Julien Viet
Hi,
I would like to clarify things about request dispatching in GateIn and in servlet container more generally. Because there are many expectations that are not correct and people are not usually aware of this, so I think there is a need for a clarification on several points.
1/ When a request dispatch is performed from a servlet to another servlet in the same web application or in a different web application (cross context dispatch), the request and response provided can be custom request and response BUT they must subclass ServletRequestWrapper and ServletResponseWrapper. There are at least two good reasons for this:
- The best one: the spec simply **mandates it** : http://download.oracle.com/javaee/5/api/javax/servlet/RequestDispatcher.h... .
"The request and response parameters must be either the same objects as were passed to the calling servlet's service method or be subclasses of the ServletRequestWrapper or ServletResponseWrapper classes that wrap them."
- If a custom subclasses are made and implements the interface of HttpServletRequest and HttpServletResponse, it will create code that will only run with the servlet API for which is was compiled. If it is compiled with Servlet 2.5 API, then it will lead to classloading exception in a Servlet 3.0 container. Conversely if it compiled with Servlet 3.0 API, then it will not work anymore in Servlet 2.5 container because it will want to load non existing classes (like for instance the new class javax.servlet.http.Part in Servlet 3.0)
2/ When a request dispatch occurs from one web application to another web application, the http request/response used for dispatching must not be used during the dispatched invocation. We have a chain like:
Container ---> Filter (/a) ---> Container ---> Servlet (/a) ---> Container [RD to /b] ---> Filter (/b) ---> Container ---> Servlet (/b)
The Container is nearly in between all the various layers (filters and servlets) and is performing important work. When dispatched in /b, using the request/response of /a is not a correct thing to do.
3/ I know that GateIn does not provide a good solution for case 2 and we have had bugs recently with that, mainly because code wants to store attributes in a scope that is common to all web applications (i.e the portal session). So for now we are fixing things to make them work, but in the next version of GateIn, we will come up with a correct solution for that. I think also (that's my personal point of view), that the PortletRequest and PortletResponse are not used when they should be, meaning that there is no solution for sharing state between portlet that are not in the same web application. So we will try to come with the best solution.
cheers
Julien
14 years, 1 month