3

I am upgrading a dev environment from 2013SP1 to Web8 keeping it simple for now using legacy in-process APIs. I have a dedicated new CD webservice Java webapp created from the provided .war file.

The odata.svc is reachable just fine when I disable oAuth, and lists the available entities. However hitting Refresh Preview in XPM fails with the following in the Windows event log:

Unable to update the changes using OData Service. An error occurred while processing this request. The expected content type for a batch requests is "multipart/mixed;boundary=batch" not "application/xml". Component: Tridion.ContentManager.Publishing.PreviewService Errorcode: 1003 User: NT AUTHORITY\NETWORK SERVICE StackTrace Information Details: at System.Data.Services.Client.DataServiceContext.SaveResult.HandleBatchResponse() at System.Data.Services.Client.DataServiceContext.SaveResult.HandleBatchResponse() at System.Data.Services.Client.DataServiceContext.SaveResult.EndRequest() at System.Data.Services.Client.DataServiceContext.SaveChanges(SaveChangesOptions options) at Tridion.ContentManager.Publishing.PreviewService.ServiceImplementation.Preview(IEnumerable1 publishedItemsInfo, TcmUri publishingTargetId) at Tridion.ContentManager.Publishing.PreviewService.ServiceImplementation.Preview(IEnumerable1 publishedItemsInfo, TcmUri publishingTargetId) at Tridion.ContentManager.Publishing.PreviewService.FastTrackPublishingService.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)

And the following in the cd_core log:

2016-01-25 17:46:23,560 DEBUG ServerEngine - Running request start claim processor class com.sdl.web.content.claimprocessor.WritableODataClaimProcessor 2016-01-25 17:46:23,566 DEBUG ODataServiceImpl - Handling request: POST http://mydemo.com:8080/cd_webservice/odata.svc/$batch 2016-01-25 17:46:23,572 DEBUG ODataParserImpl - Parsing URI: http://mydemo.com:8080/cd_webservice/odata.svc/$batch 2016-01-25 17:46:23,573 DEBUG ODataParserImpl - Parse result: ODataUri(http://mydemo.com:8080/cd_webservice/odata.svc,BatchUri) 2016-01-25 17:46:23,648 DEBUG AtomUnmarshaller - Match for AtomUnmarshaller: POST http://mydemo.com:8080/cd_webservice/odata.svc/$batch with score: 0 2016-01-25 17:46:23,650 DEBUG BatchUnmarshaller - Matched MultipartUnmarshaller: POST http://mydemo.com:8080/cd_webservice/odata.svc/$batch with score: 180 2016-01-25 17:46:23,650 DEBUG JsonUnmarshaller - Match for JsonUnmarshaller: POST http://mydemo.com:8080/cd_webservice/odata.svc/$batch with score: 0 2016-01-25 17:46:23,655 INFO BatchUnmarshaller - Multipart unmarshaller invoked with POST http://mydemo.com:8080/cd_webservice/odata.svc/$batch 2016-01-25 17:46:23,782 DEBUG ODataMessageRouter - Sending error message for exception: com.sdl.odata.api.parser.ODataBatchParseException: DELETE ' expected butM' found at com.sdl.odata.parser.ODataBatchRequestParser.parseBatch(ODataBatchRequestParser.scala:49) ~[odata_parser-2.0.0-1218.jar:2.0.0-1218] at com.sdl.odata.unmarshaller.batch.ODataBatchParser.processEntity(ODataBatchParser.java:44) ~[odata_renderer-2.0.0-1218.jar:2.0.0-1218] at com.sdl.odata.unmarshaller.AbstractParser.getODataEntity(AbstractParser.java:79) ~[odata_renderer-2.0.0-1218.jar:2.0.0-1218] at com.sdl.odata.unmarshaller.batch.BatchUnmarshaller.unmarshall(BatchUnmarshaller.java:60) ~[odata_renderer-2.0.0-1218.jar:2.0.0-1218] at com.sdl.odata.service.actor.ODataUnmarshallerActor$$anonfun$receive$1.applyOrElse(ODataUnmarshallerActor.scala:37) ~[odata_service-2.0.0-1218.jar:2.0.0-1218] at akka.actor.Actor$class.aroundReceive(Actor.scala:465) ~[akka-actor_2.10-2.3.2.jar:na] at com.sdl.odata.service.actor.ODataUnmarshallerActor.aroundReceive(ODataUnmarshallerActor.scala:30) ~[odata_service-2.0.0-1218.jar:2.0.0-1218] at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) ~[akka-actor_2.10-2.3.2.jar:na] at akka.actor.ActorCell.invoke(ActorCell.scala:487) ~[akka-actor_2.10-2.3.2.jar:na] at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) ~[akka-actor_2.10-2.3.2.jar:na] at akka.dispatch.Mailbox.run(Mailbox.scala:220) ~[akka-actor_2.10-2.3.2.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_60] at java.lang.Thread.run(Unknown Source) [na:1.8.0_60] 2016-01-25 17:46:23,786 DEBUG JsonServiceDocumentRenderer - Score of JSON service document renderer is 0 2016-01-25 17:46:23,786 DEBUG XMLServiceDocumentRenderer - Score of XML service document renderer is 0 2016-01-25 17:46:23,787 DEBUG XMLErrorResponseRenderer - Start rendering error response for request: POST http://mydemo.com:8080/cd_webservice/odata.svc/$batch 2016-01-25 17:46:23,788 DEBUG XMLErrorResponseRenderer - End rendering error response for request: POST http://mydemo.com:8080/cd_webservice/odata.svc/$batch 2016-01-25 17:46:23,789 DEBUG ODataServiceImpl - Request completed in 223

  • I am using the cd_ambient_conf.xml as provided in the .war file
  • Do I need to change something in the web.xml to set the requests content type?
  • I tried to disable the ReadWrite filter in web.xml but it does not change the result

Any pointers are welcome! Thanks

1 Answer 1

1

I find this very strange, it almost looks like you are trying to send preview content to a non preview enabled webservice. The error you are getting on the Webservice side indicates that it is using the new OData v4 Batching endpoint which is not meant for preview actions.

Are you sure you installed 'preview/service/standalone/' or its equivelant war file for the preview webservice? Keep in mind that you cannot use the content-service for this, you need to have this seperate preview webservice for sending the preview batch content.

This means in your discovery service your preview capability needs to point to this preview webservice. Have you done this?

6
  • Thanks Renze, I will try the micro service instead. I did not use the discovery service as in legacy mode I thought I could keep the publication target config to point to the preview webservice endpoint Commented Jan 27, 2016 at 11:18
  • It is my understanding that CD always needs the discovery service, even if you're not using Topology Manager
    – Nuno Linhares
    Commented Jan 27, 2016 at 12:38
  • ok good to know I will register it there then. thanks Commented Jan 27, 2016 at 13:25
  • Apart from Configuring the location of the Discovery Service in the web.config of my staging site, do I need to configure it somewhere else like in the cd_storage_conf.xml? Commented Jan 28, 2016 at 7:00
  • Hi Philippe, could you resolved this issue? I have installed with Legacy mode to, but i'm not sure if I need to install and configure DiscoveryService. Thanks in advance! Commented May 23, 2016 at 11:01

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.