400 error (Bad Request) creating a Page with Experience Manager

故事扮演 提交于 2019-12-24 08:21:59

问题


I have an SDL Tridion 2011 SP1 HR1 image in which Experience Manager is installed. I can successfully browse my staging site, log in to ExM and change content and pages. However, when I try to create a new page I get a 400 (Bad Request) error. This is the logged error:

Unable to update the changes using OData Service.
The remote server returned an error: (400) Bad Request.

Component: Tridion.SiteEdit.FastTrackPublishing
Errorcode: 1003
User: NT AUTHORITY\NETWORK SERVICE

StackTrace Information Details:
at System.Net.HttpWebRequest.GetResponse()
at System.Data.Services.Client.DataServiceContext.SaveResult.BatchRequest(Boolean replaceOnUpdate)
at System.Data.Services.Client.DataServiceContext.SaveChanges(SaveChangesOptions options)
at Tridion.SiteEdit.FastTrackPublishing.ServiceImplementation.Preview(IEnumerable1 publishedItemsInfo, TcmUri publishingTargetId)
at Tridion.SiteEdit.FastTrackPublishing.ServiceImplementation.Preview(IEnumerable
1 publishedItemsInfo, TcmUri publishingTargetId)
at SyncInvokePreview(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

I've just checked the CD log file and can see this error:

012-10-16 12:29:05,782 ERROR JPADAOFactory - Unable to load JPA DAO with name: TrackedRequest and class: com.tridion.storage.TrackedRequestDAO due too exception in DAO construction org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'TrackedRequestDAO' defined in URL [jar:file:/C:/ASP.NET/Preview/httpupload/bin/lib/tracking_core.jar!/com/tridion/storage/TrackedRequestDAO.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.tridion.storage.TrackedRequestDAO]: Constructor threw exception; nested exception is com.tridion.configuration.ConfigurationException: Unexpected dialect encountered: . TrackedRequest item type should be configured to use a supported database.

Inline editing was enabled for the already published content when I received the image but I needed to create the Content Type and Page Type myself. I did this in the usual manner, creating a Page, flagging it as a Page Type, adding the prototype content to it, and configuring the settings for naming and storage (for the created content). I also restarted IIS, shutdown the COM+ package and restarted the Tridion Service Host and Publisher services.

Can anyone explain why I'm getting this error, and how to fix it?

EDIT

So the error suggests it's an issue in the storage config. Here are the relevant sections:

  <Storage Id="trackingDB" Class="com.tridion.storage.persistence.JPADAOFactory" Type="persistence" dialect="MSSQL">
    <Pool CheckoutTimeout="120" IdleTimeout="120" MonitorInterval="60" Size="5" Type="jdbc"/>
    <DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
      <Property Name="serverName" Value="SDLPE.pe.local"/>
      <Property Name="portNumber" Value="1433"/>
      <Property Name="databaseName" Value="tridion_tracking"/>
      <Property Name="user" Value="encrypted:u9aIOj9uX2IcL1rI6U5ndA=="/>
      <Property Name="password" Value="encrypted:vprUfrnluvIQAVRNSMTx5g=="/>
    </DataSource>
  </Storage>

And:

<Item cached="true" typeMapping="TrackedRequest" storageId="trackingDB"/>

EDIT

I've just been trawling through the log file and found this:

2012-10-16 14:12:43,148 DEBUG ConfigurationItemTypeLoader - Loaded mapping: trackedrequest to storage: trackingDB
2012-10-16 14:12:43,148 DEBUG ConfigurationItemTypeLoader - Loaded mapping: trackingbatch to storage: trackingDB
2012-10-16 14:12:43,148 DEBUG ConfigurationItemTypeLoader - Loaded mapping: synchronizationrecord to storage: trackingDB
2012-10-16 14:12:43,148 DEBUG ConfigurationItemTypeLoader - Loaded mapping: trackingitem to storage: trackingDB

It seems that the config should be picked up correctly, but still it can't read the dialect propely from the relevant storage definition.


回答1:


In the end the issue was related to having Page Metadata specified for the Page Type. The errors I was seeing logged don't affect the performance of the website so were misleading me.



来源:https://stackoverflow.com/questions/12914834/400-error-bad-request-creating-a-page-with-experience-manager

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!