This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 130867 - PNFE : The class 'pioweb.PytanieController' does not have the property 'odpowiedziOfPytanie'
Summary: PNFE : The class 'pioweb.PytanieController' does not have the property 'odpow...
Status: RESOLVED INVALID
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Matthew Bohm
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-23 16:07 UTC by jlaskowski
Modified: 2008-03-24 13:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jlaskowski 2008-03-23 16:07:39 UTC
The Generated page upon executing the JSF Pages from Entity Class wizard corresponding to the owning side of the
relation in @OneToMany relationship breaks with the following PNFE exception:

Caused by: javax.el.PropertyNotFoundException: The class 'pioweb.PytanieController' does not have the property
'odpowiedziOfPytanie'.
        at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:547)
        at javax.el.BeanELResolver.getValue(BeanELResolver.java:249)
        at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
        at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
        at com.sun.el.parser.AstValue.getValue(AstValue.java:138)
        at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
        at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
        ... 57 more
Comment 1 _ potingwu 2008-03-23 19:04:09 UTC
Please specify more clear how you reproduce this problem by using the JSF Pages from Entity Class.
Comment 2 jlaskowski 2008-03-24 00:24:55 UTC
1/ Created a Java Class Library project with two entities in @OneToMany relationship - Pytanie and Odpowiedz. Pytanie
had odpowiedzi persistent attribute of type java.util.List<Odpowiedz>
2/ Created a Web Application project of which the Java Class Library with the entities was a dependency (library)
3/ Upon executing the wizard the New.jsp page for Pytanie had not the persistent property and that's the exception all
about.
Comment 3 Matthew Bohm 2008-03-24 04:49:06 UTC
Yes, please attach to project. Thanks.
Comment 4 jlaskowski 2008-03-24 11:21:34 UTC
The project with 2 entities in @OneToMany relationship and the other - web application project are at
http://www.jaceklaskowski.pl/aplikacje/pio-netbeansprojects.zip. They worked fine as I'd manually added the missing
property - odpowiedziOfPytanie - to the backing bean - pioweb.PytanieController. Remove the property and you'll see the
issue.
Comment 5 Matthew Bohm 2008-03-24 13:14:06 UTC
I notice this application was generated with out-of-date netbeans code. You may want to try generating the application
from the entities again, using current netbeans code.
Comment 6 Matthew Bohm 2008-03-24 13:55:49 UTC
I tried with current netbeans code; that was not the problem. But I do think I see the cause. Odpowiedz does not have a
property of type Pytanie with an appropriate @ManyToOne annotation.

Here is an example that appears in the JPA specification:

Example 1: One-to-Many association using generics
In Customer class:
@OneToMany(cascade=ALL, mappedBy=”customer”)
public Set<Order> getOrders() { return orders; }
In Order class:
@ManyToOne
@JoinColumn(name="CUST_ID", nullable=false)
public Customer getCustomer() { return customer; }