11 Replies Latest reply on Mar 22, 2007 6:44 PM by Pete Muir

    Problem with entityconverter

    Dustin Norlander Apprentice

      Hi,

      I am using seam from CVS. I am having a random problem with convertEntity.
      Everything seems to work fine except when try to select options which have been assigned a value of zero, then it throws

      16:17:40,211 ERROR [ExceptionFilter] uncaught exception
      javax.servlet.ServletException: Unknown entity: net.infofilter.model.MenuBarType_$$_javassist_73
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       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.RedirectFilter.doFilter(RedirectFilter.java:45)
       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.MultipartFilter.doFilter(MultipartFilter.java:79)
      


      The generated html is (notice the selected option has a value of 0, thus if I don't change it it throws an exception)

      <select id="menuBar:menuBarType" name="menuBar:menuBarType" size="1" onchange="A4J.AJAX.Submit('_viewRoot','menuBar',event,{'parameters':{'menuBar:_id49':'menuBar:_id49'},'actionUrl':'/MenuBarEdit.seam'})"> <option value="12">user admin</option>
      <option value="1">Util Nav</option>
      <option value="0" selected="selected">watch group</option>
      </select>
      



      And in case it helps, here is the page markup:

      <h:selectOneMenu value="#{menuBarHome.instance.menuBarType}"
       id="menuBarType">
       <s:selectItems value="#{menuBarHome.menuBarTypes}"
       var="item"
       label="#{item.name}"
       noSelectionLabel="--- Choose MenuBarType ---"
       hideNoSelectionLabel="true"
       />
       <s:convertEntity />
       <a:support event="onchange" reRender="parentId"/>
       </h:selectOneMenu>
      


      Thanks for any help,
      Dustin

        • 1. Re: Problem with entityconverter
          Pete Muir Master

          Can you post the whole stack trace.

          • 2. Re: Problem with entityconverter
            Dustin Norlander Apprentice

            Full stack trace:

            17:05:37,181 ERROR [ExceptionFilter] uncaught exception
            javax.servlet.ServletException: Unknown entity: net.infofilter.model.MenuBarType_$$_javassist_75
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             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.RedirectFilter.doFilter(RedirectFilter.java:45)
             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.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:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             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:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
             at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
             at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
             at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
             at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
             at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
             at java.lang.Thread.run(Thread.java:595)
            17:05:37,220 ERROR [ExceptionFilter] exception root cause
            java.lang.IllegalArgumentException: Unknown entity: net.infofilter.model.MenuBarType_$$_javassist_75
             at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:185)
             at org.jboss.seam.persistence.EntityManagerProxy.find(EntityManagerProxy.java:78)
             at org.jboss.seam.ui.EntityConverter.loadEntityFromPersistenceContext(EntityConverter.java:208)
             at org.jboss.seam.ui.EntityConverter.getAsObject(EntityConverter.java:184)
             at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getConvertedUIOutputValue(RendererUtils.java:651)
             at org.apache.myfaces.shared_impl.renderkit.html.HtmlMenuRendererBase.getConvertedValue(HtmlMenuRendererBase.java:111)
             at javax.faces.component.UIInput.getConvertedValue(UIInput.java:395)
             at javax.faces.component.UIInput.validate(UIInput.java:349)
             at javax.faces.component.UIInput.processValidators(UIInput.java:183)
             at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
             at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
             at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
             at javax.faces.component.UIForm.processValidators(UIForm.java:70)
             at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
             at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:146)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.access$201(AjaxViewRoot.java:53)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:302)
             at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:54)
             at org.ajax4jsf.framework.ajax.AjaxContext.invokeOnRegionOrRoot(AjaxContext.java:176)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processValidators(AjaxViewRoot.java:315)
             at org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:262)
             at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             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.RedirectFilter.doFilter(RedirectFilter.java:45)
             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.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:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             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:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
             at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
             at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
             at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
             at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
             at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
             at java.lang.Thread.run(Thread.java:595)
            Caused by: org.hibernate.MappingException: Unknown entity: net.infofilter.model.MenuBarType_$$_javassist_75
             at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:548)
             at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:66)
             at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
             at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
             at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
             at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:174)
             ... 58 more
            17:05:37,257 ERROR [DebugPageHandler] redirecting to debug page
            org.hibernate.MappingException: Unknown entity: net.infofilter.model.MenuBarType_$$_javassist_75
             at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:548)
             at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:66)
             at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
             at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
             at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
             at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:174)
             at org.jboss.seam.persistence.EntityManagerProxy.find(EntityManagerProxy.java:78)
             at org.jboss.seam.ui.EntityConverter.loadEntityFromPersistenceContext(EntityConverter.java:208)
             at org.jboss.seam.ui.EntityConverter.getAsObject(EntityConverter.java:184)
             at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getConvertedUIOutputValue(RendererUtils.java:651)
             at org.apache.myfaces.shared_impl.renderkit.html.HtmlMenuRendererBase.getConvertedValue(HtmlMenuRendererBase.java:111)
             at javax.faces.component.UIInput.getConvertedValue(UIInput.java:395)
             at javax.faces.component.UIInput.validate(UIInput.java:349)
             at javax.faces.component.UIInput.processValidators(UIInput.java:183)
             at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
             at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
             at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
             at javax.faces.component.UIForm.processValidators(UIForm.java:70)
             at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
             at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:146)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.access$201(AjaxViewRoot.java:53)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:302)
             at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:54)
             at org.ajax4jsf.framework.ajax.AjaxContext.invokeOnRegionOrRoot(AjaxContext.java:176)
             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processValidators(AjaxViewRoot.java:315)
             at org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:262)
             at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             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.RedirectFilter.doFilter(RedirectFilter.java:45)
             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.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:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             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:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
             at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
             at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
             at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
             at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
             at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
             at java.lang.Thread.run(Thread.java:595)
            


            • 3. Re: Problem with entityconverter
              Pete Muir Master

              Can you post the code for menuBarHome

              • 4. Re: Problem with entityconverter
                Pete Muir Master

                 

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


                • 5. Re: Problem with entityconverter
                  Pete Muir Master

                  I've put a fix in CVS, please test for me (as I'm unable to reproduce I'm not sure whether it works...)

                  • 6. Re: Problem with entityconverter
                    Dustin Norlander Apprentice

                    Thanks for the help, but the newest CVS version didn't help.

                    Here is the menuBarHome class:

                    @Name("menuBarHome")
                    public class MenuBarHome extends EntityHome<MenuBar> {
                    
                     private static final long serialVersionUID = -8414974539559465106L;
                    
                     @In (required=true)
                     private User user;
                    
                     @In
                     private EntityManager entityManager;
                    
                     @Logger
                     private Log log;
                    
                     public void setMenuBarId(Integer id) {
                     setId(id);
                     }
                    
                     public Integer getMenuBarId() {
                     return (Integer) getId();
                     }
                    
                     @Override
                     protected MenuBar createInstance() {
                     MenuBar menuBar = new MenuBar();
                     return menuBar;
                     }
                    
                     public MenuBar getDefinedInstance() {
                     return isIdDefined() ? getInstance() : null;
                     }
                    
                     public List<MenuBarType> getMenuBarTypes() {
                     List<MenuBarType> types = entityManager
                     .createQuery("SELECT mt FROM MenuBarType mt ORDER BY mt.name")
                     .getResultList();
                     return types;
                     }
                    
                     public List<SelectItem> getPossibleParents() {
                     List<SelectItem> retList = new ArrayList<SelectItem> ();
                     List<MenuBar> m;
                     if (this.getInstance().getMenuBarType() != null) {
                     m = entityManager
                     .createQuery("SELECT mb FROM MenuBar mb WHERE mb.menuBarType.name=:name ORDER BY mb.label")
                     .setParameter("name", this.getInstance().getMenuBarType().getName())
                     .getResultList();
                     } else {
                     m = entityManager
                     .createQuery("SELECT mb FROM MenuBar mb ORDER BY mb.label")
                     .getResultList();
                     }
                     SelectItem choose = new SelectItem();
                     choose.setLabel("--- Choose A Parent ---");
                     choose.setDisabled(true);
                     retList.add(choose);
                     for (MenuBar parent : m) {
                     SelectItem item = new SelectItem();
                     item.setValue(parent.getId());
                     item.setLabel(parent.getLabel());
                     retList.add(item);
                     }
                     return retList;
                     }
                    }
                    
                    


                    And here is the whole form from the view:

                     <h:form id="menuBar" styleClass="edit">
                    
                     <rich:panel>
                     <f:facet name="header">Edit MenuBar</f:facet>
                     <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
                     <h:outputLabel for="label">
                     label
                     </h:outputLabel>
                    
                     <s:decorate id="labelDecoration">
                     <h:inputText id="label"
                     size="32"
                     maxlength="32"
                     value="#{menuBarHome.instance.label}">
                     </h:inputText>
                     </s:decorate>
                    
                     <h:outputLabel for="horizontalOrderIndex">
                     horizontalOrderIndex
                     <span class="required">*</span>
                     </h:outputLabel>
                     <s:decorate id="horizontalOrderIndexDecoration">
                     <h:inputText id="horizontalOrderIndex"
                     required="true"
                     value="#{menuBarHome.instance.horizontalOrderIndex}">
                     </h:inputText>
                     </s:decorate>
                    
                     <h:outputLabel for="verticalOrderIndex">
                     verticalOrderIndex
                     <span class="required">*</span>
                     </h:outputLabel>
                     <s:decorate id="verticalOrderIndexDecoration">
                     <h:inputText id="verticalOrderIndex"
                     required="true"
                     value="#{menuBarHome.instance.verticalOrderIndex}">
                     </h:inputText>
                     </s:decorate>
                    
                     <h:outputLabel for="menuBarType">
                     MenuBar Type
                     <span class="required">*</span>
                     </h:outputLabel>
                     <s:decorate id="menuBarTypeDecoration">
                     <h:selectOneMenu value="#{menuBarHome.instance.menuBarType}"
                     id="menuBarType">
                     <s:selectItems value="#{menuBarHome.menuBarTypes}"
                     var="item"
                     label="#{item.name}"
                     noSelectionLabel="--- Choose MenuBarType ---"
                     hideNoSelectionLabel="true"
                     />
                     <s:convertEntity />
                     <a:support event="onchange" reRender="parentId"/>
                     </h:selectOneMenu>
                     </s:decorate>
                    
                     <h:outputLabel for="parentId">
                     Parent
                     </h:outputLabel>
                     <s:decorate id="parentIdDecoration">
                     <h:selectOneMenu value="#{menuBarHome.instance.parentId}" id="parentId">
                     <f:selectItems value="#{menuBarHome.possibleParents}"/>
                     </h:selectOneMenu>
                     </s:decorate>
                    
                     <h:outputLabel for="pageLink">
                     pageLink
                     </h:outputLabel>
                     <s:decorate id="pageLinkDecoration">
                     <h:inputText id="pageLink"
                     size="32"
                     value="#{menuBarHome.instance.pageLink}"/>
                     </s:decorate>
                    
                    
                     </h:panelGrid>
                    
                     <div><span class="required">*</span> required fields</div>
                    
                     </rich:panel>
                    
                     <div class="actionButtons">
                    
                     <h:commandButton id="save"
                     value="Save"
                     action="#{menuBarHome.persist}"
                     rendered="#{!menuBarHome.managed}"/>
                    
                     <h:commandButton id="update"
                     value="Save"
                     action="#{menuBarHome.update}"
                     rendered="#{menuBarHome.managed}"/>
                    
                     <h:commandButton id="delete"
                     value="Delete"
                     action="#{menuBarHome.remove}"
                     rendered="#{menuBarHome.managed}"/>
                    
                     <s:button id="cancel"
                     value="Cancel"
                     propagation="end"
                     view="/if/admin/#{empty menuBarFrom ? 'MenuBarList' : menuBarFrom}.xhtml"
                     rendered="#{!menuBarHome.managed}"/>
                    
                     </div>
                     </h:form>
                    
                    


                    • 7. Re: Problem with entityconverter
                      Pete Muir Master

                      If you can easily create a testcase for me it would be great. Otherwise, I'll try to replicate the problem.

                      • 8. Re: Problem with entityconverter
                        Pete Muir Master

                        I can't replicate this, so I need a test case

                        • 9. Re: Problem with entityconverter
                          Dustin Norlander Apprentice

                          I attached simple setup to the jira item. Hopefully you will be able to replicate the problem. If you need anything else let me know.

                          Thanks,
                          Dustin

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

                          • 10. Re: Problem with entityconverter
                            Mike Quilleash Newbie

                            I've just had a similar problem. I have a value binding on a selectOneMenu to a hibernate nested object. I use a converter to convert a hibernate entity to class + id string and back again. During the rendering of the menu item the JSF renderer tries to match the current selected value to one of the options. The selected value is a proxy (it uses the EL) whereas the select items are fully instantiated objects.

                            This gives an ELException when it calls coerceToType on the ExpressionFactory to try and coerce an object to it's proxy. I think in this instance it is a JSF problem rather than a Seam problem but it might be related, seems similar.

                            I can supply for detail if it would be useful.

                            Cheers.

                            Mike.

                            • 11. Re: Problem with entityconverter
                              Pete Muir Master

                              Mike, that sounds unrelated to this problem (this was due to Hibernate lazy association proxies). If it's a Seam proxy, you can call org.jboss.seam.util.Proxy.deproxy(clazz) to get it's original class.