org.jasig.portal.core.exception.UndeclaredPortalException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • With multiple (3) people logging in as the demo user in the quick start the demo user's layout information was corrupted. This appears to be a race condition as it is difficult to reproduce. The demo user does not have a layout and uses a template layout. It appears that two entries for the demo user are created in the UP_SLM_WIN_MAP table. This causes the DAO to fail as only one entry is expected. I'm guessing that the TemplateUserWindowMappingDao.getTemplateUserWindowMapping or some place in the stack above that point needs to be synchronized on the user the template layout is being retrieved for. The stack trace that results when trying to log in as the demo user once the layout is corrupt is: ERROR [TP-Processor7] [/uP3].[portal] Nov/30 16:08:34.928 - Servlet.service() for servlet portal threw exception org.jasig.portal.core.exception.UndeclaredPortalException: {0} at org.jasig.portal.layout.uportal2.simple.SimpleUserLayoutManagerFactory.createUserLayoutManager(SimpleUserLayoutManagerFactory.java:81) at org.jasig.portal.layout.uportal2.UserAwareLayoutManager.getCurrentLayoutManager(UserAwareLayoutManager.java:48) at org.jasig.portal.layout.uportal2.UserAwareLayoutManager.loadUserLayout(UserAwareLayoutManager.java:210) at org.jasig.portal.layout.uportal2.LegacyLayoutSource.receivePersistenceControllerEvent(LegacyLayoutSource.java:243) at org.jasig.portal.context.common.persistence.PersistenceControllerImpl.distributeEvent(PersistenceControllerImpl.java:100) at org.jasig.portal.context.common.persistence.PersistenceControllerImpl.reset(PersistenceControllerImpl.java:65) at org.jasig.portal.context.common.user.PersistencePolicyUserController.receiveUserControllerEvent(PersistencePolicyUserController.java:41) at org.jasig.portal.context.common.user.AbstractUserController.distributeEvent(AbstractUserController.java:55) at org.jasig.portal.context.common.user.AbstractUserController.distributeUserChangedEvent(AbstractUserController.java:38) at org.jasig.portal.context.common.user.AcegiSessionUserController.processParameters(AcegiSessionUserController.java:180) at org.jasig.portal.url.RequestParameterProcessorListController.processParameters(RequestParameterProcessorListController.java:77) at org.jasig.portal.context.CompoundContext.service(CompoundContext.java:65) at org.jasig.portal.context.ResolvingContext.service(ResolvingContext.java:26) at org.jasig.portal.core.PortalServlet.service(PortalServlet.java:101) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.jasig.portal.security.acegi.HttpRequestContextIntegrationFilter.doFilter(HttpRequestContextIntegrationFilter.java:33) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:61) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jasig.portal.utils.SessionLocalBindingFilter.doFilter(SessionLocalBindingFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: org.jasig.portal.core.exception.PortalException: Exception encountered while reading a layout for userId=4 at org.jasig.portal.layout.uportal2.simple.SimpleUserLayoutManager.loadUserLayout(SimpleUserLayoutManager.java:279) at org.jasig.portal.layout.uportal2.simple.SimpleUserLayoutManager.<init>(SimpleUserLayoutManager.java:122) at org.jasig.portal.layout.uportal2.simple.SimpleUserLayoutManagerFactory.createUserLayoutManager(SimpleUserLayoutManagerFactory.java:76) ... 51 more Caused by: org.springframework.dao.IncorrectResultSizeDataAccessException: Incorrect result size: expected 1, actual 810 at org.springframework.dao.support.DataAccessUtils.uniqueResult(DataAccessUtils.java:53) at org.jasig.portal.layout.uportal2.simple.dao.TemplateUserWindowMappingDao.getTemplateUserWindowMapping(TemplateUserWindowMappingDao.java:47) 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:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) at $Proxy13.getTemplateUserWindowMapping(Unknown Source) at org.jasig.portal.layout.uportal2.simple.dao.TemplateUserWindowMappingDaoWrapper.getTemplateUserWindowMapping(TemplateUserWindowMappingDaoWrapper.java:30) at org.jasig.portal.layout.uportal2.simple.SimpleUserLayoutManager.loadUserLayout(SimpleUserLayoutManager.java:220) ... 53 more
    via by Eric Dalquist,
  • With multiple (3) people logging in as the demo user in the quick start the demo user's layout information was corrupted. This appears to be a race condition as it is difficult to reproduce. The demo user does not have a layout and uses a template layout. It appears that two entries for the demo user are created in the UP_SLM_WIN_MAP table. This causes the DAO to fail as only one entry is expected. I'm guessing that the TemplateUserWindowMappingDao.getTemplateUserWindowMapping or some place in the stack above that point needs to be synchronized on the user the template layout is being retrieved for. The stack trace that results when trying to log in as the demo user once the layout is corrupt is: ERROR [TP-Processor7] [/uP3].[portal] Nov/30 16:08:34.928 - Servlet.service() for servlet portal threw exception org.jasig.portal.core.exception.UndeclaredPortalException: {0} at org.jasig.portal.layout.uportal2.simple.SimpleUserLayoutManagerFactory.createUserLayoutManager(SimpleUserLayoutManagerFactory.java:81) at org.jasig.portal.layout.uportal2.UserAwareLayoutManager.getCurrentLayoutManager(UserAwareLayoutManager.java:48) at org.jasig.portal.layout.uportal2.UserAwareLayoutManager.loadUserLayout(UserAwareLayoutManager.java:210) at org.jasig.portal.layout.uportal2.LegacyLayoutSource.receivePersistenceControllerEvent(LegacyLayoutSource.java:243) at org.jasig.portal.context.common.persistence.PersistenceControllerImpl.distributeEvent(PersistenceControllerImpl.java:100) at org.jasig.portal.context.common.persistence.PersistenceControllerImpl.reset(PersistenceControllerImpl.java:65) at org.jasig.portal.context.common.user.PersistencePolicyUserController.receiveUserControllerEvent(PersistencePolicyUserController.java:41) at org.jasig.portal.context.common.user.AbstractUserController.distributeEvent(AbstractUserController.java:55) at org.jasig.portal.context.common.user.AbstractUserController.distributeUserChangedEvent(AbstractUserController.java:38) at org.jasig.portal.context.common.user.AcegiSessionUserController.processParameters(AcegiSessionUserController.java:180) at org.jasig.portal.url.RequestParameterProcessorListController.processParameters(RequestParameterProcessorListController.java:77) at org.jasig.portal.context.CompoundContext.service(CompoundContext.java:65) at org.jasig.portal.context.ResolvingContext.service(ResolvingContext.java:26) at org.jasig.portal.core.PortalServlet.service(PortalServlet.java:101) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.jasig.portal.security.acegi.HttpRequestContextIntegrationFilter.doFilter(HttpRequestContextIntegrationFilter.java:33) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:61) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jasig.portal.utils.SessionLocalBindingFilter.doFilter(SessionLocalBindingFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: org.jasig.portal.core.exception.PortalException: Exception encountered while reading a layout for userId=4 at org.jasig.portal.layout.uportal2.simple.SimpleUserLayoutManager.loadUserLayout(SimpleUserLayoutManager.java:279) at org.jasig.portal.layout.uportal2.simple.SimpleUserLayoutManager.<init>(SimpleUserLayoutManager.java:122) at org.jasig.portal.layout.uportal2.simple.SimpleUserLayoutManagerFactory.createUserLayoutManager(SimpleUserLayoutManagerFactory.java:76) ... 51 more Caused by: org.springframework.dao.IncorrectResultSizeDataAccessException: Incorrect result size: expected 1, actual 810 at org.springframework.dao.support.DataAccessUtils.uniqueResult(DataAccessUtils.java:53) at org.jasig.portal.layout.uportal2.simple.dao.TemplateUserWindowMappingDao.getTemplateUserWindowMapping(TemplateUserWindowMappingDao.java:47) 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:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) at $Proxy13.getTemplateUserWindowMapping(Unknown Source) at org.jasig.portal.layout.uportal2.simple.dao.TemplateUserWindowMappingDaoWrapper.getTemplateUserWindowMapping(TemplateUserWindowMappingDaoWrapper.java:30) at org.jasig.portal.layout.uportal2.simple.SimpleUserLayoutManager.loadUserLayout(SimpleUserLayoutManager.java:220) ... 53 more
    via by Eric Dalquist,
    • org.jasig.portal.core.exception.UndeclaredPortalException: {0} at org.jasig.portal.layout.uportal2.simple.SimpleUserLayoutManagerFactory.createUserLayoutManager(SimpleUserLayoutManagerFactory.java:81) at org.jasig.portal.layout.uportal2.UserAwareLayoutManager.getCurrentLayoutManager(UserAwareLayoutManager.java:48) at org.jasig.portal.layout.uportal2.UserAwareLayoutManager.loadUserLayout(UserAwareLayoutManager.java:210) at org.jasig.portal.layout.uportal2.LegacyLayoutSource.receivePersistenceControllerEvent(LegacyLayoutSource.java:243) at org.jasig.portal.context.common.persistence.PersistenceControllerImpl.distributeEvent(PersistenceControllerImpl.java:100) at org.jasig.portal.context.common.persistence.PersistenceControllerImpl.reset(PersistenceControllerImpl.java:65) at org.jasig.portal.context.common.user.PersistencePolicyUserController.receiveUserControllerEvent(PersistencePolicyUserController.java:41) at org.jasig.portal.context.common.user.AbstractUserController.distributeEvent(AbstractUserController.java:55) at org.jasig.portal.context.common.user.AbstractUserController.distributeUserChangedEvent(AbstractUserController.java:38) at org.jasig.portal.context.common.user.AcegiSessionUserController.processParameters(AcegiSessionUserController.java:180) at org.jasig.portal.url.RequestParameterProcessorListController.processParameters(RequestParameterProcessorListController.java:77) at org.jasig.portal.context.CompoundContext.service(CompoundContext.java:65) at org.jasig.portal.context.ResolvingContext.service(ResolvingContext.java:26) at org.jasig.portal.core.PortalServlet.service(PortalServlet.java:101) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.jasig.portal.security.acegi.HttpRequestContextIntegrationFilter.doFilter(HttpRequestContextIntegrationFilter.java:33) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:61) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jasig.portal.utils.SessionLocalBindingFilter.doFilter(SessionLocalBindingFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: org.jasig.portal.core.exception.PortalException: Exception encountered while reading a layout for userId=4 at org.jasig.portal.layout.uportal2.simple.SimpleUserLayoutManager.loadUserLayout(SimpleUserLayoutManager.java:279) at org.jasig.portal.layout.uportal2.simple.SimpleUserLayoutManager.<init>(SimpleUserLayoutManager.java:122) at org.jasig.portal.layout.uportal2.simple.SimpleUserLayoutManagerFactory.createUserLayoutManager(SimpleUserLayoutManagerFactory.java:76) ... 51 more Caused by: org.springframework.dao.IncorrectResultSizeDataAccessException: Incorrect result size: expected 1, actual 810 at org.springframework.dao.support.DataAccessUtils.uniqueResult(DataAccessUtils.java:53) at org.jasig.portal.layout.uportal2.simple.dao.TemplateUserWindowMappingDao.getTemplateUserWindowMapping(TemplateUserWindowMappingDao.java:47) 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:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) at $Proxy13.getTemplateUserWindowMapping(Unknown Source) at org.jasig.portal.layout.uportal2.simple.dao.TemplateUserWindowMappingDaoWrapper.getTemplateUserWindowMapping(TemplateUserWindowMappingDaoWrapper.java:30) at org.jasig.portal.layout.uportal2.simple.SimpleUserLayoutManager.loadUserLayout(SimpleUserLayoutManager.java:220) ... 53 more
    No Bugmate found.