2

While setting up Experience manager web service the following exception occurred. Point me where I have configured wrongly. The same exception occurred while browsing for oData.svc as well.

Exception Details:

Exception type: TridionReflectionException 
    Exception message: <JavaException>
  <Type>com/tridion/util/TridionReflectionException</Type>
  <Message><![CDATA[Unable to load request class, was not found on classpath]]></Message>
  <StackTrace><![CDATA[com.tridion.util.TridionReflectionException: Unable to load request class, was not found on classpath
    at com.tridion.util.ReflectionUtil.loadClassInstanceWithTypes(ReflectionUtil.java:67)
    at com.tridion.util.ReflectionUtil.loadClassInstance(ReflectionUtil.java:108)
    at com.tridion.ambientdata.claimstore.providers.ClaimStoreProviderFactory.newClaimStoreProvider(ClaimStoreProviderFactory.java:25)
Caused by: java.lang.ClassNotFoundException: com.tridion.siteedit.preview.PreviewClaimStoreProvider
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.tridion.util.ReflectionUtil.loadClassInstanceWithTypes(ReflectionUtil.java:61)
    ... 2 more
   at Codemesh.JuggerNET.JavaClass.ThrowException(Exception ex)
   at Codemesh.JuggerNET.NTypeValue.Throw(Int64 inst)
   at Codemesh.JuggerNET.JavaClass.ThrowTypedException(Int64 inst)
   at Codemesh.JuggerNET.JavaMethod.CallObject(JavaProxy jpo, JavaMethodArguments args)
   at Codemesh.JuggerNET.JavaMethod.CallObject(JavaProxy jpo, Type declaredType, Boolean bLeaf, JavaMethodArguments jargs)
   at Com.Tridion.Ambientdata.Claimstore.Providers.ClaimStoreProviderFactory.NewClaimStoreProvider(AmbientDataConfig config, String defaultProviderClass)
   at Tridion.ContentDelivery.AmbientData.Runtime.AmbientRuntime.Setup()
   at Tridion.ContentDelivery.AmbientData.HttpModule.Init(HttpApplication application)
   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)]]></StackTrace>
</JavaException>
com.tridion.util.TridionReflectionException: Unable to load request class, was not found on classpath

Configuration details:

cd_ambient_conf.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration Version="7.1"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:noNamespaceSchemaLocation="schemas/cd_ambient_conf.xsd"> 
  <Cartridges>    
    <Cartridge File="cd_webservice_preview_cartridge.xml"/>
  </Cartridges>
  <ClaimStoreProvider>com.tridion.siteedit.preview.PreviewClaimStoreProvider</ClaimStoreProvider>  
</Configuration>

cd_webservice_preview_cartridge.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="schemas/cd_webservice_conf.xsd"> 
  <OData>
    <DefaultTop>25</DefaultTop>
    <FixedPublicationId>My publication Id</FixedPublicationId>
  </OData>
  <Accounts>
    <Account Id="tridion" Password="encrypted:fhS6whphjS2G2rG6aI6T/g==">
      <Metadata>
        <Param Name="FirstName" Value="SDL"/>
        <Param Name="LastName" Value="Tridion"/>
        <Param Name="Role" Value="Tridion test account"/>
        <Param Name="AllowedServices" Value="contentService"/>
      </Metadata>
    </Account>
    <Account Id="testuser" Password="testpass"/>
  </Accounts>
</Configuration>

cd_core.log:

DEBUG HttpModule - Ambient Data context initialization.
DEBUG HttpModule - Ambient Data context initialization.
DEBUG AmbientDataConfig - Found claimStoreProvider definition in configuration file: com.tridion.siteedit.preview.PreviewClaimStoreProvider.
DEBUG AmbientDataConfig - Configured ADF cookie prefix: TAFContext.
ERROR XMLConfigurationReader - Error while validating file 'cd_webservice_preview_cartridge.xml' with schema 'schemas/cd_ambient_cartridge_conf.xsd'. cvc-elt.1: Cannot find the declaration of element 'Configuration'.
DEBUG AmbientDataContext - Setting current ambient data context: com.tridion.ambientdata.web.WebContext
DEBUG HttpModule - Init
DEBUG HttpModule - Init
DEBUG AmbientRuntime - Ambient Runtime initialization.
DEBUG AmbientRuntime - Ambient Runtime initialization.
INFO  HTTPHeaderProcessor - The DigestKey was not configured, so no digest will be added to the headers and cookies and they won't be validated!
7
  • do you have <Cartridges> <Cartridge File="cd_webservice_preview_cartridge.xml"/> </Cartridges> in cd_ambient_conf.xml?
    – Raj Kumar
    Nov 11 '14 at 11:40
  • Yes, as shown in the config files Nov 11 '14 at 11:44
  • if above cd_ambient_conf.xml is of service, then remove following <CaimStoreProvider>com.tridion.siteedit.preview.PreviewClaimStoreProvider</ClaimStoreProvider> because this is required only in your CD Website.
    – Raj Kumar
    Nov 11 '14 at 12:09
  • Also, there is a pre-packaged zip and war file you can use to deploy the webservice, which contains all classes you need to run it, and here you can find sample configs: code.google.com/p/kickstart-tridion-environment/source/browse/…
    – Nuno Linhares
    Nov 11 '14 at 13:01
  • Removing "PreviewClaimStoreProvider" from webservice solved the issue. Nov 12 '14 at 12:27
1

The message "Unable to load request class, was not found on classpath" or "java.lang.ClassNotFoundException" is usually an indication of missing jars or classpaths which do not include a location where the expected jars can be found. Based on the message above, the class missing is com.tridion.siteedit.preview.PreviewClaimStoreProvider.

This class is in the cd_preview_web.jar which should be added in the Staging website where Experience Manager is expected to be running. Check this file is there with the correct 2013 SP1 version and also compare further settings on both SessionPreview and the Staging site as described on https://code.google.com/p/kickstart-tridion-environment/source/browse/#svn%2FCreateAnEnvironmentForMe%2FCreateAnEnvironmentForMe%2FConfigSamples%2Fpreview-webservice, I often found Nuno's setup as he mentioned above very useful as well.

1
  • i think Nuno shared same URL in his comment above.
    – Raj Kumar
    Nov 12 '14 at 3:11

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.