定义自定义托管服务失败



我们正在尝试按照食谱开发自定义的 Intershop 托管服务:https://support.intershop.com/kb/index.php/Display/2329T4 但是,当尝试为我们组织的运营中启用服务时,它未在此处列出,并且存在警告日志消息:

WARN  localhost ES1 appserver0 [Test-Site]  com.intershop.component.service.internal.service.ORMServiceConfigurationBORepositoryImpl [] [Storefront] [8ocH1vmRUp4E1qKOZQQC5FFRtQai9r4QV6dAV1yx] [oBlLAFsfl5kFMqjA-0-00] "oBlLAFsfl5kFMqjA-0-00" Can't load implementation for service definition: cartridge='service_esb', service definition id='ESBServiceDefinition'. 

以下是服务:

<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://www.intershop.de/component/2010">
<!-- Adapter interface -->
<contract name="ESBService" class="com.test.service.capi.ESBService" />
<!-- ServiceDefintion implementation -->
<implementation name="ESBServiceDefinitionImpl" class="com.test.service.internal.ESBServiceDefinition" implements="ServiceDefinition" />
<!-- ServiceDefintion instance that has already one adapter added -->
<instance name="ESBServiceDefinition" with="ESBServiceDefinitionImpl" />
<!-- Registering the ServiceDefintion instance to the (global) ServiceDefinitionRegistry -->
<fulfill requirement="serviceDefinition" of="serviceDefinitionRegistry">
<instance with="ServiceDefinitionRegistry.Entry">
<fulfill requirement="cartridgeID" value="service_esb" />
<fulfill requirement="groupID" value="service.group.name.test" />
<fulfill requirement="parameterGroupID" value="ESBParameters" />
<fulfill requirement="serviceDefinitionID" value="esbService" />
<fulfill requirement="localizationKeyForName" value="service.definition.name.esbService" />
<fulfill requirement="serviceDefinition" with="ESBServiceDefinition" />
<fulfill requirement="ChainElementID" value="LogHandler" />
<fulfill requirement="ChainElementID" value="MonitorHandler" />
</instance>
</fulfill>
</components>

所有必需的类(AdapterInterface,Adapter,ExecutorService,ServiceDefinition - 扩展AbstractServiceDefinition(都已成功实现和编译。有谁知道为什么Intershop无法加载实现?

此外,在 Intershop Studio 的组件编辑器中,当打开 services.component 时,会显示以下错误:

With 'Implementation - ESBServiceDefinitionImpl (unresolved)' cannot be resolved

但是当在"ESBServiceDefinitionImpl"实现上单击CTRL +鼠标左键时,可以找到并且

<implementation name="ESBServiceDefinitionImpl" class="com.test.service.internal.ESBServiceDefinition" implements="ServiceDefinition" />

突出显示。

当然是错别字:)我用service.component命名文件夹"component",而不是"components"。 谢谢大家的帮助!

也许 ServiceDefinitionID 不匹配:

esbService vs. ESBServiceDefinition

您可以尝试以下组件设置吗:

<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://www.intershop.de/component/2010" scope="global">
<!-- Adapter interface -->
<contract name="ESBService" class="com.test.service.capi.ESBService" />
<!-- ServiceDefintion implementation -->
<implementation name="com.test.service.internal.ESBServiceDefinition" class="com.test.service.internal.ESBServiceDefinition" implements="ServiceDefinition" />
<!-- Registering the ServiceDefintion instance to the (global) ServiceDefinitionRegistry -->
<fulfill requirement="serviceDefinition" of="serviceDefinitionRegistry">
<instance with="ServiceDefinitionRegistry.Entry">
<fulfill requirement="cartridgeID" value="service_esb" />
<fulfill requirement="groupID" value="service.group.name.test" />
<fulfill requirement="parameterGroupID" value="ESBParameters" />
<fulfill requirement="serviceDefinitionID" value="esbService" />
<fulfill requirement="localizationKeyForName" value="service.definition.name.esbService" />
<fulfill requirement="serviceDefinition">
<instance with="com.test.service.internal.ESBServiceDefinition" />
</fulfill>
<fulfill requirement="ChainElementID" value="LogHandler" />
<fulfill requirement="ChainElementID" value="MonitorHandler" />
</instance>
</fulfill>
</components>

这是一个很长的机会,但是您是否在创建自定义托管服务后尝试重新部署服务器?

  1. 停止服务器。
  2. 运行gradlew deployServer
  3. 启动服务器

相关内容

  • 没有找到相关文章

最新更新