Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-697

HST-2 Persistency API example does not work in portal environment

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.04.02
    • 2.04.03
    • None
    • None

    Description

      The testsuite/site's news comment example test throws the following errors:

      Caused by: org.hippoecm.hst.persistence.ContentPersistenceException: org.hippoecm.hst.persistence.ContentPersistenceException: java.lang.ClassCastException: org.hippoecm.repository.decorating.client.ClientServicingWorkspace
      at org.hippoecm.hst.content.beans.manager.PersistableObjectBeanManagerImpl.createMissingFolders(PersistableObjectBeanManagerImpl.java:224)
      at org.hippoecm.hst.content.beans.manager.PersistableObjectBeanManagerImpl.create(PersistableObjectBeanManagerImpl.java:181)
      ... 114 more
      Caused by: org.hippoecm.hst.persistence.ContentPersistenceException: java.lang.ClassCastException: org.hippoecm.repository.decorating.client.ClientServicingWorkspace
      at org.hippoecm.hst.content.beans.manager.PersistableObjectBeanManagerImpl.createNodeByWorkflow(PersistableObjectBeanManagerImpl.java:251)
      at org.hippoecm.hst.content.beans.manager.PersistableObjectBeanManagerImpl.createMissingFolders(PersistableObjectBeanManagerImpl.java:208)
      ... 115 more
      Caused by: java.lang.ClassCastException: org.hippoecm.repository.decorating.client.ClientServicingWorkspace
      at org.hippoecm.hst.content.beans.manager.PersistableObjectBeanManagerImpl.createNodeByWorkflow(PersistableObjectBeanManagerImpl.java:234)
      ... 116 more

      This problem is caused by the fact that hippo-ecm-api-x.x.x.jar file is not shared, but scattered in multiple web application classpaths.
      However, if hippo-ecm-api-x.x.x.jar is deployed only onto shared classpath such as $CATALINA_HOME/lib/, the the repository itself is not initialized.
      I report this problem in the hippo dev list as follows.
      This problem can be solved after hippo repository's problem is solved.

      ------------------

      Hi All,

      I've just tried to deploy hippo-ecm-api-x.x.x.jar onto shared
      classpath (e.g., $CATALINA_HOME/lib/) for portal environment. (In
      portal environment, there are portal app and multiple portlet
      applications which need cross-context invocations to each other. So,
      it is really necessary to share commons hippo ecm api interfaces.)
      However, I found that HippoRepositoryFactory in hippo-ecm-api jar uses
      Class.forName() to intantiate real repositories, and so it fails
      because the Class.forName() uses caller's classloader. (shared one)
      The real local repository implementation classes must be located in
      the dedicated repository application such as /cms.
      Therefore, I think it's better to use
      Thread.currentThread().getContextLoader().loadClass() instead of
      Class.forName() in HippoRepositoryFactory.
      Any comment?

      Regards,

      Woonsan

      Attachments

        Issue Links

          Activity

            People

              wko Woonsan Ko (Inactive)
              wko Woonsan Ko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: