3

I can open the Staging website pages in the CMS context (frame). I can edit pages using XPM functionality. I can see items being created in the Preview Session DB. But when I select the "Update Preview" button, it says "Loading..." and afterwards I see the exact same page as before, without my change . I am getting the following error in preview log file.

Explanation: When I start the XPM first time on my pages,I got the following errors.

Error 1 comes only first time, later I don't see this error but Error 2 keeps coming and my update session doesn't work . Error 3 also keeps coming frequently. It also tries to write a temp file into the local image and local aspx folders respectively(ERROR 4)

ERROR 1:

On Tridion GUI

Unable to update the changes using OData Service. The remote server returned an error: (500) Internal Server Error.

In Event Viewer

WebHost failed to process a request. Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/12547953 Exception: System.ServiceModel.ServiceActivationException: The service '/odata.svc' cannot be activated due to an exception during compilation. The exception message is: Object reference not set to an instance of an object.. ---> System.NullReferenceException: Object reference not set to an instance of an object. at System.Web.Compilation.DiskBuildResultCache.CacheBuildResult(String cacheKey, BuildResult result, Int64 hashCode, DateTime utcStart) at System.Web.Compilation.BuildManager.CacheBuildResultInternal(String cacheKey, BuildResult result, Int64 hashCode, DateTime utcStart) at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetCompiledCustomString(String virtualPath) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.GetCompiledCustomString(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) --- End of inner exception stack trace --- at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath, EventTraceActivity eventTraceActivity) Process Name: w3wp Process ID: 4764

ERROR 2 :

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_51] 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.ComponentMeta#com.tridion.storage.ItemMetaPK@356bfaf] 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.ComponentMeta#com.tridion.storage.ItemMetaPK@356bfaf] 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]

ERROR 3 - Why it is trying to write into this folder ?

2015-06-10 08:03:58,867 INFO QueueLocationHandler - Writing deployer window size: *:*******\incoming\meta.xml. 2015-06-10 08:03:58,867 ERROR QueueLocationHandler - java.io.FileNotFoundException: :****\incoming\meta.xml (Access is denied)** at java.io.RandomAccessFile.open(Native Method) ~[na:1.7.0_51] at java.io.RandomAccessFile.(Unknown Source) ~[na:1.7.0_51] at com.tridion.deployer.queue.QueueLocationHandler.writeWindowSize(QueueLocationHandler.java:260) [cd_deployer.jar:na] at com.tridion.deployer.queue.QueueLocationHandler.configure(QueueLocationHandler.java:90) [cd_deployer.jar:na] at com.tridion.deployer.queue.TransactionLocationHandler.configure(TransactionLocationHandler.java:46) [cd_deployer.jar:na] at com.tridion.deployer.Deployer.configure(Deployer.java:170) [cd_deployer.jar:na] at com.tridion.services.BaseService.(BaseService.java:113) [cd_core.jar:na] at com.tridion.deployer.Deployer.(Deployer.java:81) [cd_deployer.jar:na] at com.tridion.deployer.Deployer.getInstance(Deployer.java:100) [cd_deployer.jar:na] at com.tridion.deployer.Deployer.getConfiguration(Deployer.java:114) [cd_deployer.jar:na] at com.tridion.webservices.odata.TransformerUtil.(TransformerUtil.java:75) [cd_preview_webservice.jar:na] at com.tridion.webservices.odata.TransformerUtil.getInstance(TransformerUtil.java:159) [cd_preview_webservice.jar:na] at com.tridion.webservices.odata.TransformerUtil.transformPageContent(TransformerUtil.java:187) [cd_preview_webservice.jar:na] at com.tridion.webservices.odata.WritablePageContentsEntryService.transformPageContent(WritablePageContentsEntryService.java:169) [cd_preview_webservice.jar:na] at com.tridion.webservices.odata.WritablePageContentsEntryService.store(WritablePageContentsEntryService.java:200) [cd_preview_webservice.jar:na] at com.tridion.webservices.odata.WritablePageContentsEntryService.update(WritablePageContentsEntryService.java:110) [cd_preview_webservice.jar:na] at com.tridion.webservices.odata.WritablePageContentsEntryService.update(WritablePageContentsEntryService.java:41) [cd_preview_webservice.jar:na] at com.tridion.webservices.odata.AbstractWritableEntryService.update(AbstractWritableEntryService.java:72) [cd_preview_webservice.jar:na] at com.tridion.webservices.odata.WritablePageContentsEntryService.update(WritablePageContentsEntryService.java:41) [cd_preview_webservice.jar:na] at com.tridion.webservices.odata.input.handler.ODataWebserviceHandler.updateODataEntity(ODataWebserviceHandler.java:419) [cd_odata.jar:na] at com.tridion.webservices.odata.input.handler.ODataBatchHandler.handleChangeSet(ODataBatchHandler.java:154) [cd_odata.jar:na] at com.tridion.webservices.odata.input.handler.ODataBatchHandler.handleBatch(ODataBatchHandler.java:56) [cd_odata.jar:na] at com.tridion.webservices.odata.input.handler.ODataWebserviceHandler.handleBatch(ODataWebserviceHandler.java:387) [cd_odata.jar:na]

ERROR 4

