[JBoss Seam] - [1.3.0 Alpha]property 'aString' not found on type java.lang
by enzhao
This exception:
javax.el.PropertyNotFoundException: /new-recipe.xhtml @127,54 value="#{ingre.unitSeq}": Property 'unitSeq' not found on type java.lang.String
Here is the relevant code in the new-recipe.xhtml:
| <rich:panel id="storedIngredients"
| rendered="#{createRecipe.ingredients.size > 0}">
| <h:dataTable value="createRecipe.ingredients" var="ingre">
| <h:column>
| <f:facet name="header">
| <h:outputText value="Measurement" />
| </f:facet>
| <h:outputText value="#{ingre.unitSeq}" />
| </h:column>
| </h:dataTable>
| </rich:panel>
|
Here is the relevant code in the backing bean:
| @Stateful
| @Name("createRecipe")
| @Scope(CONVERSATION)
| public class CreateRecipeUseCase implements Serializable, CreateRecipe {
|
| @In private EntityManager entityManager;
|
| @In(required = false)
| @Out(required = false)
| private Recipe recipe;
|
| private Integer recipeId;
|
| private List<Ingredient> ingredients;
|
|
| @Begin
| public void stageOne() {
| entityManager.persist(recipe);
| recipeId = recipe.getId();
| ingredients = new ArrayList<Ingredient>();
| }
|
| ...
|
| public void addAnIngredient(BigDecimal amount) {
| Food tmp = entityManager.find(Food.class, "01001"); //for testing purpose
| try {
| Ingredient ingre = new Ingredient(recipe, tmp,
| ingredient.getAmount(), this.ingreWeight.getSeq());
| entityManager.persist(ingre);
| this.ingredients.add(ingre);
| } catch (EatSmartPersistenceException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| }
|
|
| @End
| public void cancel() {}
|
| @Remove
| @Destroy
| public void destroy() {}
|
| /**
| * @return the ingredients
| */
| public List<Ingredient> getIngredients() {
| return ingredients;
| }
|
| /**
| * @param ingredients
| * the ingredients to set
| */
| public void setIngredients(List<Ingredient> ingredients) {
| this.ingredients = ingredients;
| }
|
| /**
| * @return the recipeId
| */
| public Integer getRecipeId() {
| return recipeId;
| }
|
| /**
| * @param recipeId
| * the recipeId to set
| */
| public void setRecipeId(Integer recipeId) {
| this.recipeId = recipeId;
| }
|
| // other methods ...
|
It's very strange since the new ingredient instance was always successfully created and in the database the persisted evidence can also be found. Why the attributes of a persisted new ingredient cannot be displayed on the page? I'm using Seam 1.3.0 Alpha on JBoss AS 4.2.0. Here is the full error stack:
2007-06-21 19:50:17,218 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.persistence.persistenceProvider
2007-06-21 19:50:17,234 DEBUG [org.jboss.seam.contexts.Contexts] found in event context: ingre
2007-06-21 19:50:17,234 DEBUG [org.jboss.seam.contexts.Contexts] found in event context: ajaxContext
2007-06-21 19:50:17,234 ERROR [STDERR] Jun 21, 2007 7:50:17 PM com.sun.facelets.FaceletViewHandler handleRenderException
SEVERE: Error Rendering View[/new-recipe.xhtml]
javax.faces.FacesException: javax.el.PropertyNotFoundException: /new-recipe.xhtml @127,54 value="#{ingre.unitSeq}": Property 'unitSeq' not found on type java.lang.String
at javax.faces.component.UIOutput.getValue(UIOutput.java:176)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:189)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:320)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:200)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:833)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:279)
at com.sun.faces.renderkit.html_basic.TableRenderer.encodeChildren(TableRenderer.java:307)
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.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:189)
at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:184)
at org.ajax4jsf.framework.renderer.RendererBase.encodeChildren(RendererBase.java:121)
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.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:189)
at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:184)
at org.ajax4jsf.framework.renderer.RendererBase.encodeChildren(RendererBase.java:121)
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 org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
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.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:70)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:81)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:62)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:47)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:293)
at org.jboss.seam.web.AbstractAjax4jsfFilter.doFilter(AbstractAjax4jsfFilter.java:35)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:64)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:127)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
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: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:619)
Caused by: javax.el.PropertyNotFoundException: /new-recipe.xhtml @127,54 value="#{ingre.unitSeq}": Property 'unitSeq' not found on type java.lang.String
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:73)
at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
... 66 more
Any enlightenment would be highly appreciated! Thanks in advance!!!
Regards,
Ellen
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056625#4056625
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056625
18Â years, 10Â months
[JBoss Seam] - Re: Seam Eclipse project structure (newbie question)
by ASavitsky
"tptackab" wrote : My best guess would be as follows:
| my-application/
| | src/
| | com.myapp.foo.java
| | com.myapp.bar.java
| | ...
| | WebContent/
| | index.html
| | index.xhtml
| | foopage.xhtml
| | barpage.xhtml
| | META-INF/
| | MANIFEST.MF
| | WEB-INF/
| | faces-config.xml
| | web.xml
| | components.xml
| | seam.properties
| | LIB/
| | jboss-seam.jar
| | jboss-seam-ui.jar
| | el-api.jar
| | el-ri.jar
| | jsf-facelets.jar
| | hibernate3.jar
| | hibernate-annotations.jar
| | ...
|
| ...
|
| Am I on the right track?
In short, yes, you are. The standard WAR structire (without application code in JAR) works ok for Seam. I'm currently using Eclipse 3.2 (waiting for 3.3 to hit GA) + WTP 1.5 (again, I'm behind you there), and my setup is pretty much the one you've shown, with only one difference: all JARs are instead placed in my-application/lib, and linked to the project as "J2EE Module Dependencies". It's only a matter of taste though, placing them in WEB-INF/lib would work just the same (I tried).
And just for your reference, here's the list of JARs I have in the project, in case you're trying to figure out which ones you're missing:
lib/commons/commons-beanutils-1.7.0.jar
| lib/commons/commons-codec-1.3.jar
| lib/commons/commons-collections-3.2.jar
| lib/commons/commons-digester-1.7.jar
| lib/commons/commons-fileupload-1.1.1.jar
| lib/commons/commons-lang-2.2.jar
| lib/commons/commons-logging-1.1.jar
| lib/commons/itext-2.0.1.jar
| lib/commons/log4j-1.2.13.jar
| lib/jpa/antlr-2.7.6.jar
| lib/jpa/asm.jar
| lib/jpa/cglib-2.1.3.jar
| lib/jpa/dom4j-1.6.1.jar
| lib/jpa/ejb3-persistence.jar
| lib/jpa/hibernate-3.2.3.jar
| lib/jpa/hibernate-annotations-3.3.0.jar
| lib/jpa/hibernate-commons-annotations.jar
| lib/jpa/hibernate-entitymanager-3.3.1.jar
| lib/jpa/hibernate-validator-3.0.0.jar
| lib/jpa/javassist.jar
| lib/jpa/jboss-archive-browsing.jar
| lib/jsf/ajax4jsf-1.1.0.jar
| lib/jsf/el-api.jar
| lib/jsf/el-ri.jar
| lib/jsf/jsf-api.jar
| lib/jsf/jsf-facelets-1.1.11.jar
| lib/jsf/jsf-impl.jar
| lib/jsf/oscache-2.3.2.jar
| lib/mc/concurrent.jar
| lib/mc/jboss-common-jdbc-wrapper.jar
| lib/mc/jboss-common.jar
| lib/mc/jboss-container.jar
| lib/mc/jboss-dependency.jar
| lib/mc/jboss-j2ee.jar
| lib/mc/jboss-j2se.jar
| lib/mc/jboss-jca.jar
| lib/mc/jboss-local-jdbc.jar
| lib/mc/jboss-microcontainer.jar
| lib/mc/jboss-security.jar
| lib/mc/jboss-system.jar
| lib/mc/jboss-transaction.jar
| lib/mc/jnpserver.jar
| lib/mc/xercesImpl.jar
| lib/seam/jboss-seam-debug.jar
| lib/seam/jboss-seam-pdf.jar
| lib/seam/jboss-seam-ui.jar
| lib/seam/jboss-seam.jar
|
About half of them is the microcontainer, really, so if you're using embedded EJB, YMMV.
HTH,
Alex
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056624#4056624
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056624
18Â years, 10Â months
[EJB 3.0] - @Service POJOs information
by 8forty
I'm experimenting with the @Service POJOs on a new project, and I really like the concept, but I have a few questions about what I've discovered.
I've confirmed that the single instance created allows multiple active simultaneous threads. Therefore if I have any fields, I need to synchronize them.
1) Is it therefore safe to use the synchronized keyword in my @Service POJO methods (in violation of the EJB spec)?
2) If I build a JBoss cluster, is there still just a single instance regardless of the number of machines in the cluster?
3) Do @Service POJOs have the same transaction semantics as stateful session beans? (e.g. can I use an extended persistence context in the same way?)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056621#4056621
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056621
18Â years, 10Â months
[JBoss Portal] - Re: multiple header support
by Antoine_h
You can do it !
when you define a portal (or even just a new page), you define a layout and a theme for this portal (or page).
Then, you can define several layout and theme, and package them in one big "my_layouts_and_themes.war" package, or in as many war you want.
(ie : "my_layout_and_theme_1.war", "my_layout_and_theme_2.war", etc...).
Also the layout can be in the war, with other portlets...
but I find it more clean to have a separate project and separate war package for the layout. That depends on your preferred way.
then, you define each portal with the layout and theme you want.
(you can also change the L/T for each user, during the session, etc...).
All in the same instance of JBoss and of JBoss Portal (multiple portal feature).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056615#4056615
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056615
18Â years, 10Â months