de.hybris.platform.servicelayer.dto.converter.ConversionException
錯(cuò)誤消息:
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
這個(gè)錯(cuò)誤消息和 handling ‘fields’ parameter 有關(guān)。
文檔:
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 中的映射機(jī)制基于 Orika 映射器。
還有一個(gè)額外的過濾器,用于檢查當(dāng)前映射的屬性是否在應(yīng)該映射的屬性列表中。 該列表是根據(jù) fieldSetBuilder(在 dto-level-mappings-v2-spring.xml 中定義)的類定義和 fieldSetLevelMappings 創(chuàng)建的。
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.
有兩個(gè)參數(shù)可以影響字段集構(gòu)建器的工作方式:
- defaultRecurrencyLevel
- defaultMaxFieldSetSize - 如果超出限制,則會(huì)引發(fā)異常 - 這是您看到的異常。
看起來您嘗試執(zhí)行的請(qǐng)求 - 響應(yīng) dto 太復(fù)雜了
驗(yàn)證是否正確定義了該 dto 類的 fieldsSetMapping。
如果您未在請(qǐng)求中指定任何字段屬性 - 值取自 DEFAULT fieldSetLevelMapping。
嘗試為您的呼叫指定 fields 屬性并驗(yàn)證您是否仍然遇到該異常。
總結(jié)
以上是生活随笔為你收集整理的de.hybris.platform.servicelayer.dto.converter.ConversionException的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 苹果第二财季营收948亿美元 净利润24
- 下一篇: 大规模裁员是“最后手段”,库克重申苹果暂