4

I have installed User interface update for SDL Tridion 2011 SP1 on HR2. setup preview service & staging website as per document. but i am getting few issue.

JAR - copied all Jars provided as part of setup + sqljdbc4.jar total 61 jars.

Configs

  • cd_ambient_conf.xml
  • cd_dynamic_conf.xml
  • cd_licenses.xml
  • cd_link_conf.xml
  • cd_monitor_conf.xml
  • cd_storage_conf.xml
  • cd_webservice_conf.xml
  • logback.xml

Whenever user click finish editing, it says "committed" then throws error. "The appropriate update claim has not been set." Publishing is working fine.

Even i do not see any data into Session-preview DB.

Logs from Service

2013-09-04 15:47:20,955 WARN  AmbientDataContext - There is no current ambient data context the ambient data framework is not properly initialised
.
.
.
    2013-09-04 15:47:25,564 DEBUG SessionManagerImpl - Creating new preview session.
    2013-09-04 15:47:25,573 INFO  StorageManagerTransactionMonitor - Starting storage transaction monitoring
    2013-09-04 15:47:25,580 TRACE SessionManagerImpl - Performing cleanup of old sessions.
    2013-09-04 15:47:25,587 TRACE JPAPreviewSessionDAO - Retrieving all expired sessions.
    2013-09-04 15:47:25,627 DEBUG SessionManagerImpl - Starting preview session: 32005b1e-9e36-4799-9aad-ebe6da8018f1.
    2013-09-04 15:47:25,630 DEBUG ClaimStore - put: uri=taf:claim:contentdelivery:webservice:preview:sessionid, value=PreviewSession [sessionId=32005b1e-9e36-4799-9aad-ebe6da8018f1, expirationDate=Wed Sep 04 15:55:45 IST 2013]
    2013-09-04 15:47:25,630 DEBUG JPAPreviewSessionDAO - Retrieving PreviewSession by sessionId: 32005b1e-9e36-4799-9aad-ebe6da8018f1
    2013-09-04 15:47:25,948 ERROR SessionsCleanerMonitor - Could not perform sessions clean-up. Will retry in 500000 milliseconds.
    javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
        at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614) ~[hibernate-entitymanager.jar:3.4.0.GA]
        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76) ~[hibernate-entitymanager.jar:3.4.0.GA]
        at com.tridion.storage.persistence.JPABaseDAO.executeQueryListResult(JPABaseDAO.java:266) ~[cd_datalayer.jar:na]
        at com.tridion.storage.persistence.JPABaseDAO.executeQueryListResult(JPABaseDAO.java:234) ~[cd_datalayer.jar:na]
        at com.tridion.storage.persistence.JPABaseDAO.executeQueryListResult(JPABaseDAO.java:217) ~[cd_datalayer.jar:na]
        at com.tridion.storage.session.persistence.JPAPreviewSessionDAO.getExpiredSessions(JPAPreviewSessionDAO.java:84) ~[cd_session.jar:na]
        at com.tridion.storage.session.SessionServiceImpl.getExpiredSessions(SessionServiceImpl.java:75) ~[cd_session.jar:na]
        at com.tridion.storage.session.SessionManagerImpl.performCleanup(SessionManagerImpl.java:227) ~[cd_session.jar:na]
        at com.tridion.storage.persistence.session.SessionsCleanerMonitor.run(SessionsCleanerMonitor.java:54) ~[cd_session.jar:na]
        at java.lang.Thread.run(Unknown Source) [na:1.6.0_41]
    Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90) ~[hibernate-core.jar:3.3.2.GA]
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) ~[hibernate-core.jar:3.3.2.GA]
        at org.hibernate.loader.Loader.doList(Loader.java:2235) ~[hibernate-core.jar:3.3.2.GA]
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129) ~[hibernate-core.jar:3.3.2.GA]
        at org.hibernate.loader.Loader.list(Loader.java:2124) ~[hibernate-core.jar:3.3.2.GA]
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401) ~[hibernate-core.jar:3.3.2.GA]
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363) ~[hibernate-core.jar:3.3.2.GA]
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) ~[hibernate-core.jar:3.3.2.GA]
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1149) ~[hibernate-core.jar:3.3.2.GA]
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) ~[hibernate-core.jar:3.3.2.GA]
        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67) ~[hibernate-entitymanager.jar:3.4.0.GA]
        ... 8 common frames omitted
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'PREVIEW_SESSIONS'.
        at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216) ~[sqljdbc4.jar:na]
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515) ~[sqljdbc4.jar:na]
        at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404) ~[sqljdbc4.jar:na]
        at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350) ~[sqljdbc4.jar:na]
        at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) ~[sqljdbc4.jar:na]
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715) ~[sqljdbc4.jar:na]
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180) ~[sqljdbc4.jar:na]
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155) ~[sqljdbc4.jar:na]
        at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:285) ~[sqljdbc4.jar:na]
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93) ~[commons-dbcp.jar:1.2.2]
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93) ~[commons-dbcp.jar:1.2.2]
        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) ~[hibernate-core.jar:3.3.2.GA]
        at org.hibernate.loader.Loader.getResultSet(Loader.java:1812) ~[hibernate-core.jar:3.3.2.GA]
        at org.hibernate.loader.Loader.doQuery(Loader.java:697) ~[hibernate-core.jar:3.3.2.GA]
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) ~[hibernate-core.jar:3.3.2.GA]
        at org.hibernate.loader.Loader.doList(Loader.java:2232) ~[hibernate-core.jar:3.3.2.GA]
        ... 16 common frames omitted
      2013-09-04 15:47:26,170 DEBUG ODataService - ODATA.NET: Posting batch. 
    2013-09-04 15:47:26,171 DEBUG WebContext - setCurrentClaimStore: com.tridion.ambientdata.dotnet.DotNetClaimStore@239c7c21, thread: Thread-6
    2013-09-04 15:47:26,200 DEBUG BatchRequestBodyParser - Content-Type: multipart/mixed; boundary=changeset_2cfd442d-82a3-4b08-9b6c-fe6afa71b94f
    2013-09-04 15:47:26,212 DEBUG BatchRequestBodyParser - Content-Type: application/http
    2013-09-04 15:47:26,214 DEBUG BatchRequestBodyParser - Content-Type: application/http
    2013-09-04 15:47:26,216 DEBUG BatchRequestBodyParser - Content-Type: application/http
    2013-09-04 15:47:26,216 DEBUG BatchRequestBodyParser - Content-Type: application/http
    2013-09-04 15:47:26,216 DEBUG BatchRequestBodyParser - Content-Type: application/http
    2013-09-04 15:47:26,217 DEBUG BatchRequestBodyParser - Content-Type: application/http
    2013-09-04 15:47:26,217 DEBUG BatchRequestBodyParser - Content-Type: application/http
    2013-09-04 15:47:26,217 DEBUG BatchRequestBodyParser - Content-Type: application/http
    2013-09-04 15:47:26,223 DEBUG BatchRequestBodyParser - Content-Type: application/http
    2013-09-04 15:47:26,224 DEBUG BatchRequestBodyParser - Content-Type: application/http
    2013-09-04 15:47:26,225 INFO  StorageManagerFactory - Starting storage transaction: 971ac2b9-a7c8-4f7e-8d21-0a078784aee1
    2013-09-04 15:47:26,226 DEBUG ODataBatchHandler - ChangeSet 2cfd442d-82a3-4b08-9b6c-fe6afa71b94f contains a PUT/MERGE operation.
    2013-09-04 15:47:26,249 ERROR ODataBatchHandler - Operation failed with status code 403, rolling back the transaction and generating error response.
    2013-09-04 15:47:26,251 INFO  StorageManagerFactory - Rolling back storage transaction: 971ac2b9-a7c8-4f7e-8d21-0a078784aee1
    2013-09-04 15:47:26,251 DEBUG ODataWebserviceHandler - Batch response: --batch_693746b5-44d8-4882-a618-29d1b2a42574
    Content-Type: application/http
    Content-Transfer-Encoding: binary

    HTTP/1.1 403 Forbidden
    Content-Type: multipart/mixed
    Content-Length: 486

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
        <code></code>
        <message xml:lang="en-US">The appropriate update claim has not been set.</message>
    </error>

    --batch_693746b5-44d8-4882-a618-29d1b2a42574--

    2013-09-04 15:47:26,269 DEBUG WebContext - setCurrentClaimStore: null, thread: Thread-6
    2013-09-04 15:47:26,302 DEBUG WebContext - setCurrentClaimStore: null, thread: Thread-1

