使用 Experience Manager 创建页面时出现 400 错误(错误请求) [英] 400 error (Bad Request) creating a Page with Experience Manager

查看:34
本文介绍了使用 Experience Manager 创建页面时出现 400 错误(错误请求)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个安装了 Experience Manager 的 SDL Tridion 2011 SP1 HR1 映像.我可以成功浏览我的临时站点、登录 ExM 并更改内容和页面.但是,当我尝试创建新页面时,出现 400(错误请求)错误.这是记录的错误:

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:

无法使用 OData 服务更新更改.
远程服务器返回错误:(400) Bad Request.

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

组件:Tridion.SiteEdit.FastTrackPublishing
错误代码:1003
用户:NT AUTHORITY\网络服务

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

堆栈跟踪信息详细信息:
在 System.Net.HttpWebRequest.GetResponse()
在 System.Data.Services.Client.DataServiceContext.SaveResult.BatchRequest(Boolean replaceOnUpdate)
在 System.Data.Services.Client.DataServiceContext.SaveChanges(SaveChangesOptions 选项)
在 Tridion.SiteEdit.FastTrackPublishing.ServiceImplementation.Preview(IEnumerable1publishedItemsInfo, TcmUri publishingTargetId)
在 Tridion.SiteEdit.FastTrackPublishing.ServiceImplementation.Preview(IEnumerable
1publishedItemsInfo, TcmUri publishingTargetId)
在 SyncInvokePreview(Object , Object[] , Object[] )
在 System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(对象实例,对象 [] 输入,对象 []& 输出)
在 System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
在 System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
在 System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
在 System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

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)

我刚刚检查了 CD 日志文件,可以看到此错误:

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

012-10-16 12:29:05,782 错误 JPADAOFactory - 由于 DAO 构造中的异常,无法加载名称为:TrackedRequest 和类:com.tridion.storage.TrackedRequestDAO 的 JPA DAOorg.springframework.beans.factory.BeanCreationException:创建名为TrackedRequestDAO"的 bean 在 URL [jar:file:/C:/ASP.NET/Preview/httpupload/bin/lib/tracking_core.jar!/com/tridion 中定义时出错/storage/TrackedRequestDAO.class]:bean实例化失败;嵌套异常是 org.springframework.beans.BeanInstantiationException:无法实例化 bean 类 [com.tridion.storage.TrackedRequestDAO]:构造函数抛出异常;嵌套异常是 com.tridion.configuration.ConfigurationException:遇到意外的方言:.TrackedRequest 项目类型应配置为使用受支持的数据库.

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.

当我收到图像时,已为已发布的内容启用了内联编辑,但我需要自己创建内容类型和页面类型.我以通常的方式执行此操作,创建一个页面,将其标记为页面类型,向其中添加原型内容,并配置命名和存储设置(用于创建的内容).我还重新启动了 IIS,关闭了 COM+ 包并重新启动了 Tridion Service Host 和 Publisher 服务.

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?

编辑

因此该错误表明这是存储配置中的问题.以下是相关部分:

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>

还有:

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

编辑

我刚刚浏览了日志文件,发现了这个:

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

2012-10-16 14:12:43,148 DEBUG ConfigurationItemTypeLoader - 加载映射:trackedrequest 到存储:trackingDB
2012-10-16 14:12:43,148 DEBUG ConfigurationItemTypeLoader - 加载映射:trackingbatch 到存储: trackingDB
2012-10-16 14:12:43,148 DEBUG ConfigurationItemTypeLoader - 加载映射:同步记录到存储:trackingDB
2012-10-16 14:12:43,148 DEBUG ConfigurationItemTypeLoader - 加载映射:trackingitem 到存储:trackingDB

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.

推荐答案

最后,问题与为页面类型指定了页面元数据有关.我看到记录的错误不会影响网站的性能,因此误导了我.

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.

这篇关于使用 Experience Manager 创建页面时出现 400 错误(错误请求)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