Hybris Fail 什么时候代码自动生成 - ant all

Hybris Fail when is the code is auto generating - ant all

我正在使用 5.7 版本的 hybris 平台和 JAVA 1.8.0.77,当我对客户数据执行 ant all 时,每次都失败.

Console Log

我看不到我错过了什么。

这里是 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>

家乐福店

resources CarrefourFacades

礼品卡支付定义

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>

首先尝试清理您的 localextensions.xml 文件,例如只需要路径标记。

你是怎么生成的?您是否使用任何安装程序?

您是否尝试过 'ant clean all',在本地安装的 Hybris 5.7 上,GiftCardPaymentData 似乎缺少对 AbstractPaymentInfo 的依赖我只有 PaymentInfo 我认为您添加了遗留源代码?

如果 "ant clean all" 不能解决您的问题,您可以分享您的 carrefourfacades 扩展程序的 items.xml 文件吗?

您的 localextensions.xml 中似乎没有 commercefacades,这是声明 AbstractPaymentInfoData 的地方。 您可以将它显式添加到您的 localextensions.xml 中,或者您在 carrefourcore 中声明它为依赖项(或定义失败的 GiftCardPaymentInfoData 的任何地方)`extensioninfo.xml' 文件,方法是添加一行喜欢:

<requires-extension name="commercefacades"/>

如果这没有帮助,请 post 当 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.CCPaymentInfoDatade.hybris.platform.acceleratorservices.payment.data.PaymentInfoData 或另一个已经存在的 DTO.. 如果您正在迁移,您应该在 hybris wiki 上查找迁移文档以查看对此进行了哪些更改。

希望这对您有所帮助,

塞巴斯蒂安