3 Replies Latest reply on Oct 30, 2012 4:44 AM by vargapeti

    Cannot create portal [userid] that already exist error

    amayingenta

      We're seeing this error with GateIn 3.1.0GA:

       

      java.lang.IllegalArgumentException: Cannot create portal [userid] that already exist

              at org.exoplatform.portal.pom.config.tasks.PortalConfigTask$Save.run(PortalConfigTask.java:140)

              at org.exoplatform.portal.pom.config.tasks.PortalConfigTask$Save.run(PortalConfigTask.java:99)

              at org.exoplatform.portal.pom.config.POMSession.execute(POMSession.java:390)

              at org.exoplatform.portal.pom.config.ExecutorDispatcher.execute(ExecutorDispatcher.java:41)

              at org.exoplatform.portal.pom.config.TaskExecutionDecorator.execute(TaskExecutionDecorator.java:38)

              at org.exoplatform.portal.pom.config.cache.DataCache.create(DataCache.java:108)

              at org.exoplatform.portal.pom.config.cache.DataCache.execute(DataCache.java:63)

              at org.exoplatform.portal.pom.config.POMSessionManager.execute(POMSessionManager.java:201)

              at org.exoplatform.portal.pom.config.POMDataStorage.create(POMDataStorage.java:87)

              at org.exoplatform.portal.config.DataStorageImpl.create(DataStorageImpl.java:79)

              at org.exoplatform.portal.config.NewPortalConfigListener.createPortalConfig(NewPortalConfigListener.java:349)

              at org.exoplatform.portal.config.UserPortalConfigService.createUserPortalConfig(UserPortalConfigService.java:302)

              at org.exoplatform.portal.config.UserPortalConfigService.createUserSite(UserPortalConfigService.java:230)

              at org.exoplatform.portal.application.UserSiteLifeCycle.onStartRequest(UserSiteLifeCycle.java:59)

              at org.exoplatform.portal.application.UserSiteLifeCycle.onStartRequest(UserSiteLifeCycle.java:36)

              at org.exoplatform.portal.application.PortalRequestHandler.execute(PortalRequestHandler.java:97)

              at org.exoplatform.web.WebAppController.service(WebAppController.java:143)

              at org.exoplatform.portal.application.PortalController.onService(PortalController.java:127)

              at org.exoplatform.container.web.AbstractHttpServlet.service(AbstractHttpServlet.java:116)

       

      To the users, the result is a blank screen after logging in.

       

      Tracing through the code, this seems to happen when the following conditions are true:

       

      1) storage.getPortalConfig("user", userName) in UserSiteLifeCycle returns null, causing to to create the user site

      2) session.getWorkspace().getSite(type, key.getId()) in PortalConfigTask$Save returns a Site

      3) overwrite in PortalConfigTask$Save is false

       

      I don't really understand the internals here, but it seems to indicate that there's two types of things being cached here and somehow they're in an unexpected state where the org.exoplatform.portal.config.model.PortalConfig does not exist, but the org.gatein.mop.api.workspace.Site does.

       

      Any ideas what might be causing this?

       

      Thanks,

      Andrew

        • 1. Re: Cannot create portal [userid] that already exist error
          hoang_to

          Did you run on a clean build of GateIn 3.1.0 while falling on this exception?

           

          User sites of predefined users (root, john, mary, demo)  are created as UserPortalConfigService service starts.

           

          User sites of new users are created by Organization Service 's listener.

          • 2. Re: Cannot create portal [userid] that already exist error
            amayingenta

            When you say a "clean build" do you mean starting the server after removing server/default/data, server/default/work, server/default/tmp?

             

            We've done that a number of times (although not on all restarts or redeployments). Is that something you would recommend every time we restart the server?

             

            We're currently using file based HSQLDB (which I think is the default) for GateIn - would switching to the mem HSQLDB help by always being reinitialized ever time the server starts? We're not making use of any customization features so there's nothing we need saved between restarts.

            • 3. Re: Cannot create portal [userid] that already exist error
              vargapeti

              Hi Andrew,

               

              have you solved the problem above? I'm facing the same issue now and can not deal with it.

               

              Thanks in advance,

              Peter