2 Replies Latest reply on Jul 16, 2009 2:18 AM by IVAN BATISTA MORENO

    how work convertEntity, this bug?

    IVAN BATISTA MORENO Newbie

      Hi,


      What problem this tag s:convertEntity


      my components.xml





      <core:manager conversation-timeout="120000" concurrent-request-timeout="500" conversation-id-parameter="cid" />
              
              <persistence:managed-hibernate-session 
                      name="hibernateSession" auto-create="true" scope="session" session-factory="#{sessionFactory}" />
                      
              <spring:context-loader config-locations="/WEB-INF/applicationContext.xml" />
              
              <spring:spring-transaction platform-transaction-manager="#{transactionManager}" />
              
              <ui:hibernate-entity-loader session="hibernateSession"/>



      error




      java.lang.RuntimeException: Could not create Component: org.jboss.seam.ui.entityLoader
              at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1202)
              at org.jboss.seam.init.Initialization.installComponents(Initialization.java:1118)
              at org.jboss.seam.init.Initialization.init(Initialization.java:733)
              at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
              at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
              at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
              at org.apache.catalina.core.StandardService.start(StandardService.java:516)
              at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
              at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.lang.reflect.Method.invoke(Unknown Source)
              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: java.lang.IllegalArgumentException: No converter for type: org.hibernate.Session
              at org.jboss.seam.util.Conversions.getConverter(Conversions.java:63)
              at org.jboss.seam.Component$ConstantInitialValue.<init>(Component.java:2481)
              at org.jboss.seam.Component.getInitialValue(Component.java:538)
              at org.jboss.seam.Component.getInitialValueHonoringExceptions(Component.java:512)
              at org.jboss.seam.Component.initInitializers(Component.java:489)
              at org.jboss.seam.Component.<init>(Component.java:254)
              at org.jboss.seam.Component.<init>(Component.java:205)
              at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1186)
              ... 18 more



        • 1. Re: how work convertEntity, this bug?
          Stuart Douglas Master

          try:


                  <ui:hibernate-entity-loader session="#{hibernateSession}"/>
          

          • 2. Re: how work convertEntity, this bug?
            IVAN BATISTA MORENO Newbie

            yet try, now error and TransientObjectException.


            error


            14/07/2009 10:22:58 com.sun.facelets.FaceletViewHandler handleRenderException
            SEVERE: Error Rendering View[/pagina/usuario.xhtml]
            org.hibernate.TransientObjectException: The instance was not associated with this session
                    at org.hibernate.impl.SessionImpl.getIdentifier(SessionImpl.java:1375)
                    at org.jboss.seam.persistence.HibernateSessionProxy.getIdentifier(HibernateSessionProxy.java:236)
                    at org.jboss.seam.framework.HibernateEntityIdentifier.<init>(HibernateEntityIdentifier.java:13)
                    at org.jboss.seam.ui.HibernateEntityLoader.createIdentifier(HibernateEntityLoader.java:28)
                    at org.jboss.seam.ui.AbstractEntityLoader.put(AbstractEntityLoader.java:46)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                    at java.lang.reflect.Method.invoke(Unknown Source)
                    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
                    at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
                    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
                    at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
                    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                    at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:95)
                    at org.jboss.seam.util.Work.workInTransaction(Work.java:47)
                    at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:89)
                    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
                    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
                    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
                    at org.jboss.seam.ui.HibernateEntityLoader_$$_javassist_2.put(HibernateEntityLoader_$$_javassist_2.java)
                    at org.jboss.seam.ui.EntityConverter.getAsString(EntityConverter.java:65)
                    at org.jboss.seam.ui.converter.PrioritizableConverter.getAsString(PrioritizableConverter.java:67)
                    at org.jboss.seam.ui.converter.ConverterChain.getAsString(ConverterChain.java:126)
                    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getFormattedValue(HtmlBasicRenderer.java:448)
                    at com.sun.faces.renderkit.html_basic.MenuRenderer.renderOption(MenuRenderer.java:480)
                    at com.sun.faces.renderkit.html_basic.MenuRenderer.renderOptions(MenuRenderer.java:759)
                    at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:819)
                    at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:280)
                    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
                    at org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:190)
                    at org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
                    at org.jboss.seam.ui.renderkit.ValidateAllRendererBase.doEncodeChildren(ValidateAllRendererBase.java:33)
                    at org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
                    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
                    at org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:186)
                    at org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
                    at org.jboss.seam.ui.renderkit.DecorateRendererBase.doEncodeChildren(DecorateRendererBase.java:146)
                    at org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
                    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
                    at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
                    at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
                    at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
                    at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
                    at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:120)
                    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
                    at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
                    at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
                    at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:78)
                    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
                    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
                    at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
                    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
                    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
                    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
                    at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
                    at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
                    at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
                    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
                    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
                    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
                    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilte
            r.java:198)
                    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                    at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
                    at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
                    at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
                    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
                    at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                    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:233)
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                    at java.lang.Thread.run(Unknown Source)