我正在使用5.7版本的hybris平台和JAVA 1.8.0.77,当我使用客户数据执行 ant all 时,它每次都会失败。
我看不出我错过了什么。
这是LocalExtensions.xml
<?xml version="1.0" encoding="UTF-8"?>
<hybrisconfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="resources/schemas/extensions.xsd">
<extensions>
<!--
All extensions located in ${HYBRIS_BIN_DIR}/platform/ext are automatically loaded.
More information about how to configure available extensions can be found here : https://wiki.hybris.com/x/nZVzC
-->
<path dir="${HYBRIS_BIN_DIR}" />
<path dir="${HYBRIS_BIN_DIR}/ext-commerce"/>
<!-- <extension dir="${HYBRIS_BIN_DIR}/ext-addon/addonsupport"/> -->
<extension name="addonsupport"/>
<extension name="mediaconversion"/>
<extension name="carrefourcockpits" />
<extension name="carrefourcore" />
<extension name="carrefourfacades" />
<extension name="carrefouroms" />
<extension name="carrefourinitialdata" />
<extension name="carrefourstorefront" />
<extension name="carrefourintegrationws" />
<extension name="carrefourinterfacews"/>
<!-- <extension name="carrefourtest" /> -->
<extension name='carrefourhmc' />
<extension name="carrefourcheckoutaddon"/>
<extension name='carrefourcmscomponentsaddon' />
<extension name="braspagintegration" />
<extension name="clearsaleintegration" />
<extension name="krsfacades" />
<extension name="krsservices" />
<extension name="krsasm"/>
<extension name="krsasmstorefront"/>
<extension name="backoffice" />
<extension name="commercesearch" />
<extension name="commercesearchbackoffice" />
<extension name="commercesearchhmc" />
<extension name="zipzonedeliverycore" />
<extension name="zipzonedeliveryhmc" />
<extension name="zipzonedeliveryfacades" />
<extension name="voucher" />
<extension name="voucherbackoffice" />
<extension name="vouchers" />
<extension name="solrfacetsearch" />
<extension name="solrserver" />
<!-- SAC extensions -->
<extension name="carrefoursacstorefront" />
<extension name="carrefoursaccore" />
<extension name="carrefoursacfacades" />
<!-- ASM -->
<extension name="assistedservicestorefront"/>
<extension name="acceleratorstorefrontcommons" />
<extension name="assistedservicefacades"/>
<!-- SSO -->
<!-- <extension name="samlsinglesignon"/> -->
<!-- <extension name="krssso"/> -->
<!-- OMS -->
<extension name="warehousing"/>
<extension name="warehousingbackoffice"/>
<extension name="ordermanagementbackoffice"/>
<extension name="platformwebservices"/>
<!-- data hub -->
<extension name='datahubadapter' />
<extension name='datahubbackoffice' />
<!-- analytics and business events for hybris marketing integration -->
<extension dir='${HYBRIS_BIN_DIR}/custom/hybrisanalyticsaddon'/>
<extension name='eventtrackingservices' />
<extension name='eventtrackingmodel' />
<extension name='eventtrackingpublisher' />
<extension name='eventtrackingwsaddon' />
<!-- yMkt integration -->
<extension dir="${HYBRIS_BIN_DIR}/custom/ypshybrismarketing/ymkt-hybris/cpoexport"/>
<extension name='yc4ccarrefour' />
<extension name='krsorderstatus' />
<extension name="wishlist"/>
</extensions>
</hybrisconfig>
carrefoursacfacades
GiftCardPayment定义
package br.com.carrefour.core.jalo;
import de.hybris.platform.jalo.Item;
import de.hybris.platform.jalo.JaloBusinessException;
import de.hybris.platform.jalo.SessionContext;
import de.hybris.platform.jalo.type.ComposedType;
import org.apache.log4j.Logger;
public class GiftCardPayment extends GeneratedGiftCardPayment
{
@SuppressWarnings("unused")
private final static Logger LOG = Logger.getLogger( GiftCardPayment.class.getName() );
@Override
protected Item createItem(final SessionContext ctx, final ComposedType type, final ItemAttributeMap allAttributes) throws JaloBusinessException
{
// business code placed here will be executed before the item is created
// then create the item
final Item item = super.createItem( ctx, type, allAttributes );
// business code placed here will be executed after the item was created
// and return the item
return item;
}
}
项目创建
<itemtype code="GiftCardPayment" extends="PaymentMode">
<attributes>
<attribute qualifier="maximumGiftCardAmount" autocreate="true"
type="java.lang.Integer">
<modifiers read="true" write="true" search="true" />
<persistence type="property" />
</attribute>
<attribute qualifier="valueGiftCard" autocreate="true"
type="java.lang.Double">
<modifiers read="true" write="true" search="true" />
<persistence type="property" />
</attribute>
</attributes>
</itemtype>
<itemtype code="BoletoPayment" extends="paymentmode">
<description>Boleto Payment</description>
</itemtype>
答案 0 :(得分:0)
First thing try to clean your localextensions.xml file, for example only on path tag is required.
How did you generate it ? Did you use any installer ?
Have you tried 'ant clean all', it seems that GiftCardPaymentData has a missing dependency on AbstractPaymentInfo, on a local install of Hybris 5.7 I only have PaymentInfo I think you have added legacy source code ?
If the "ant clean all" doesn't fix your issue could you share the items.xml file of you carrefourfacades extension ?
答案 1 :(得分:0)
您的localextensions.xml中似乎没有commercefacades
,这是宣告AbstractPaymentInfoData
的地方。
您可以将它明确地添加到localextensions.xml中,也可以将其声明为carrefourcore
中的依赖项(或者在定义失败的GiftCardPaymentInfoData
时)`extensioninfo.xml&#39;文件通过添加如下行:
<requires-extension name="commercefacades"/>
如果这没有帮助,请在ant任务列出完整的hybris扩展依赖项列表时发布控制台日志的一部分,如下所示。 (commercefacades应该出现在那里)
[echo] ---------------------------------------------------------------
[echo] --- Extensions in dependency order ( options:
[echo] --- @deprecated: is deprecated, p: platform extension,*: auto-required
[echo] --- ?: lazy-loaded, i: got items.xml, b: got beans.xml, c: got core module
[echo] --- w: got web module, h: got HMC module )
[echo] ---------------------------------------------------------------
[echo] core 6.0.0.0-SNAPSHOT [p*cib]
[echo] testweb 6.0.0.0-SNAPSHOT [p*w]
[echo] scripting 6.0.0.0-SNAPSHOT [p*ci]
[echo] paymentstandard 6.0.0.0-SNAPSHOT [p*ci]
[echo] mediaweb 6.0.0.0-SNAPSHOT [p*cw]
[echo] maintenanceweb 6.0.0.0-SNAPSHOT [p*w]
[echo] deliveryzone 6.0.0.0-SNAPSHOT [p*ci]
[echo] commons 6.0.0.0-SNAPSHOT [p*ci]
[...]
[echo] mcc->(impex,processing,cockpit) 6.0.0.0-SNAPSHOT [ciw] path:/Users/sebastianschaer/dev/bitwisers/code/ruleenginesuite/hybris/bin/ext-cockpit/mcc
[echo] ---------------------------------------------------------------
[echo]
<强>替代强>: 如果由于缺少扩展而没有这个错误(我没有在commercefacades中声明AbstractPaymentInfoData,但是我正在处理更新的版本),那么您对GiftCardPaymentInfoData的bean定义可能会延伸错误的类型,即不存在的类型。 您是否从较旧的hybris版本迁移到5.7版本?
如果是这样,您可能需要更改GiftCardPaymentInfoData的bean定义(在EXTENSION_NAME- beans.xml文件中的某个扩展中声明)并将其更改为可能de.hybris.platform.commercefacades.order.data.CCPaymentInfoData
或de.hybris.platform.acceleratorservices.payment.data.PaymentInfoData
或另一个已经存在的DTO ..
如果您正在迁移,您应该在hybris wiki上查找迁移文档,看看对此做了哪些更改。
希望这有帮助,
塞巴斯蒂安