2015-06-09 20:26:09,535 DEBUG JPAPreviewSessionDAO - Updating PreviewSession: PreviewSession [sessionId=629d507c-be6f-41d7-aae1-9b1fa9ca5bb0, expirationDate=Tue Jun 09 20:28:09 GST 2015] 2015-06-09 20:26:09,535 DEBUG PageHandler - Got page content for publicationId: 481 and pageId: 1909496. 2015-06-09 20:26:09,535 DEBUG HandleSessionContentUtil - Will write content file: F:*****************************\index_629d507c-be6f-41d7-aae1-9b1fa9ca5bb0.aspx 2015-06-09 20:26:09,535 DEBUG SessionServiceImpl - PreviewSessionItem doesn't exist, creating PreviewSessionItem [sessionId=629d507c-be6f-41d7-aae1-9b1fa9ca5bb0, sessionObjectKey=com.tridion.storage.PageContent[ class=class com.tridion.storage.PageContentPK pageId=1909496 publicationId=481 ], instanceName=localhost, filePath=null, changedOnDisk=false, state=NONE]. 2015-06-09 20:26:09,535 DEBUG JPAPreviewSessionItemDAO - Storing PreviewSessionItem: PreviewSessionItem [sessionId=629d507c-be6f-41d7-aae1-9b1fa9ca5bb0, sessionObjectKey=com.tridion.storage.PageContent[ class=class com.tridion.storage.PageContentPK pageId=1909496 publicationId=481 ], instanceName=localhost, filePath=null, changedOnDisk=false, state=NONE] 2015-06-09 20:26:09,550 ERROR PageHandler - IOException while processing request java.io.IOException: Access is denied at java.io.WinNTFileSystem.createFileExclusively(Native Method) ~[na:1.7.0_51] at java.io.File.createNewFile(Unknown Source) ~[na:1.7.0_51] at com.tridion.preview.web.util.HandleSessionContentUtil.writeContentOnFS(HandleSessionContentUtil.java:88) ~[cd_preview_web.jar:na] at com.tridion.preview.web.PageHandler.handleRequest(PageHandler.java:129) ~[cd_preview_web.jar:na] 2015-06-09 20:26:09,550 DEBUG PageHandler - Real file name (before processing virtual path): 'null' 2015-06-09 20:26:09,550 DEBUG PageHandler - Virtual relative path: '//*****/*/austria'

Lots of error for creating temp files in local folders and we dont have permission to do so. Can we map it to some other temp folder ??

Line 67271: 2015-06-10 09:36:59,269 ERROR BinaryContentHandler - IOException while processing request
Line 67498: 2015-06-10 09:36:59,550 ERROR BinaryContentHandler - IOException while processing request
Line 67792: 2015-06-10 09:36:59,870 ERROR BinaryContentHandler - IOException while processing request
Line 68059: 2015-06-10 09:37:00,141 ERROR BinaryContentHandler - IOException while processing request
Line 74171: 2015-06-10 09:37:14,022 ERROR SessionWrapperFactory - Exception while cleaning-up session data
Line 76799: 2015-06-10 09:37:33,053 ERROR PageHandler - IOException while processing request
Line 81161: 2015-06-10 09:37:38,377 ERROR PageHandler - IOException while processing request
Line 91609: 2015-06-10 09:37:57,928 ERROR BinaryContentHandler - IOException while processing request
Line 92201: 2015-06-10 09:37:59,134 ERROR BinaryContentHandler - IOException while processing request
Line 92557: 2015-06-10 09:37:59,634 ERROR BinaryContentHandler - IOException while processing request
Line 92830: 2015-06-10 09:37:59,970 ERROR BinaryContentHandler - IOException while processing request
Line 93138: 2015-06-10 09:38:00,244 ERROR BinaryContentHandler - IOException while processing request
Line 93448: 2015-06-10 09:38:00,550 ERROR BinaryContentHandler - IOException while processing request
Line 93666: 2015-06-10 09:38:00,821 ERROR BinaryContentHandler - IOException while processing request
Line 94058: 2015-06-10 09:38:01,095 ERROR BinaryContentHandler - IOException while processing request
  • possible duplicate of XPM "Update Preview" not working – Hiren Kaku Jun 8 '15 at 3:16
  • I have seen this "error" quite often in my logs files in both working and non-working instances of XPM and it can be very misleading. I would suggest disregarding this message from the log file and looking at other posts that explain what the steps to determine the real problem are. – Katarina Stojanovski Jun 9 '15 at 10:41
  • DD4T or Tridion Templating? Same across a range of page/content types/fields? perhaps check this albertromkes.com/2013/01/24/… (old post but still useful as an initial steps to test) – Dylan .. Mark Saunders Jun 9 '15 at 13:14
  • Mark : The post above doesnt help as I have configured all okay I guess. Now I am getting some other errors also. I will update the question with errors again. Can someone please tell me where all XPM tries to create temporary files while exceution. – Jitender sharma Jun 10 '15 at 4:08
1

I see two problems in your log files which I will address below.

Unable to update the changes using OData Service. The remote server returned an error: (500) Internal Server Error.

When Experience Manager tries to save the updated preview rendered output in the Preview database (via the OData service) the OData service generates a 500 error. You will want to examine the content delivery log files of the OData service to identify what went wrong. My first guess would be that the extensions for Experience Manager for this service have not been properly installed or configured...

Note that it is perfectly possible to have a "working" OData web service and still get this error due to the mentioned extensions required.

Lots of error for creating temp files in local folders and we dont have permission to do so. Can we map it to some other temp folder ??

No. In order for Dynamic Preview to work properly with a statically published page solution (i.e. pages are published as .aspx files on the filesystem of your CD server) SDL Tridion uses an HttpModule to intercept the request for the page, get the modified page content from the Preview database and create a temporary .aspx file next to the original file and executes that file instead of the original one.

This architecture relies on the web application's ability to write to its own root folder (which is inherently insecure but that's why this feature is activated only on the staging environment and never on the live environment!).

If for some reason you have a security restriction that disallows this you can simply not use dynamic preview. You can disable dynamic preview from the content manager in that case.

0

I got it working by giving permission to IIS Users on published data .

"icacls **:*\tridion published Content path" /grant:r "BUILTIN\IIS_IUSRS:(OI)(CI)(M)"**

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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