[JBoss Seam] - Simple selectOneMenu Example/seamgen
by griffitm
Hi All,
I am coming from a struts back ground, and I am lost for where to start trying to debug this problem. I have an Object (Delivery) with an association from a pick list (Status)
I created a seam-gen project and played around with it, but I don't want to have to navigate to a different web page just to pick the status for my delivery. I want to provide a DDLB on the delivery edit page, and allow the user to select from a list that is in the status DB. Seems simple enough, in Struts I'd simply put this list into a context and reference it. What I did in Seam may not be right.
In the components.xml file, I defined a framework query like this:
<framework:entity-query name="allStatus"
| entity-manager="#{em}"
| ejbql="select s from Status s"
| order="s.description"/>
Then I reference it in my xhtml file as follows:
<s:decorate id="statusDecoration" template="layout/edit.xhtml">
| <ui:define name="label">status</ui:define>
| <h:selectOneMenu id="status" value="#{deliverableHome.instance.status}">
| <s:convertEntity />
| <s:selectItems value="#{allStatus.resultList}"
| var="deliverableHome.instance.status"
| label="#{status.description}"/>
| </h:selectOneMenu>
| </s:decorate>
The list of status codes show up in a drop down list, but when I try to save the record, I get an HBM mapping error:
java.lang.IllegalArgumentException: Unknown entity: gov.hhs.fda.ocio.fdaaa.entity.Status_$$_javassist_39
| at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:185)
| at org.jboss.seam.persistence.EntityManagerProxy.find(EntityManagerProxy.java:85)
| at org.jboss.seam.framework.EntityIdentifier.find(EntityIdentifier.java:26)
| 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:1033)
| at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
| at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
| at javax.faces.component.UIForm.processValidators(UIForm.java:229)
| at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
| at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:662)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.access$201(AjaxViewRoot.java:53)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:315)
| at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:53)
| at org.ajax4jsf.framework.ajax.AjaxContext.invokeOnRegionOrRoot(AjaxContext.java:191)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.processValidators(AjaxViewRoot.java:329)
| 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.web.MultipartFilter.doFilter(MultipartFilter.java:87)
| 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.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
| 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.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:157)
| 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.Http11AprProcessor.process(Http11AprProcessor.java:853)
| at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
| at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1513)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.hibernate.MappingException: Unknown entity: gov.hhs.fda.ocio.fdaaa.entity.Status_$$_javassist_39
| at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:550)
| at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:68)
| 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)
| ... 61 more
| 16:58:10,180 WARN [lifecycle] executePhase(PROCESS_VALIDATIONS 3,com.sun.faces.context.FacesContextImpl@1124609) threw
| exception
| javax.faces.FacesException: Unknown entity: gov.hhs.fda.ocio.fdaaa.entity.Status_$$_javassist_39
| at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:108)
| 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.web.MultipartFilter.doFilter(MultipartFilter.java:87)
| 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.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
| 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.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:157)
| 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.Http11AprProcessor.process(Http11AprProcessor.java:853)
| at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
| at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1513)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.IllegalArgumentException: Unknown entity: gov.hhs.fda.ocio.fdaaa.entity.Status_$$_javassist_39
| at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:185)
| at org.jboss.seam.persistence.EntityManagerProxy.find(EntityManagerProxy.java:85)
| at org.jboss.seam.framework.EntityIdentifier.find(EntityIdentifier.java:26)
| 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:1033)
| at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
| at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
| at javax.faces.component.UIForm.processValidators(UIForm.java:229)
| at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
| at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:662)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.access$201(AjaxViewRoot.java:53)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:315)
| at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:53)
| at org.ajax4jsf.framework.ajax.AjaxContext.invokeOnRegionOrRoot(AjaxContext.java:191)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.processValidators(AjaxViewRoot.java:329)
| at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100)
| ... 38 more
| Caused by: org.hibernate.MappingException: Unknown entity: gov.hhs.fda.ocio.fdaaa.entity.Status_$$_javassist_39
| at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:550)
| at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:68)
| 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)
| ... 61 more
This makes no sense to me. Am I going about this the wrong way?
Any help would be much appreciated.
Cheers!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090439#4090439
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090439
16Â years, 9Â months
[JBoss Tools (users)] - Update to JBoss IDE beta3 -> lots of problems ...
by tdemuth
Hi,
tonight I have updated to JBoss IDE beta3, because the packaging-mechanism refuses to work in my beta2-installation from now on (I don't know why, its telling me something of "Internal Error: beginRule path/in/my/workspace doesn't match surrounding context another/path/not/in/my/workspace" - I don't know what the problem is, it run perfectly all the time until now ... Maybe it is an issue with AJDT, but disabling AJDT didn't solve the problem.).
But now, I'm unable to start and stop the JBoss AS from the IDE ("Failed to boot JBoss:
org.jboss.deployment.DeploymentException: url file:/conf/jboss-service.xml could not be opened, does it exist?" - it exists and there aren't any restrictions for accessing that file, it is not write-locked or something like that / Running JBoss AS from the console works perfectly fine.) and the packaging-mechanism seems to have disappeared totally (Missing Builder org.jboss.ide.eclipse.packaging.core.PackagingBuilder).
The trouble with beta3 began even earlier: When downloading JBossTools-2.0.0beta3-ALL-win32.zip, files like eclipse.exe etc are missing in the download. It seems that there is no more bundled download (Eclipse + JBossTools). But that was what I expected from the ALL download. I installed Eclipse Europa and did an update from the JBoss-Update-site, which led to the above described issues.
I really liked to work with beta2, but I'm missing important features from beta2 in beta3. How can I fix my issues?
kind regards
Tobias
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090436#4090436
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090436
16Â years, 9Â months
[JBoss Seam] - Re: Entity Injection question
by smithbstl
Right s:validate works to circumvent the problem in my trivial example. I have more problems when trying to evaluate objects usually in EL when choosing to render them or not.
I end up having to check the value of the primary key of the entity instead of the entity itself. For example, if had some dependent controls and did not want to render the other controls until previous ones where filled in.
| <h:inputText value="#{foo.bar}">
| <a4j:support event="onblur" actionListener="#{backing.submitFoo}"/>
| </h:inputText>
| <h:inputText value="#{goo.bar}"
| rendered="#{foo.Id == null}"/>
It would be more intuitive to just say
rendered="#{foo == null}"
I understand why I can't but its misleading to a newcomer
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090434#4090434
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090434
16Â years, 9Â months
[Beginners Corner] - jboss.bind.address
by fuzzybinary
Not sure if this is a beginners question or not but it strikes me as one so I'll post it here.
I've tracked down a messaging / clustering problem to the way jboss binds to specific addresses, which defaults to only listening on localhost. In a two machine cluster, this doesn't make sense, so of course I bind to the machine's IP address using:
run.sh -c -b IPAddress
What I'm wondering about is whether there's a way around specifying the IP address? I've been removing jboss.bind.address calls, but I'm not sure which ones to actually remove to get a clustered install working, and which ones I should leave as is (to prevent "random" access to the machine).
Any suggestions?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090433#4090433
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090433
16Â years, 9Â months
[JBoss Portal] - Difference between portlet-ref and component-ref - portlet i
by dhoward0000
I'm trying to figure out why with the below configuration, only the TestPortletInstance30 instance will get created. Neither instance in the portlet-instances.xml is generated. Any ideas?
jboss-app.xml:
<jboss-app>
| <app-name>appname</app-name>
| </jboss-app>
portlet-instances.xml:
<deployment>
| <instance>
| <instance-id>TestPortletInstance10</instance-id>
| <portlet-ref>appname.TestPortlet</portlet-ref>
| </instance>
| </deployment>
|
| <deployment>
| <instance>
| <instance-id>TestPortletInstance20</instance-id>
| <portlet-ref>TestPortlet</portlet-ref>
| </instance>
| </deployment>
myapp-object.xml:
<deployment>
| <parent-ref/>
| <if-exists>overwrite</if-exists>
| <instance>
| <instance-name>TestPortletInstance30</instance-name>
| <component-ref>appname.TestPortlet</component-ref>
| </instance>
| </deployment>
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090429#4090429
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090429
16Â years, 9Â months