cd_ambient_conf.xml

    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="6.1" xsi:noNamespaceSchemaLocation="schemas/cd_ambient_conf.xsd">
        <Cartridges>
            <!-- Example cartridge definition -->
            <!--
            <Cartridge File="cd_ambient_cartridge_conf.xml"/>
            -->
            <Cartridge File="cd_webservice_preview_cartridge.xml"/>
        </Cartridges>
<ClaimStoreProvider>com.tridion.siteedit.preview.PreviewClaimStoreProvider</ClaimStoreProvider>
    </Configuration>

logs from staging website

2013-09-05 16:28:47,828 DEBUG HttpModule - Init
2013-09-05 16:28:47,844 WARN  AmbientDataContext - There is no current ambient data context - the ambient data framework is not properly initialised
2013-09-05 16:28:47,847 DEBUG HttpModule - Ambient Framework initialization.
2013-09-05 16:28:47,849 DEBUG AmbientDataContext - Setting current ambient data context: com.tridion.ambientdata.web.WebContext
2013-09-05 16:28:48,123 INFO  AmbientDataConfig - Found claimStoreProvider definition in configuration file: com.tridion.siteedit.preview.PreviewClaimStoreProvider.
2013-09-05 16:28:48,235 DEBUG PreviewContentModule - Init from preview
2013-09-05 16:28:48,236 DEBUG PreviewContentModule - With BeginRequest
.
.
.
2013-09-05 16:28:56,124 DEBUG JDBCExceptionReporter - could not execute query [select previewses0_.PREVIEW_SESSION_ID  as PREVIEW1_92_, previewses0_.EXPIRATION_DATE as EXPIRATION2_92_ from PREVIEW_SESSIONS previewses0_ where previewses0_.EXPIRATION_DATE<=?]
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'PREVIEW_SESSIONS'.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216) ~[sqljdbc4.jar:na]
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515) ~[sqljdbc4.jar:na]
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404) ~[sqljdbc4.jar:na]
1
  • Please share the cd_storage_conf.xml in staging and odata web service.
    – Likhan
    Commented Sep 4, 2013 at 11:09

