Question

I've been configuring XPM (Tridion 2012 UI Update) on a JSP development site. It's an all-in-one package, with Content Manager, Databases and Staging on the same server for development purposes.

I've made the following configurations:

  • Defined Staging Web App (called JSPStaging and set to a host header of jspstaging.project.dev), which receives content and places this content in its own folder from the HTTPUpload Web App, which is defined in the Publication Target in the CME

  • I've added the Java Session Preview Webservice (called cd_preview_webservice)

Currently my sites are being run by Tomcat 7, and IIS 7.5 is used for routing requests to port 8080 (Tomcat) which handles jspstaging.project.dev.

I know this is hardly an ideal situation, but I have to make do.

The problem at hand: I've currently successfully implemented XPM (or at least, the dashboard, the ability to edit components and save those) However, as soon as you want to update the page, it sometimes refreshes and it sometimes returns an error:

The remote server returned an error: (404) Not Found.

This is an (orange) Tridion Message. I'm not entirely sure the 404 error described above is the same as the one documented on the SDL Live Content.

This is the error in the Event Viewer on the server:

Unable to update the changes using OData Service. The remote server returned an error: (404) Not Found. Component: Tridion.SiteEdit.FastTrackPublishing Errorcode: 1003 User: NT AUTHORITY\NETWORK SERVICE 

As such, I'm following this downright amazing blogpost Albert Romkes wrote, and at point 2 in his article he mentions navigating to odata.svc. I cannot seem to find the file anywhere on my staging or session preview web apps. I've installed .NET applications of Tridion before, and while the .NET app on the installation media (among other files) has an acces_token and a odata.svc file, I noticed that the JAVA install of the webservice of session preview does not have these files. However, later in the install guide you need those files to set up publishing.

When I follow the JSP site part and fill in the fields on the Session Preview Tab of the Publication Target, I cannot navigate to this odata url on the server itself, which is now

http://localhost:8080/cd_preview_webservice/cdws/odata.svc/

The Tridion Logging does not say something is wrong, for staging AND for session preview web app, as well as the Tomcat logs. They even say OData is working just fine, as far as I can tell...

If I cannot navigate to the url posted above, does this mean something is wrong, or that the 404 error is because of that?

EDIT

my web.xml of staging:

    <?xml version="1.0" encoding="UTF-8"?>

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> Content Delivery Web service

<jsp-config> 
    <taglib>
        <taglib-uri>cd_tags</taglib-uri>
        <taglib-location>/WEB-INF/lib/cd_tags.tld</taglib-location>
    </taglib>
</jsp-config>
<listener>
    <listener-class>
        com.tridion.storage.persistence.session.SessionManagementContextListener
    </listener-class>
</listener>

<!--
OData and linking Web service
-->
<servlet>
    <servlet-name>Content Delivery Web service</servlet-name>
    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    <init-param>
        <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
        <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig</param-value>
    </init-param>
    <init-param>
        <param-name>com.sun.jersey.config.property.classnames</param-name>
        <param-value>com.tridion.webservices.odata.ODataWebservice;com.tridion.webservices.linking.LinkingService;com.tridion.webservices.odata.JAXBContextResolver</param-value>
    </init-param>
</servlet>
    <filter>
    <filter-name>Ambient Data Framework</filter-name>
    <filter-class>com.tridion.ambientdata.web.AmbientDataServletFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>Ambient Data Framework</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

<servlet-mapping>
    <servlet-name>Content Delivery Web service</servlet-name>
    <url-pattern>/cdws/*</url-pattern>
</servlet-mapping>

<filter>
    <filter-name>Page Content Filter</filter-name>
    <filter-class>com.tridion.preview.web.PageContentFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>Page Content Filter</filter-name>
    <url-pattern>/cdws/*</url-pattern>
</filter-mapping>

<listener>
    <listener-class>com.tridion.webservices.odata.ODataContextListener</listener-class>
</listener>
<filter>
    <filter-name>Binary Content Filter</filter-name>
    <filter-class>com.tridion.preview.web.BinaryContentFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>Binary Content Filter</filter-name>
    <url-pattern>/Images/*</url-pattern>
</filter-mapping>

No correct solution

OTHER TIPS

You mentioned that you've added the cd_preview_webservice, however, the error message dictates that it's not working. On the Java side, you won't see the odata.svc file as this url is handled by one of the classes within the jars, so don't worry about that.

In your Tomcat console, does it show that the app has been deployed/started without error?

Also the URL that you mention "/cd_preview_webservice/cdws/odata.svc/" has a "/cdws/" in it. This seems a bit irregular. Typically the url is "/cd_preview_webservice/odata.svc". What is does your web.xml look like?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top