Property 'bnr' not found on type org.hibernate.collection.PersistentSet

Hi,

i have an DataTable:

<h:dataTable id="bestellungenTabelle" value="#{kunden.detailsKunde.bestellungen}"

var="best" cellspacing="5"

rendered="#{not empty kunden.detailsKunde.bestellungen}">

<h:column>

<f:facet name="header">

<h:outputText value="Ordernr"/>

</f:facet>

<h:outputText value="#{best.bnr}"/>

</h:column>

</h:dataTable>

kunden is mapped in an XML File:

<managed-bean-name>kunden</managed-bean-name>

<managed-bean-class>de.bm.kundenverwaltung.ui.KundenBean</managed-bean-class>

<managed-bean-scope>session</managed-bean-scope>

Here the variables in the ManagedBean (KundenBean):

private Kunde detailsKunde;

bestellungen is an Collection in Kunde, but when i call the jsp page i get the message:

'#{best.bnr}' Property 'bnr' not found on type org.hibernate.collection.PersistentSet

Here is the full stack trace:

type Exception report

message

description The server encountered an internal error () that prevented it from fulfillingthis request.

exception

javax.servlet.ServletException: /kundenverwaltung/panelGridDetails.jsp(66,4)'#{best.bnr}' Property'bnr' not found on type org.hibernate.collection.PersistentSet

javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

root cause

org.apache.jasper.el.JspPropertyNotFoundException: /kundenverwaltung/panelGridDetails.jsp(66,4)'#{best.bnr}' Property'bnr' not found on type org.hibernate.collection.PersistentSet

org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:104)

javax.faces.component.UIOutput.getValue(UIOutput.java:173)

com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:189)

com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:320)

com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:200)

javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:833)

com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:279)

com.sun.faces.renderkit.html_basic.TableRenderer.encodeChildren(TableRenderer.java:307)

javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)

javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)

javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)

com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:244)

com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:175)

com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)

com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)

com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)

javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

Do I have to declare a new property?

I really dont know what to do, please help me...

[3769 byte] By [TerenceJacksona] at [2007-11-27 6:13:30]
# 1

<h:dataTable value="#{kunden.detailsKunde.bestellungen}" var="best">

...

<h:outputText value="#{best.bnr}"/>

This declaration expects a Collection<Bestellungen> or DataModel<Bestellungen> where the Bestellung DTO has a field 'bnr' with the appropriate accessors getBnr() and setBnr().

The error message tries to explain you that it can't find those accessors. Doublecheck if they are actually definied.

Also see http://balusc.xs4all.nl/srv/dev-jep-dat.html for some explanation about the h:dataTable.

BalusCa at 2007-7-12 17:22:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...