de.hybris.platform.servicelayer.dto.converter.ConversionException

简介: de.hybris.platform.servicelayer.dto.converter.ConversionException

错误消息:


de.hybris.platform.servicelayer.dto.converter.ConversionException: Max field set size exceeded. Reason of that can be : too generic configuration, lack of properly defined BASIC field set level for data class, reccurency in data structure


这个错误消息和 handling ‘fields’ parameter 有关。


文档:


https://help.hybris.com/6.7.0/hcd/8c404c5886691014a48c88f4a49f9bf3.html


Section ‘Fields configuration’, ‘Field Set Builder’ : https://help.hybris.com/6.7.0/hcd/e571a0e6f7524d4ab62e29cc2b387aeb.html

Mapping mechanism in occ is based on Orika mapper.

There is additional filter which check if currently mapped attribute is on the list of attributes which should be mapped. That list is created based on class definition and fieldSetLevelMappings by fieldSetBuilder (defined in dto-level-mappings-v2-spring.xml)


occ 中的映射机制基于 Orika 映射器。

还有一个额外的过滤器,用于检查当前映射的属性是否在应该映射的属性列表中。 该列表是根据 fieldSetBuilder(在 dto-level-mappings-v2-spring.xml 中定义)的类定义和 fieldSetLevelMappings 创建的。

<alias alias="fieldSetBuilder" name="defaultFieldSetBuilder"/>
     <bean id="defaultFieldSetBuilder"
           class="de.hybris.platform.webservicescommons.mapping.impl.DefaultFieldSetBuilder">
         <property name="defaultRecurrencyLevel" value="4"/>
         <property name="defaultMaxFieldSetSize" value="50000"/>
         <property name="fieldSetLevelHelper" ref="fieldSetLevelHelper"/>
     </bean>

There are two parameters which can influence how the field set builder works :


defaultRecurrencyLevel

defaultMaxFieldSetSize - If the limit is exceeded, an exception is thrown - this is exception you see.

It looks like for request you try to do - response dto is too complex

Verify if fieldsSetMapping for that dto class was defined properly.

If you don’t specify any fields attribute in request - value is taken from DEFAULT fieldSetLevelMapping.

Try to specify fields attribute for your call and verify if you still get that exception.


有两个参数可以影响字段集构建器的工作方式:


defaultRecurrencyLevel

defaultMaxFieldSetSize - 如果超出限制,则会引发异常 - 这是您看到的异常。

看起来您尝试执行的请求 - 响应 dto 太复杂了

验证是否正确定义了该 dto 类的 fieldsSetMapping。

如果您未在请求中指定任何字段属性 - 值取自 DEFAULT fieldSetLevelMapping。

尝试为您的呼叫指定 fields 属性并验证您是否仍然遇到该异常。


相关文章
|
存储 前端开发 Java
一文理解什么是DTO、VO、BO、PO、DO,并推荐一款IDEA转换插件
一文理解什么是DTO、VO、BO、PO、DO,并推荐一款IDEA转换插件
492 0
一文理解什么是DTO、VO、BO、PO、DO,并推荐一款IDEA转换插件
|
索引
Entity Framework 小知识(四)
Entity Framework 小知识(四)
116 0
|
数据库 数据库管理
Entity Framework 小知识(一)
Entity Framework 小知识(一)
107 0
|
SQL 数据库
Entity Framework 小知识(二)
Entity Framework 小知识(二)
150 0
|
数据库
Entity Framework 小知识(三)
Entity Framework 小知识(三)
129 0
|
数据库
Entity Framework 小知识(五)
Entity Framework 小知识(五)
119 0
使用SAP C4C ABSL获得某个employee的manager的uuid
使用SAP C4C ABSL获得某个employee的manager的uuid
Hybris的extension和ABAP的package
Hybris的extension和ABAP的package
82 0
Hybris的extension和ABAP的package