3 Answers 3

6

It seems that you are missing some pieces here.

  1. For tridion 2011 it is necessary to override the the claim store. This is done in the cd_ambient_conf.xml configuration file <ClaimStoreProvider>com.tridion.siteedit.preview.PreviewClaimStoreProvider</ClaimStoreProvider>.

  2. Make sure you have defined a Wrapper in your cd_storage_conf.xml configuration file.

  3. Make sure you have a bundle for session preview <Bundle src="preview_dao_bundle.xml"/>
4
  • I had this claimstoreprovider tag before even it was not working with that, i will include it now again. i do have wrapper. if you are aware what is "Invalid object name 'PREVIEW_SESSIONS'." & should storage config have broker db(not session) reference and ItemTypes mapping with storage id
    – Honey
    Commented Sep 4, 2013 at 11:52
  • You should have 2 different broker DBs, a regular broker db and a session preview broker db, the Wrapper should point to the session preview broker, you don't need to specify item types, but you need to specify a configuration bundle for session preview
    – Eric Huiza
    Commented Sep 4, 2013 at 12:08
  • i have all above setting in my respective configs, still issue.
    – Honey
    Commented Sep 5, 2013 at 10:22
  • Have you followed @Jan's recommendation?, you should ensure that ADF is well configured.
    – Eric Huiza
    Commented Sep 5, 2013 at 14:04
5

Reading from your log, the claim has not been set because there is no claim store at all. See the first log line:

2013-09-04 15:47:20,955 WARN AmbientDataContext - There is no current ambient data context the ambient data framework is not properly initialised

Did you configure the ADF module/filter in the web.config/web.xml of your website?

It should like this in the web.config in a .NET site, or something equivalient in the web.xml if you are on Java.

<modules>
    <add name="Tridion.ContentDelivery.AmbientData.HttpModule" type="Tridion.ContentDelivery.AmbientData.HttpModule" />
    <add name="PreviewContentModule" type="Tridion.ContentDelivery.Preview.Web.PreviewContentModule" />
</modules>
5
  • i do have these two in my config. what is ambient data context & its properties/values
    – Honey
    Commented Sep 5, 2013 at 10:26
  • In the ADF (Ambient Data Framework) API, the AmbientDataContext class will help you to load the claimstore. You can simply test this in a .jsp or .aspx page by something like: ClaimStore claimStore = AmbientDataContext.getCurrentClaimstore(); And then test if claimStore is set. Are there any other ADF related warnings? It looks like you have the ADF filter, the cd_ambient_conf.xml is in place.
    – Jan H
    Commented Sep 5, 2013 at 10:50
  • Maybe the ADF filter loads, but there is something wrong with the cartridges. Could you see what happens if you comment the <Cartridge> node and the <ClaimStoreProvider> node in the cd_ambient_conf.xml? Maybe the WARN AmbientDataContext.... error disappears and you could further troubleshoot the config.
    – Jan H
    Commented Sep 5, 2013 at 10:54
  • i have <Cartridge File="cd_webservice_preview_cartridge.xml"/> <Cartridge File="footprint_cartridge_conf.xml"/> in staging website, and in webservice only first(cd_webservice_preview_cartridge.xml)
    – Honey
    Commented Sep 5, 2013 at 11:45
  • I meant to ask whether you can disable all <Cartridge> elements and the <ClaimStoreProvider> entries in the cd_ambient_conf.xml. You can do this by putting <!-- before and --> after. So, something like <!-- <Cartridge File="cd_webservice_preview_cartridge.xml"/> -->. After that, restart the web application server (i.e. IIS or Tomcat) and see if you get the same "WARN AmbientDataContext - There is no current ambient data context..." warning. The point is that you first have to get the ADF framework to work before you can troubleshoot User interface update for SDL Tridion 2011.
    – Jan H
    Commented Sep 5, 2013 at 17:50
1

Error Invalid object name 'PREVIEW_SESSIONS' means this table is missing where Session Preview service stores the session related data. I am not sure why its throwing this, because this table is created as part of Broker DB creation.

Please verify this.

1
  • i just checked, surprisingly all session tables were not there in db :(, i have again created db using utility. now its working fine. i am getting refreshed page, now only issue is update preview button always shows pages is not updated.
    – Honey
    Commented Sep 9, 2013 at 10:12

Your Answer

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

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