org.zkoss.zel.ELException: Cannot convert [org.zkoss.jpa.examples.entity.Item@22] of type class java.util.LinkedHashSet to interface java.util.List

ZK-Tracker | dennis | 4 years ago
  1. 0

    {code} >>org.zkoss.zel.ELException: Cannot convert [org.zkoss.jpa.examples.entity.Item@22] of type class java.util.LinkedHashSet to interface java.util.List >> at org.zkoss.zel.impl.lang.ELSupport.coerceToTypeForSetValue(ELSupport.java:468) >> at org.zkoss.zel.impl.parser.AstValue.setValue(AstValue.java:246) >> at org.zkoss.zel.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:256) >> at org.zkoss.xel.zel.ELXelExpression.setValue(ELXelExpression.java:50) >> at org.zkoss.bind.impl.BindEvaluatorXImpl.setValue(BindEvaluatorXImpl.java:51) >> at org.zkoss.bind.impl.SavePropertyBindingImpl.save(SavePropertyBindingImpl.java:128) >> at org.zkoss.bind.impl.PropertyBindingHandler.doSaveBinding(PropertyBindingHandler.java:148) >> at org.zkoss.bind.impl.PropertyBindingHandler.doSaveEvent(PropertyBindingHandler.java:203) >> at org.zkoss.bind.impl.BinderImpl.doSaveEvent(BinderImpl.java:1402) >> at org.zkoss.bind.impl.BinderImpl.access$6(BinderImpl.java:1396) >> at org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent0(BinderImpl.java:1183) >> at org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent(BinderImpl.java:1156) >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2750) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2721) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2662) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1710) >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1495) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1205) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:584) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:482) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:490) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) >> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) >> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221) >> at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147) >> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) >> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212) >> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399) >> at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) >> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) >> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) >> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) >> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) >> at org.mortbay.jetty.Server.handle(Server.java:326) >> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) >> at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) >> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) >> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) >> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) >> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) >> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) {code}

    ZK-Tracker | 4 years ago | dennis
    org.zkoss.zel.ELException: Cannot convert [org.zkoss.jpa.examples.entity.Item@22] of type class java.util.LinkedHashSet to interface java.util.List
  2. 0

    {code} >>org.zkoss.zel.ELException: Cannot convert [org.zkoss.jpa.examples.entity.Item@22] of type class java.util.LinkedHashSet to interface java.util.List >> at org.zkoss.zel.impl.lang.ELSupport.coerceToTypeForSetValue(ELSupport.java:468) >> at org.zkoss.zel.impl.parser.AstValue.setValue(AstValue.java:246) >> at org.zkoss.zel.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:256) >> at org.zkoss.xel.zel.ELXelExpression.setValue(ELXelExpression.java:50) >> at org.zkoss.bind.impl.BindEvaluatorXImpl.setValue(BindEvaluatorXImpl.java:51) >> at org.zkoss.bind.impl.SavePropertyBindingImpl.save(SavePropertyBindingImpl.java:128) >> at org.zkoss.bind.impl.PropertyBindingHandler.doSaveBinding(PropertyBindingHandler.java:148) >> at org.zkoss.bind.impl.PropertyBindingHandler.doSaveEvent(PropertyBindingHandler.java:203) >> at org.zkoss.bind.impl.BinderImpl.doSaveEvent(BinderImpl.java:1402) >> at org.zkoss.bind.impl.BinderImpl.access$6(BinderImpl.java:1396) >> at org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent0(BinderImpl.java:1183) >> at org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent(BinderImpl.java:1156) >> at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2750) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2721) >> at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2662) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136) >> at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1710) >> at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1495) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1205) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:584) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:482) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:490) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) >> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) >> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221) >> at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147) >> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) >> at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212) >> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399) >> at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) >> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) >> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) >> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) >> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) >> at org.mortbay.jetty.Server.handle(Server.java:326) >> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) >> at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) >> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) >> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) >> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) >> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) >> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) {code}

    ZK-Tracker | 4 years ago | dennis
    org.zkoss.zel.ELException: Cannot convert [org.zkoss.jpa.examples.entity.Item@22] of type class java.util.LinkedHashSet to interface java.util.List
  3. 0

    将ZK官方Tree组件示例用ZKUI改写时碰到的问题

    GitHub | 4 years ago | evanzeng
    org.zkoss.zel.ELException: Cannot convert demo.getting_started.Category@7dc999c4 of type class demo.getting_started.tree.CategoryTreeNode to class demo.getting_started.Category
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    In zul, <image content="@load(vm.image)" /> will occur a casting error : org.zkoss.zel.ELException: Cannot convert BufferedImage@125c99f: type = 1 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width = 200 height = 200 #Bands = 3 xOff = 0 yOff = 0 dataOffset[0] 0 of type class java.awt.image.BufferedImage to interface org.zkoss.image.Image at org.zkoss.zel.impl.lang.ELSupport.coerceToTypeForSetValue(ELSupport.java:468) at org.zkoss.zel.impl.parser.AstValue.setValue(AstValue.java:215) at org.zkoss.zel.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:256) at org.zkoss.xel.zel.ELXelExpression.setValue(ELXelExpression.java:50) at org.zkoss.bind.impl.BindEvaluatorXImpl.setValue(BindEvaluatorXImpl.java:50) at org.zkoss.bind.impl.LoadPropertyBindingImpl.load(LoadPropertyBindingImpl.java:81) at org.zkoss.bind.impl.PropertyBindingHandler.doLoadBinding(PropertyBindingHandler.java:171) at org.zkoss.bind.impl.PropertyBindingHandler.doLoad(PropertyBindingHandler.java:372) at org.zkoss.bind.impl.BinderImpl.loadComponentProperties(BinderImpl.java:1865) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1847) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1849) at org.zkoss.bind.BindComposer.doAfterCompose(BindComposer.java:138) but if use other way like <image content="${bi}" />, "bi" is declared in zscipt, it will work fine.

    ZK-Tracker | 5 years ago | MontyPan
    org.zkoss.zel.ELException: Cannot convert BufferedImage@125c99f: type = 1 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width = 200 height = 200 #Bands = 3 xOff = 0 yOff = 0 dataOffset[0] 0 of type class java.awt.image.BufferedImage to interface org.zkoss.image.Image
  6. 0

    In zul, <image content="@load(vm.image)" /> will occur a casting error : org.zkoss.zel.ELException: Cannot convert BufferedImage@125c99f: type = 1 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width = 200 height = 200 #Bands = 3 xOff = 0 yOff = 0 dataOffset[0] 0 of type class java.awt.image.BufferedImage to interface org.zkoss.image.Image at org.zkoss.zel.impl.lang.ELSupport.coerceToTypeForSetValue(ELSupport.java:468) at org.zkoss.zel.impl.parser.AstValue.setValue(AstValue.java:215) at org.zkoss.zel.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:256) at org.zkoss.xel.zel.ELXelExpression.setValue(ELXelExpression.java:50) at org.zkoss.bind.impl.BindEvaluatorXImpl.setValue(BindEvaluatorXImpl.java:50) at org.zkoss.bind.impl.LoadPropertyBindingImpl.load(LoadPropertyBindingImpl.java:81) at org.zkoss.bind.impl.PropertyBindingHandler.doLoadBinding(PropertyBindingHandler.java:171) at org.zkoss.bind.impl.PropertyBindingHandler.doLoad(PropertyBindingHandler.java:372) at org.zkoss.bind.impl.BinderImpl.loadComponentProperties(BinderImpl.java:1865) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1847) at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:1849) at org.zkoss.bind.BindComposer.doAfterCompose(BindComposer.java:138) but if use other way like <image content="${bi}" />, "bi" is declared in zscipt, it will work fine.

    ZK-Tracker | 5 years ago | MontyPan
    org.zkoss.zel.ELException: Cannot convert BufferedImage@125c99f: type = 1 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width = 200 height = 200 #Bands = 3 xOff = 0 yOff = 0 dataOffset[0] 0 of type class java.awt.image.BufferedImage to interface org.zkoss.image.Image

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.zkoss.zel.ELException

      Cannot convert [org.zkoss.jpa.examples.entity.Item@22] of type class java.util.LinkedHashSet to interface java.util.List

      at org.zkoss.zel.impl.lang.ELSupport.coerceToTypeForSetValue()
    2. The ZK EL Library
      ValueExpressionImpl.setValue
      1. org.zkoss.zel.impl.lang.ELSupport.coerceToTypeForSetValue(ELSupport.java:468)
      2. org.zkoss.zel.impl.parser.AstValue.setValue(AstValue.java:246)
      3. org.zkoss.zel.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:256)
      3 frames
    3. The ZKoss Common Library
      ELXelExpression.setValue
      1. org.zkoss.xel.zel.ELXelExpression.setValue(ELXelExpression.java:50)
      1 frame
    4. ZK Bind
      BinderImpl$CommandEventListener.onEvent
      1. org.zkoss.bind.impl.BindEvaluatorXImpl.setValue(BindEvaluatorXImpl.java:51)
      2. org.zkoss.bind.impl.SavePropertyBindingImpl.save(SavePropertyBindingImpl.java:128)
      3. org.zkoss.bind.impl.PropertyBindingHandler.doSaveBinding(PropertyBindingHandler.java:148)
      4. org.zkoss.bind.impl.PropertyBindingHandler.doSaveEvent(PropertyBindingHandler.java:203)
      5. org.zkoss.bind.impl.BinderImpl.doSaveEvent(BinderImpl.java:1402)
      6. org.zkoss.bind.impl.BinderImpl.access$6(BinderImpl.java:1396)
      7. org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent0(BinderImpl.java:1183)
      8. org.zkoss.bind.impl.BinderImpl$CommandEventListener.onEvent(BinderImpl.java:1156)
      8 frames
    5. ZK Kernel
      DHtmlUpdateServlet.doPost
      1. org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2750)
      2. org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2721)
      3. org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2662)
      4. org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
      5. org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1710)
      6. org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1495)
      7. org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1205)
      8. org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:584)
      9. org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:482)
      10. org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:490)
      10 frames
    6. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      2 frames
    7. Jetty Server
      ServletHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      2. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
      2 frames
    8. Spring ORM
      OpenEntityManagerInViewFilter.doFilterInternal
      1. org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147)
      1 frame
    9. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      1 frame
    10. Jetty Server
      SelectChannelEndPoint.run
      1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
      3. org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      4. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      5. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
      6. org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      7. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      8. org.mortbay.jetty.Server.handle(Server.java:326)
      9. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      10. org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
      11. org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
      12. org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
      13. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      14. org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
      14 frames
    11. Jetty Util
      QueuedThreadPool$PoolThread.run
      1. org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      1 frame