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.
I created an Enterprise Project and added some persistent entities and used the verification target to check. Using NB5.5beta2 AppServer bundle. Is there an issue with field vs. property access? Verify failed with: Test validity of EJB 3.0 persistence unit. This test tests validity using a portable persistence provider. For [ EnterpriseApplication1-ejb#EnterpriseApplication1-ejbPU ] Exception Description: Entity class [class haug.persistent.Node] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. The class is: @Entity public class Node implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @ManyToOne private Node parent; @OneToMany(mappedBy = "parent") private List<Node> children; private String value; public int hashCode() { int hash = 0; hash += (this.getId() != null ? this.getId().hashCode() : 0); return hash; } public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof Node)) { return false; } Node other = (Node)object; if (this.getId() != other.getId() && (this.getId() == null || !this.getId().equals(other.getId()))) return false; return true; } public String toString() { return "haug.persistent.Node[id=" + getId() + "]"; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Node getParent() { return parent; } public void setParent(Node parent) { this.parent = parent; } public List<Node> getChildren() { return children; } public void setChildren(List<Node> children) { this.children = children; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } }
I do not see an issue with field/property access - as long as all annotations are either on fields or all are on methods everything should be OK. In any case, the message is not very helpful.
Sahho said: " Sounds like a bug in TopLink Essential. " So I am moving the issue on GlassFish.
Filed GlassFish P3 bug https://glassfish.dev.java.net/issues/show_bug.cgi?id=1037 so keep watching the new issue. Closing this one, as the NetBeans plugin is not involved there.