[jboss-user] [JBoss Seam] - trouble with getting <s:convertEntity /> to work

gothmog do-not-reply at jboss.com
Fri Oct 19 22:25:53 EDT 2007


Hi,

I've read the doc and still can't get this Seam feature to work. Essentially I have something simple but I keep getting this:


  | 15:18:15,305 WARN  [lifecycle] EntityManager is closed
  | java.lang.IllegalStateException: EntityManager is closed
  | 	at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:42)
  | 	at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:447)
  | 	at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:442)
  | 	at org.jboss.seam.persistence.EntityManagerProxy.joinTransaction(EntityManagerProxy.java:120)
  | 	at org.jboss.seam.framework.EntityIdentifier.find(EntityIdentifier.java:25)
  | 	at org.jboss.seam.ui.converter.EntityConverterStore.get(EntityConverterStore.java:43)
  | 	at org.jboss.seam.ui.converter.EntityConverter.getAsObject(EntityConverter.java:81)
  | 	at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:152)
  | 	at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectOneValue(MenuRenderer.java:197)
  | 	at com.sun.faces.renderkit.html_basic.MenuRenderer.getConvertedValue(MenuRenderer.java:359)
  | 	at javax.faces.component.UIInput.getConvertedValue(UIInput.java:934)
  | 	at javax.faces.component.UIInput.validate(UIInput.java:860)
  | 	at javax.faces.component.UIInput.executeValidate(UIInput.java:1065)
  | 	at javax.faces.component.UIInput.processValidators(UIInput.java:666)
  | 	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1030)
  | 	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1030)
  | 	at org.ajax4jsf.component.UIAjaxForm.processValidators(UIAjaxForm.java:80)
  | 	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1030)
  | 	at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:662)
  | 	at org.ajax4jsf.component.AjaxViewRoot.access$201(AjaxViewRoot.java:59)
  | 	at org.ajax4jsf.component.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:321)
  | 	at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:56)
  | 	at org.ajax4jsf.context.AjaxContextImpl.invokeOnRegionOrRoot(AjaxContextImpl.java:173)
  | 	at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:335)
  | 	at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100)
  | 	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
  | 	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
  | 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  | 	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.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:63)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
  | 	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:82)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | 	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | 	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | 	at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
  | 	at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
  | 	at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
  | 	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
  | 	at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
  | 	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:230)
  | 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  | 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  | 	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:241)
  | 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  | 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
  | 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  | 	at java.lang.Thread.run(Thread.java:613)
  |  

My components.xml is like this


  | <core:init debug="true" jndi-pattern="mytime/#{ejbName}/local" />
  | <persistence:managed-persistence-context name="entityManager" auto-create="true"
  |                 persistence-unit-jndi-name="java:/mytimeEntityManagerFactory" />
  | 
  | 

My Page is like this:


  | <h:selectOneMenu value="#{tag.group}">
  |   <s:selectItems value="#{items.groups}" var="item" label="#{item.name}" />
  |   <s:convertEntity />
  | </h:selectOneMenu>
  | 

where tag is an entity and item.groups is a list of name value pairs

Any help is appreciated

Thanks 

Troy





View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097151#4097151

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097151



More information about the jboss-user mailing list