5 Replies Latest reply on May 17, 2007 7:13 AM by Jamie Cruise

    ELSupport exception on javasisst-proxies (coerceToType)

    Gena Newbie

      Hello, i 've got an Exception, that OneType is not of type OneType_javassist... in method coerceToType.
      My workaround (works for me but possible isn't a finest solution)

      if (type == null || Object.class.equals(type) || obj.getClass().isAssignableFrom(type))


      Please check this and describe in some words the problem, if i did a mistake and need an imporovement of model to avoid this problem if a future .

      Thanks!


        • 1. Re: ELSupport exception on javasisst-proxies (coerceToType)
          Pete Muir Master

          You'll need to post the exception and tell us what version of Seam you are using.

          • 2. Re: ELSupport exception on javasisst-proxies (coerceToType)
            Gena Newbie

            Hello,

            i'm using the freshest CVS Seam on JBoss4.2.0CR2 with trinidad, ajax4jsf and jsf 1.2ri (all jars from AS or Seam-dist).

            Stack trace:

            SCHWERWIEGEND: Error Rendering View[/offer/step1.xhtml]
            java.lang.IllegalArgumentException: Cannot convert (id=1868 token=REPAIRED title=repaired) of type class de.intermobil.model.feature.AccidentState to class de.intermobil.model.feature.AccidentState_$$_javassist_33
             at org.jboss.el.lang.ELSupport.coerceToType(ELSupport.java:358)
             at org.jboss.el.ExpressionFactoryImpl.coerceToType(ExpressionFactoryImpl.java:46)
             at com.sun.faces.renderkit.html_basic.RadioRenderer.renderOption(RadioRenderer.java:87)
             at com.sun.faces.renderkit.html_basic.SelectManyCheckboxListRenderer.encodeEnd(SelectManyCheckboxListRenderer.java:146)
             at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:833)
             at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:286)
             at org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
             at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:284)
             at org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
             at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:79)
             at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
             at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:282)
             at org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
             at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:284)
             at org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
             at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:284)
             at org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
             at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:284)
             at org.ajax4jsf.framework.renderer.RendererBase.renderChildren(RendererBase.java:262)
             at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:79)
             at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
             at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
             at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
             at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571)
             at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:178)
             at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:174)
             at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
             at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
             at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
             at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
             at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:209)
             at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:166)
             at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:139)
             at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at de.intermobil.util.CommonFilter.doFilter(CommonFilter.java:33)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
             at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
             at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
             at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
             at org.jboss.seam.web.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:43)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
             at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
             at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at de.intermobil.util.PrimeFilter.doFilter(PrimeFilter.java:33)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
             at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
             at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
             at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
             at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
             at java.lang.Thread.run(Thread.java:619)
            


            • 3. Re: ELSupport exception on javasisst-proxies (coerceToType)
              Pete Muir Master

              http://jira.jboss.com/jira/browse/JBSEAM-1251

              It would also be helpful if you could add to the issue, the relevant entites, backing beans (or components.xml) and jsf. Thanks!

              • 4. Re: ELSupport exception on javasisst-proxies (coerceToType)
                Gena Newbie

                Hi

                the small example is attached to Jira. I hope, it will be helpful.

                Gena

                • 5. Re: ELSupport exception on javasisst-proxies (coerceToType)
                  Jamie Cruise Newbie

                  Is this similar to the problem to that I posted yesterday?

                  http://jboss.com/index.html?module=bb&op=viewtopic&t=108741

                  (the last post being the relevant one) I think this is the situation when you have a select list of POJO objects that you want to assign to a target seam component. If this isn't the same case, feel free to ignore the rest of this message!

                  Should you be able to assign a POJO directly to a seam component ? It seems like it could be done with the cglib proxy implementation but not the javassist version (Seam 1.2.1 onwards). I concluded that we would need to update the el assignment to use Context.set(string,object) to perform the assignment safely.

                  I found a workaround but it makes my code a bit less elegant. I'd appreciate advice on the correct strategy.

                  Cheers
                  J