When testing my Tridion content delivery web service using a web browser, I can successfully get a list of the available collections by invoking "http://webservice/odata.svc/", however when I try to access one of the collections, for example;
http://webservice/odata.svc/Publications
I get;
<message xml:lang="en-US">Unable to retrieve desired results.</message>
or a specific item
http://webservice/odata.svc/Publications(19)
I get:
<message xml:lang="en-US">Unable to build publication entry:
Unable to retrieve desired results.</message>
In the logs I get the following (I've removed timestamps etc. to make it a bit more readable):
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.
This message points at my storage configuration, however I have not been able to find any clear guidance in the documentation as to how it should be set up to support the web service.
How should my storage be configured? Is it normal to expect to have a separate deployer for the service and the web site? What other issues should I be considering?
The CD Webservice requires all your content to be in the CD DB. This means nothing on the file system. If you still have stuff on the FS, some parts of the CD Webservice will not work. For example, think about pages that might be on the FS -- you will not be able to retrieve the PageContent via the CD Webservice.
To your problem, check that your CD Webservice cd_storage_conf.xml defines a database (JPA) connection. And of course it is functional. Check the usual suspects, db connection, user, pass, url, JARs...
Edit: Taking a closer look at your stack trace, you must have defined the FS as default storage medium (due to
getOriginalDAO(...)
, yielding aFSDAOFactory.getDAOForTypeMapping(...)
). So I think this is the root of the problem. Check also that your license is valid, and that your 'bindings' have not reverted to FS due to missing/expired CD license.