3

When i Update my DD4T Web Application Content , and click on Update Preview button then it doesn't work, i don't see Updated Content and Update Preview pop up blinks again and again. So my Preview Service is not Working at all.

However if i click on finish editing for my changes then after 2-3 minutes my Update Preview works, i don't get any popup blinking.Everything works fine.

My Findings are : When i Finish Editing, Preview Web Service sending items to the Preview Database as i can see Component and Component Presentations are in Preview Database, then it Update Items in to Broker Database, and Publishes the Page.Publishing is getting Success but i can still see Component and Component Presentation entries are in Preview Database, that is why i am getting Update Preview blinks again and again. Once (after 1-2 minutes) Items gets Deleted from Preview Database i can see the updated Content in XPM and also Update Preview doesn't blink anymore.

I Disabled CacheSettings but still it's not working, also in my Preview Service Logs i found these Errors :

2016-02-04 06:29:26,778 ERROR SessionWrapperFactory - Exception while cleaning-up session data
com.tridion.broker.StorageException: javax.persistence.RollbackException: Error while committing the transaction
at com.tridion.storage.persistence.JPABaseDAO.remove(JPABaseDAO.java:157) ~[cd_datalayer.jar:na]
at com.tridion.storage.persistence.JPAItemDAO.remove(JPAItemDAO.java:246) ~[cd_datalayer.jar:na]
at com.tridion.storage.persistence.session.SessionWrapperFactory.deleteItemMeta(SessionWrapperFactory.java:184) ~[cd_session.jar:na]
at com.tridion.storage.persistence.session.SessionWrapperFactory.cleanupSessionData(SessionWrapperFactory.java:160) ~[cd_session.jar:na]
at com.tridion.storage.session.SessionManagerImpl.expireSession(SessionManagerImpl.java:414) [cd_session.jar:na]
at com.tridion.storage.session.SessionManagerImpl.performCleanup(SessionManagerImpl.java:230) [cd_session.jar:na]
at com.tridion.storage.persistence.session.SessionsCleanerMonitor.run(SessionsCleanerMonitor.java:52) [cd_session.jar:na]
at java.lang.Thread.run(Unknown Source) [na:1.7.0_71]

           Caused by: javax.persistence.RollbackException: Error while committing the transaction
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:90) ~[hibernate-entitymanager.jar:4.0.1.Final]
at com.tridion.storage.persistence.JPABaseDAO.remove(JPABaseDAO.java:148) ~[cd_datalayer.jar:na]
... 7 common frames omitted
                   Caused by: javax.persistence.OptimisticLockException: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.tridion.storage.PageMeta#com.tridion.storage.ItemMetaPK@2441b]
at org.hibernate.ejb.AbstractEntityManagerImpl.wrapStaleStateException(AbstractEntityManagerImpl.java:1394) ~[hibernate-entitymanager.jar:4.0.1.Final]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1308) ~[hibernate-entitymanager.jar:4.0.1.Final]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1289) ~[hibernate-entitymanager.jar:4.0.1.Final]
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:78) ~[hibernate-entitymanager.jar:4.0.1.Final]
... 8 common frames omitted
  Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.tridion.storage.PageMeta#com.tridion.storage.ItemMetaPK@2441b]
at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:2359) ~[hibernate-core.jar:4.0.1.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3127) ~[hibernate-core.jar:4.0.1.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3327) ~[hibernate-core.jar:4.0.1.Final]
at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:91) ~[hibernate-core.jar:4.0.1.Final]
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:272) ~[hibernate-core.jar:4.0.1.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:264) ~[hibernate-core.jar:4.0.1.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:191) ~[hibernate-core.jar:4.0.1.Final]
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:326) ~[hibernate-core.jar:4.0.1.Final]
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52) ~[hibernate-core.jar:4.0.1.Final]
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1081) ~[hibernate-core.jar:4.0.1.Final]
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:315) ~[hibernate-core.jar:4.0.1.Final]
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) ~[hibernate-core.jar:4.0.1.Final]
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175) ~[hibernate-core.jar:4.0.1.Final]
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:73) ~[hibernate-entitymanager.jar:4.0.1.Final]
... 8 common frames omitted                                                                                         
6
  • 1
    Is this a DD4T site or a static publishing site? It sounds like preview is not working at all. You're seeing fast track publishing. Feb 2, 2016 at 9:21
  • its a DD4T web application. @RobStevenson-Leggett Feb 2, 2016 at 11:15
  • 1
    can you check if you have disabled dd4t caching ? Maybe dd4t is serving a cached version of your content Feb 2, 2016 at 12:58
  • Adding to Harald's comment, can you try and disable cache settings for your DD4T Staging website and update your question? <add key="DD4T.CacheSettings.Default" value="-1"/>
    – Shiva
    Feb 2, 2016 at 15:07
  • @RobStevenson-Leggett yes my preview is not working at all, when i make changes and click on update preview it doesn't show updated content, so its not working. Feb 4, 2016 at 4:32

1 Answer 1

2

It is good to realise that the exception you are seeing is actually not critical and not the cause of preview not working. This exception happens when multiple preview processes are trying to cleanup your content in the preview store. Eventually the cleanup will succeed, in later versions of the product we have modified this message to be less 'critical looking'.

Can you also please try to re-create your preview database with the powershell scripts, it could be that a simple wipe of the DB could do the trick.

Otherwise some more logging in debug log format are needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.