コンテンツ配信 Web サービスのアンビエント データ フレームワークを構成しています。ブラウザーでサービスの URL にアクセスすると、以下のエラーがスローされます。
「/」アプリケーションでサーバー エラーが発生しました。
クレーム プロセッサの実装クラスが見つかりません: com.tridion.ambientdata.processing.ExampleClaimProcessor1 説明: 現在の Web 要求の実行中に未処理の例外が発生しました。エラーの詳細とコード内のどこでエラーが発生したかについては、スタック トレースを確認してください。
例外の詳細:
Com.Tridion.Ambientdata.AmbientDataException: Cannot find claim processor implementation class: com.tridion.ambientdata.processing.ExampleClaimProcessor1
ソース エラー:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
スタックトレース:
[AmbientDataException: Cannot find claim processor implementation class: com.tridion.ambientdata.processing.ExampleClaimProcessor1]
Codemesh.JuggerNET.NTypeValue.Throw(Int64 inst) +373
Codemesh.JuggerNET.JavaClass.ThrowTypedException(Int64 inst) +1364
Codemesh.JuggerNET.JavaMethod.CallObject(JavaProxy jpo, JavaMethodArguments args) +524
Com.Tridion.Ambientdata.EngineFactory.NewEngine(AmbientDataConfig ambientDataConfig) +126
Tridion.ContentDelivery.AmbientData.HttpModule.InitializeAmbientFramework() +144
Tridion.ContentDelivery.AmbientData.HttpModule.Init(HttpApplication application) +60
System.Web.HttpApplication.InitModulesCommon() +172
System.Web.HttpApplication.InitModules() +43
System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +828
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +304
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +327
以下は、私の cd_ambient_cartridge_conf.xml ファイルです。
cd_ambient_cartridge_conf.xml
<?xml version="1.0" encoding="UTF-8"?>
<CartridgeDefinition Version="6.1" Uri="tcd:cartridge:example" Description="Example cartridge."
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="schemas/cd_ambient_cartridge_conf.xsd">
<ClaimDefinitions>
<ClaimDefinition Uri="tcd:claim:userid" Scope="SESSION" Description="The user's unique identifier." />
<ClaimDefinition Uri="tcd:claim:username" Scope="SESSION" Description="The user's full name." />
<ClaimDefinition Uri="tcd:claim:usersex" Scope="SESSION" Description="The user's sex (M or F)." />
<ClaimDefinition Uri="tcd:claim:userage" Scope="SESSION" Description="The user's age in years." />
</ClaimDefinitions>
<ClaimProcessorDefinitions>
<ClaimProcessorDefinition Uri="tcd:claimprocessor:example:userdetails" ImplementationClass="com.tridion.ambientdata.processing.ExampleClaimProcessor1"
Description="Example claim processor that gets user details.">
<RequestStart>
<InputClaims>
<ClaimDefinition Uri="tcd:claim:userid" />
</InputClaims>
<OutputClaims>
<ClaimDefinition Uri="tcd:claim:username" />
<ClaimDefinition Uri="tcd:claim:usersex" />
<ClaimDefinition Uri="tcd:claim:userage" />
</OutputClaims>
</RequestStart>
</ClaimProcessorDefinition>
<ClaimProcessorDefinition Uri="tcd:claimprocessor:example:example2"
ConfigProviderClass="com.tridion.ambientdata.processing.ExampleClaimProcessorConfigProvider" />
</ClaimProcessorDefinitions>
</CartridgeDefinition>
ここに私の cd_ambient_conf.xml ファイルがあります:
cd_ambient_conf.xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration Version="6.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="schemas/cd_ambient_conf.xsd">
<Cartridges>
<Cartridge File="cd_ambient_cartridge_conf.xml"/>
<Cartridge File="cd_webservice_preview_cartridge.xml"/>
<!--
-->
</Cartridges>
<!-- Cookies settings -->
<!--
<Cookies>
<CookieClaim DefaultValue="true" Name="CookieClaim"/>
<Cookie Type="Tracking" Name="myTrackingCookie" Path="/"/>
<Cookie Type="Session" Name="mySessionCookie" Path="/"/>
</Cookies>
-->
</Configuration>
また、コンテンツ デリバリ Web サービスのログ ファイルのデバッグ情報は次のとおりです。
cd_core.2012-11-07.log のデバッグ情報
2012-11-07 05:00:11,421 DEBUG ServiceExtensionLoader - Loading extension points for interface com.tridion.webservices.extension.ODataServiceOperation.
2012-11-07 05:00:11,437 DEBUG ServiceExtensionLoader - Loading extension points for interface com.tridion.webservices.extension.ODataWritableEntryService.
2012-11-07 05:00:11,437 DEBUG ServiceExtensionLoader - Loading extension points from config file: jar:file:/C:/Program%20Files/Tridion/CDWebservice/bin/lib/cd_preview_webservice.jar!/META-INF/services/com.tridion.webservices.extension.ODataWritableEntryService.
2012-11-07 05:00:11,452 INFO ODataWebserviceHandler - Adding OData writable entry service: WritablePageContentsEntryService.
2012-11-07 05:00:11,468 INFO ODataWebserviceHandler - Adding OData writable entry service: WritableComponentPresentationsEntryService.
2012-11-07 05:00:11,468 INFO ODataWebserviceHandler - Adding OData writable entry service: WritablePageMetasEntryService.
2012-11-07 05:00:11,468 INFO ODataWebserviceHandler - Adding OData writable entry service: WritableComponentMetasEntryService.
2012-11-07 05:00:11,468 INFO ODataWebserviceHandler - Adding OData writable entry service: WritableKeywordsEntryService.
2012-11-07 05:00:11,468 INFO ODataWebserviceHandler - Adding OData writable entry service: WritableBinaryContentsEntryService.
2012-11-07 05:00:11,468 INFO ODataWebserviceHandler - Adding OData writable entry service: WritableCustomMetasEntryService.
2012-11-07 05:00:11,468 INFO ODataWebserviceHandler - Adding OData writable entry service: WritableBinaryVariantsEntryService.
2012-11-07 05:00:11,468 INFO ODataWebserviceHandler - Adding OData writable entry service: WritableBinaryMetasEntryService.
2012-11-07 05:00:11,468 DEBUG ServiceExtensionLoader - Loading extension points for interface com.tridion.webservices.extension.ODataWritableStreamEntryService.
2012-11-07 05:00:11,468 DEBUG ServiceExtensionLoader - Loading extension points from config file: jar:file:/C:/Program%20Files/Tridion/CDWebservice/bin/lib/cd_preview_webservice.jar!/META-INF/services/com.tridion.webservices.extension.ODataWritableStreamEntryService.
2012-11-07 05:00:11,484 INFO ODataWebserviceHandler - Adding OData writable entry service: WritableStreamBinaryContentsEntryService.
2012-11-07 05:00:11,484 INFO JAXBContextResolver - Adding default JAXB types.
2012-11-07 05:00:11,484 DEBUG ServiceExtensionLoader - Loading extension points for interface com.tridion.webservices.extension.ODataEntryRegistrationService.
2012-11-07 05:00:11,484 DEBUG ServiceExtensionLoader - Loading extension points from config file: jar:file:/C:/Program%20Files/Tridion/CDWebservice/bin/lib/cd_preview_webservice.jar!/META-INF/services/com.tridion.webservices.extension.ODataEntryRegistrationService.
2012-11-07 05:00:11,484 INFO JAXBContextResolver - Adding BinaryContents JAXB type.
2012-11-07 05:00:11,812 WARN AmbientDataContext - There is no current ambient data context - the ambient data framework is not properly initialised
2012-11-07 05:00:11,812 DEBUG AmbientDataContext - Setting current ambient data context: com.tridion.ambientdata.web.WebContext
どんな助けでも大歓迎です。前もって感謝します。
編集 - CDA申請について
ウェブページのエラー
Cannot find claim processor implementation class: com.tridion.ambientdata.processing.ExampleClaimProcessor1
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Com.Tridion.Ambientdata.AmbientDataException: Cannot find claim processor implementation class: com.tridion.ambientdata.processing.ExampleClaimProcessor1
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[AmbientDataException: Cannot find claim processor implementation class: com.tridion.ambientdata.processing.ExampleClaimProcessor1]
Codemesh.JuggerNET.NTypeValue.Throw(Int64 inst) +373
Codemesh.JuggerNET.JavaClass.ThrowTypedException(Int64 inst) +1364
Codemesh.JuggerNET.JavaMethod.CallObject(JavaProxy jpo, JavaMethodArguments args) +524
Com.Tridion.Ambientdata.EngineFactory.NewEngine(AmbientDataConfig ambientDataConfig) +126
Tridion.ContentDelivery.AmbientData.HttpModule.InitializeAmbientFramework() +144
Tridion.ContentDelivery.AmbientData.HttpModule.OnRequestStart(Object sender, EventArgs e) +68
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
cd_ambient_conf.xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration Version="6.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"/>
<Cartridge File="footprint_cartridge_conf.xml"/>
</Cartridges>
<ClaimStoreProvider>com.tridion.siteedit.preview.PreviewClaimStoreProvider</ClaimStoreProvider>
<!-- Cookies settings -->
<!--
<Cookies>
<CookieClaim DefaultValue="true" Name="CookieClaim"/>
<Cookie Type="Tracking" Name="myTrackingCookie" Path="/"/>
<Cookie Type="Session" Name="mySessionCookie" Path="/"/>
</Cookies>
-->
</Configuration>
cd_ambient_cartridge_conf.xml
<?xml version="1.0" encoding="UTF-8"?>
<CartridgeDefinition Version="6.1" Uri="tcd:cartridge:example" Description="Example cartridge."
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="schemas/cd_ambient_cartridge_conf.xsd">
<ClaimDefinitions>
<ClaimDefinition Uri="tcd:claim:userid" Scope="SESSION" Description="The user's unique identifier." />
<ClaimDefinition Uri="tcd:claim:username" Scope="SESSION" Description="The user's full name." />
<ClaimDefinition Uri="tcd:claim:usersex" Scope="SESSION" Description="The user's sex (M or F)." />
<ClaimDefinition Uri="tcd:claim:userage" Scope="SESSION" Description="The user's age in years." />
</ClaimDefinitions>
<ClaimProcessorDefinitions>
<ClaimProcessorDefinition Uri="tcd:claimprocessor:example:userdetails" ImplementationClass="com.tridion.ambientdata.processing.ExampleClaimProcessor1"
Description="Example claim processor that gets user details.">
<RequestStart>
<InputClaims>
<ClaimDefinition Uri="tcd:claim:userid" />
</InputClaims>
<OutputClaims>
<ClaimDefinition Uri="tcd:claim:username" />
<ClaimDefinition Uri="tcd:claim:usersex" />
<ClaimDefinition Uri="tcd:claim:userage" />
</OutputClaims>
</RequestStart>
</ClaimProcessorDefinition>
<ClaimProcessorDefinition Uri="tcd:claimprocessor:example:example2"
ConfigProviderClass="com.tridion.ambientdata.processing.ExampleClaimProcessorConfigProvider" />
</ClaimProcessorDefinitions>
</CartridgeDefinition>
ログファイルのエラー
2012-11-07 14:36:31,962 WARN AmbientDataContext - There is no current ambient data context - the ambient data framework is not properly initialised
2012-11-07 14:36:31,962 DEBUG AmbientDataContext - Setting current ambient data context: com.tridion.ambientdata.web.WebContext
2012-11-07 14:36:32,071 ERROR XMLConfigurationReader - Error while validating file 'cd_ambient_conf.xml' with schema 'schemas/cd_ambient_conf.xsd'. cvc-complex-type.2.4.a: Invalid content was found starting with element 'ClaimStoreProvider'. One of '{Cookies}' is expected.
エラーが示すように、Cookie の 1 つが期待されますが、ドキュメントではどこにも言及されていません。前もって感謝します 。
注-このエラーが発生し、ページを再度更新すると消え、ページは正常に機能します。つまり、代替ページヒットになります。