Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-64148

HibernateException is thrown when enable global site staging

    Details

      Description

      Steps:
      1. fetch latest ee-6.2.x branch and start portal.
      2. go to global site, configuration -> site setttings, enable local live staging.

      Expect: No exception thrown
      Actual:

      08:37:17,903 ERROR [liferay/background_task-2][BasePersistenceImpl:244] Caught unexpected exception org.hibernate.HibernateException
      08:44:02,526 ERROR [liferay/background_task-2][BasePersistenceImpl:244] Caught unexpected exception org.hibernate.HibernateException
      08:44:09,867 ERROR [liferay/background_task-2][BackgroundTaskMessageListener:133] Unable to execute background task
      com.liferay.portal.kernel.exception.SystemException: org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
      	at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:251)
      	at com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistenceImpl.findByG_P(DDMStructurePersistenceImpl.java:4483)
      	at com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistenceImpl.findByG_P(DDMStructurePersistenceImpl.java:4346)
      	at com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureUtil.findByG_P(DDMStructureUtil.java:1419)
      	at com.liferay.portal.lar.backgroundtask.StagingIndexingBackgroundTaskExecutor.getDescendantDDMStructureIds(StagingIndexingBackgroundTaskExecutor.java:288)
      	at com.liferay.portal.lar.backgroundtask.StagingIndexingBackgroundTaskExecutor.getDescendantDDMStructureIds(StagingIndexingBackgroundTaskExecutor.java:306)
      	at com.liferay.portal.lar.backgroundtask.StagingIndexingBackgroundTaskExecutor.reindexDDMStructures(StagingIndexingBackgroundTaskExecutor.java:197)
      	at com.liferay.portal.lar.backgroundtask.StagingIndexingBackgroundTaskExecutor.execute(StagingIndexingBackgroundTaskExecutor.java:122)
      	at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:57)
      	at com.liferay.portal.backgroundtask.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:108)
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
      	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
      	at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:71)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
      	at java.lang.Thread.run(Thread.java:724)
      Caused by: org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
      	at org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63)
      	at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:687)
      	at com.liferay.portal.dao.orm.hibernate.SessionFactoryImpl.openSession(SessionFactoryImpl.java:89)
      	at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.openSession(BasePersistenceImpl.java:238)
      	at com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistenceImpl.findByG_P(DDMStructurePersistenceImpl.java:4453)
      	... 14 more
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lu.liu Lu Liu
              Reporter:
              bejond.shao Bejond Shao (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 34 weeks, 3 days ago

                  Packages

                  Version Package
                  6.2.X EE