9

I am getting a java.lang.ClassCastException after clicking on the Update Preview button.

The setup is using a standard Tridion 2013 Content Delivery stack (not the magic stuff some of you saw at #sdlinnovate), JSP-based site (tomcat) and JSP-hosted WebService for session preview. I get the following errors:

In odata's cd_core_log: No errors logged.

In tomcat's access log:

SEVERE: Servlet.service() for servlet [Content Delivery Web service] in context with path [/preview-ws] threw exception java.lang.ClassCastException: com.tridion.webservices.odata.input.handler.ODataResponse cannot be cast to com.tridion.webservices.odata.input.handler.ODataBatchResponse at com.tridion.webservices.odata.ODataWebservice.handleBatchRequest(ODataWebservice.java:147) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)[...]

In Windows Event Viewer:

Unable to update the changes using OData Service. The remote server returned an error: (500) Internal Server Error. Component: Tridion.ContentManager.Publishing.PreviewService 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.ContentManager.Publishing.PreviewService.ServiceImplementation.Preview(IEnumerable1 publishedItemsInfo, TcmUri publishingTargetId) at Tridion.ContentManager.Publishing.PreviewService.ServiceImplementation.Preview(IEnumerable1 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)

Any clues?

8

Found it (thanks to Andrey G @ SDL)

The webservice ambient framework cartridge was commented out in cd_ambient_conf.xml.

<Cartridges>
    <Cartridge File="cd_webservice_preview_cartridge.xml"/>
</Cartridges>
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.