4

使用 Web 浏览器测试我的 Tridion 内容交付 Web 服务时,我可以通过调用“http://webservice/odata.svc/”成功获取可用集合的列表,但是当我尝试访问其中一个集合时,例子;

http://webservice/odata.svc/Publications

我明白了;

<message xml:lang="en-US">Unable to retrieve desired results.</message>

或特定项目

http://webservice/odata.svc/Publications(19)

我得到:

<message xml:lang="en-US">Unable to build publication entry: 
                             Unable to retrieve desired results.</message>

在日志中,我得到以下信息(我删除了时间戳等以使其更具可读性):

ODataService - ODATA.NET: Resource retrieval: Publications
WebContext - setCurrentClaimStore: com.tridion.ambientdata.dotnet.DotNetClaimStore@576504fa, thread: Thread-5
ODataWebserviceHandler - Requested a OData feed/entry: Publications with type: application/atom+xml
ODataWebserviceHandler - Setting $top to 25
ResolverBase - Requested OData collection
StorageManagerFactory - Loading a non cached DAO for publicationId/typeMapping/itemExtension: 0 / Query / null
JPQLExecutor - Can not create JPAQueryDAO object
    com.tridion.broker.StorageException: No Data Access Object for Query
    at com.tridion.storage.filesystem.FSDAOFactory.getDAOForTypeMapping(FSDAOFactory.java:177) ~[cd_datalayer.jar:na]
    at com.tridion.storage.StorageManagerFactory.getOriginalDAO(StorageManagerFactory.java:450) ~[cd_datalayer.jar:na]
    at com.tridion.storage.StorageManagerFactory.getDAO(StorageManagerFactory.java:271) ~[cd_datalayer.jar:na]        
    at com.tridion.storage.StorageManagerFactory.getDefaultDAO(StorageManagerFactory.java:178) ~[cd_datalayer.jar:na]
    at com.tridion.webservices.odata.input.jpql.JPQLExecutor.<init>(JPQLExecutor.java:61) [cd_webservice.jar:na]
    at com.tridion.webservices.odata.input.jpql.JPQLExecutor.getExecutor(JPQLExecutor.java:103) [cd_webservice.jar:na]
    at com.tridion.webservices.odata.input.resolver.PublicationsResolver.resolveCollection(PublicationsResolver.java:34) [cd_webservice.jar:na]
    at com.tridion.webservices.odata.input.resolver.ResolverBase.resolve(ResolverBase.java:74) [cd_webservice.jar:na]
    at com.tridion.webservices.odata.input.handler.ODataFeedRenderer.renderODataFeed(ODataFeedRenderer.java:45) [cd_webservice.jar:na]
    at com.tridion.webservices.odata.input.handler.ODataWebserviceHandler.handleODataEntity(ODataWebserviceHandler.java:193) [cd_webservice.jar:na]
    at com.tridion.webservices.odata.input.handler.ODataWebserviceHandler.handleResourceRequest(ODataWebserviceHandler.java:169) [cd_webservice.jar:na]
FilterValue - check if value: 25 is of Integer type
FilterValue - value: 25 is Integer
JPQLExecutor - JPAQueryDAO has not been instantiated. Probably FS storage type was used.    
ResolverBase - Unable to build feed Unable to retrieve desired results.    

此消息指向我的存储配置,但是我无法在文档中找到有关如何设置它以支持 Web 服务的任何明确指导。

我的存储应该如何配置?期望服务和网站有单独的部署程序是否正常?我还应该考虑哪些其他问题?

4

2 回答 2

6

CD Web 服务要求您的所有内容都在 CD DB 中。这对文件系统没有任何意义。如果 FS 上还有东西,CD Webservice 的某些部分将无法工作。例如,考虑可能在 FS 上的页面——您将无法通过 CD Webservice 检索 PageContent。

对于您的问题,请检查您的 CD Web 服务 cd_storage_conf.xml 是否定义了数据库 (JPA) 连接。当然,它是功能性的。检查通常的嫌疑人、数据库连接、用户、通行证、url、JAR...

编辑:仔细查看您的堆栈跟踪,您必须已将 FS 定义为默认存储介质(由于getOriginalDAO(...),产生 a FSDAOFactory.getDAOForTypeMapping(...))。所以我认为这是问题的根源。还要检查您的许可证是否有效,以及您的“绑定”是否由于缺少/过期的 CD 许可证而恢复为 FS。

于 2012-05-18T17:40:37.733 回答
1

作为其他人的额外输入,我也遇到了“无法检索所需结果”。响应,在我的情况下,这是由于我的 cd_licenses.xml 与其他配置文件不在 bin/config 目录中。

于 2014-08-12T18:36:25.070 回答