java.lang.IncompatibleClassChangeError: Found interface org.springframework.binding.mapping.MappingResult, but class was expected

ZK-Tracker | hawk | 6 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    copied from http://code.google.com/p/zkspring/issues/detail?id=17 ---- Re-posted from SF tracker https://sourceforge.net/tracker/?func=detail&aid=2566429&group_id=152762&atid=785191 (Submitted: Lendle Tseng ( lendle ) - 2009-02-04 18:51:18 PST) Hello, I've tried to use zk data binding with zk + spring web flow integration, but I got some strange exception. the zul file is like the following {code:xml} <?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit"?> <?variable-resolver class="org.zkoss.spring.DelegatingVariableResolver"?> <zk:zk xmlns="http://www.zkoss.org/2005/zk/native" xmlns:zul="http://www.zkoss.org/2005/zul" xmlns:zk="http://www.zkoss.org/2005/zk"> <zul:window title="My First window" border="normal"> <zul:grid model="@{flowBean1.banks}"> <zul:columns> <zul:column label="ID"/> <zul:column label="Name"/> </zul:columns> <zul:rows> <zul:row self="@{each='bank'}"> <zul:textbox value="@{bank.bankPK.noBank}"/> <zul:textbox value="@{bank.nameBank}"/> </zul:row> </zul:rows> </zul:grid> <zul:button self="@{action(finish)}" label="Finish"/><br/> <zul:button self="@{action(restart)}" label="Restart"/> </zul:window> </zk:zk> {code} If I click Restart or Finish button, I always get the following exception >>java.lang.IncompatibleClassChangeError: Found interface org.springframework.binding.mapping.MappingResult, but class was expected >> at org.zkoss.spring.webflow.execution.ZkFlowView$PropertyNotFoundError.test(ZkFlowView.java:262) >> at org.springframework.binding.mapping.impl.DefaultMappingResults.getResults(DefaultMappingResults.java:91) >> at org.zkoss.spring.webflow.execution.ZkFlowView.onlyPropertyNotFoundErrorsPresent(ZkFlowView.java:191) >> at org.zkoss.spring.webflow.execution.ZkFlowView.hasMappingErrors(ZkFlowView.java:187) >> at org.zkoss.spring.webflow.execution.ZkFlowView.processUserEvent(ZkFlowView.java:96) >> at org.springframework.webflow.engine.ViewState.resume(ViewState.java:187) >>... However, if I remove the "grid" part, i.e., the zul file becomes: {code:xml} <?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit"?> <?variable-resolver class="org.zkoss.spring.DelegatingVariableResolver"?> <zk:zk xmlns="http://www.zkoss.org/2005/zk/native" xmlns:zul="http://www.zkoss.org/2005/zul" xmlns:zk="http://www.zkoss.org/2005/zk"> <zul:window title="My First window" border="normal"> <!--zul:grid model="@{flowBean1.banks}"> <zul:columns> <zul:column label="ID"/> <zul:column label="Name"/> </zul:columns> <zul:rows> <zul:row self="@{each='bank'}"> <zul:textbox value="@{bank.bankPK.noBank}"/> <zul:textbox value="@{bank.nameBank}"/> </zul:row> </zul:rows> </zul:grid--> <zul:button self="@{action(finish)}" label="Finish"/><br/> <zul:button self="@{action(restart)}" label="Restart"/> </zul:window> </zk:zk> {code} Then the exception will not happen. So, is there conflict between zk's tranditional data binding with zk + spring web flow integration? Thanks! lendle 4 days ago After some further test, it appears that the problem is caused by data binding to Collections with "self" attribute If remove the self attribute from <zul:row self="@{each='bank'}">, the problem would disappear. However, the self attribute is essential for collection binding, I don't know if there exists any alternative for that?

    ZK-Tracker | 6 years ago | hawk
    java.lang.IncompatibleClassChangeError: Found interface org.springframework.binding.mapping.MappingResult, but class was expected
  2. 0

    copied from http://code.google.com/p/zkspring/issues/detail?id=17 ---- Re-posted from SF tracker https://sourceforge.net/tracker/?func=detail&aid=2566429&group_id=152762&atid=785191 (Submitted: Lendle Tseng ( lendle ) - 2009-02-04 18:51:18 PST) Hello, I've tried to use zk data binding with zk + spring web flow integration, but I got some strange exception. the zul file is like the following {code:xml} <?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit"?> <?variable-resolver class="org.zkoss.spring.DelegatingVariableResolver"?> <zk:zk xmlns="http://www.zkoss.org/2005/zk/native" xmlns:zul="http://www.zkoss.org/2005/zul" xmlns:zk="http://www.zkoss.org/2005/zk"> <zul:window title="My First window" border="normal"> <zul:grid model="@{flowBean1.banks}"> <zul:columns> <zul:column label="ID"/> <zul:column label="Name"/> </zul:columns> <zul:rows> <zul:row self="@{each='bank'}"> <zul:textbox value="@{bank.bankPK.noBank}"/> <zul:textbox value="@{bank.nameBank}"/> </zul:row> </zul:rows> </zul:grid> <zul:button self="@{action(finish)}" label="Finish"/><br/> <zul:button self="@{action(restart)}" label="Restart"/> </zul:window> </zk:zk> {code} If I click Restart or Finish button, I always get the following exception >>java.lang.IncompatibleClassChangeError: Found interface org.springframework.binding.mapping.MappingResult, but class was expected >> at org.zkoss.spring.webflow.execution.ZkFlowView$PropertyNotFoundError.test(ZkFlowView.java:262) >> at org.springframework.binding.mapping.impl.DefaultMappingResults.getResults(DefaultMappingResults.java:91) >> at org.zkoss.spring.webflow.execution.ZkFlowView.onlyPropertyNotFoundErrorsPresent(ZkFlowView.java:191) >> at org.zkoss.spring.webflow.execution.ZkFlowView.hasMappingErrors(ZkFlowView.java:187) >> at org.zkoss.spring.webflow.execution.ZkFlowView.processUserEvent(ZkFlowView.java:96) >> at org.springframework.webflow.engine.ViewState.resume(ViewState.java:187) >>... However, if I remove the "grid" part, i.e., the zul file becomes: {code:xml} <?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit"?> <?variable-resolver class="org.zkoss.spring.DelegatingVariableResolver"?> <zk:zk xmlns="http://www.zkoss.org/2005/zk/native" xmlns:zul="http://www.zkoss.org/2005/zul" xmlns:zk="http://www.zkoss.org/2005/zk"> <zul:window title="My First window" border="normal"> <!--zul:grid model="@{flowBean1.banks}"> <zul:columns> <zul:column label="ID"/> <zul:column label="Name"/> </zul:columns> <zul:rows> <zul:row self="@{each='bank'}"> <zul:textbox value="@{bank.bankPK.noBank}"/> <zul:textbox value="@{bank.nameBank}"/> </zul:row> </zul:rows> </zul:grid--> <zul:button self="@{action(finish)}" label="Finish"/><br/> <zul:button self="@{action(restart)}" label="Restart"/> </zul:window> </zk:zk> {code} Then the exception will not happen. So, is there conflict between zk's tranditional data binding with zk + spring web flow integration? Thanks! lendle 4 days ago After some further test, it appears that the problem is caused by data binding to Collections with "self" attribute If remove the self attribute from <zul:row self="@{each='bank'}">, the problem would disappear. However, the self attribute is essential for collection binding, I don't know if there exists any alternative for that?

    ZK-Tracker | 6 years ago | hawk
    java.lang.IncompatibleClassChangeError: Found interface org.springframework.binding.mapping.MappingResult, but class was expected

    Root Cause Analysis

    1. java.lang.IncompatibleClassChangeError

      Found interface org.springframework.binding.mapping.MappingResult, but class was expected

      at org.zkoss.spring.webflow.execution.ZkFlowView$PropertyNotFoundError.test()
    2. org.zkoss.spring
      ZkFlowView$PropertyNotFoundError.test
      1. org.zkoss.spring.webflow.execution.ZkFlowView$PropertyNotFoundError.test(ZkFlowView.java:262)
      1 frame
    3. Spring Binding
      DefaultMappingResults.getResults
      1. org.springframework.binding.mapping.impl.DefaultMappingResults.getResults(DefaultMappingResults.java:91)
      1 frame
    4. org.zkoss.spring
      ZkFlowView.processUserEvent
      1. org.zkoss.spring.webflow.execution.ZkFlowView.onlyPropertyNotFoundErrorsPresent(ZkFlowView.java:191)
      2. org.zkoss.spring.webflow.execution.ZkFlowView.hasMappingErrors(ZkFlowView.java:187)
      3. org.zkoss.spring.webflow.execution.ZkFlowView.processUserEvent(ZkFlowView.java:96)
      3 frames
    5. Spring Web Flow
      ViewState.resume
      1. org.springframework.webflow.engine.ViewState.resume(ViewState.java:187)
      1 frame