Uploaded image for project: 'GateIn Portal'
  1. GateIn Portal
  2. GTNPORTAL-625

Portal should not assume to have identity objects a corresponding portal object model created in MOP

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 3.0.0-CR01
    • Component/s: None
    • Labels:
      None

      Description

      Portal should not expect identity objects to have corresponding portal object model created in JCR

      Currently when new user/group is added then UserPortalConfigListener or GroupPortalConfigListener is invoked and creates portal objects stored in JCR. Whenever user or group is added to the store without usage of GateIn Identity API portal starts with errors. Same happens if JCR database is cleaned while IDM database content remains.

      Ways to reproduce:
      1) For clean tomcat packaging:

      • Start/Stop server to let it populate IDM and JCR DBs
      • Wipe out JCR database. For Tomcat:
          • rm -rf temp/db/data/jdbcjcr.*
          • rm -rf temp/jcr
      • Start server

      Exception:
      SEVERE: NewPortalConfig error: Cannot insert page org.exoplatform.portal.pom.data.PageData@1e5f0fd7 as the corresponding portal /platform/users with type ObjectType[interface org.gatein.mop.api.workspace.Site] does not exist
      java.lang.IllegalArgumentException: Cannot insert page org.exoplatform.portal.pom.data.PageData@1e5f0fd7 as the corresponding portal /platform/users with type ObjectType[interface org.gatein.mop.api.workspace.Site] does not exist
      at org.exoplatform.portal.pom.config.tasks.PageTask$Save.run(PageTask.java:341)
      at org.exoplatform.portal.pom.config.tasks.PageTask$Save.run(PageTask.java:303)
      at org.exoplatform.portal.pom.config.POMSession.execute(POMSession.java:378)
      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:90)
      at org.exoplatform.portal.pom.config.cache.DataCache.execute(DataCache.java:58)
      at org.exoplatform.portal.pom.config.POMSessionManager.execute(POMSessionManager.java:140)
      at org.exoplatform.portal.pom.config.POMDataStorage.create(POMDataStorage.java:116)
      at org.exoplatform.portal.config.DataStorageImpl.create(DataStorageImpl.java:98)
      at org.exoplatform.portal.config.NewPortalConfigListener.createPage(NewPortalConfigListener.java:373)
      at org.exoplatform.portal.config.NewPortalConfigListener.initPageDB(NewPortalConfigListener.java:269)
      at org.exoplatform.portal.config.NewPortalConfigListener.run(NewPortalConfigListener.java:144)
      at org.exoplatform.portal.config.UserPortalConfigService.start(UserPortalConfigService.java:580)

      2) For clean tomcat packaging:

      • Start/Stop server to portal.war unpacked
      • Edit webapps/portal/WEB-INF/conf/organization/organization-configuration.xml and remove:
        <component-plugin>
        <name>user.portal.config.listener</name>
        <set-method>addListenerPlugin</set-method>
        <type>org.exoplatform.portal.config.UserPortalConfigListener</type>
        </component-plugin>

      <component-plugin>
      <name>group.portal.config.listener</name>
      <set-method>addListenerPlugin</set-method>
      <type>org.exoplatform.portal.config.GroupPortalConfigListener</type>
      </component-plugin>

      • Wipe out DBs (rm -rf temp work)
      • Start server

      Exception same as above

      3) Add several groups without GateIn Identity API (easiest is to use LDAP config).

      [TODO: basic LDAP config description]

      Then there is no exception but portal complains like:

      Cannot load page navigation as the corresponding portal /acme/roles/employees with type ObjectType[interface org.gatein.mop.api.workspace.Site] does not exist
      Cannot load page navigation as the corresponding portal /acme/organization_units/foo with type ObjectType[interface org.gatein.mop.api.workspace.Site] does not exist
      Cannot load page navigation as the corresponding portal /acme/organization_units/bar with type ObjectType[interface org.gatein.mop.api.workspace.Site] does not exist
      Cannot load page navigation as the corresponding portal /acme/roles/theduke/echo with type ObjectType[interface org.gatein.mop.api.workspace.Site] does not exist
      Cannot load page navigation as the corresponding portal /acme/roles/admins with type ObjectType[interface org.gatein.mop.api.workspace.Site] does not exist
      Cannot load page navigation as the corresponding portal /acme/roles/theduke/echo/echo1 with type ObjectType[interface org.gatein.mop.api.workspace.Site] does not exist
      Cannot load page navigation as the corresponding portal /acme/roles/theduke with type ObjectType[interface org.gatein.mop.api.workspace.Site] does not exist

      This comes from: PageNavigationTask line 91

      Side effect is that if you try to create new page from portal UI that refer to such group you will end with exception.

      [TODO: console error from such activity]

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                julien_viet Julien Viet
                Reporter:
                bdaw Boleslaw Dawidowicz
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: