| Summary: | NPE validating attribute override name when there is no type to override | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Karen Butzke <karenfbutzke> | ||||||
| Component: | General | Assignee: | Nan Li <nan.n.li> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | neil.hauge | ||||||
| Version: | 3.0 | Flags: | neil.hauge:
review+
|
||||||
| Target Milestone: | 3.0 M7 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 193948 [details]
Proposed Patch
For jpa_validation.properties and JpaValidationMessages.java, each has the following two new entries:
ATTRIBUTE_OVERRIDE_INVALID_TYPE
VIRTUAL_ATTRIBUTE_OVERRIDE_INVALID_TYPE
Perhaps this chance can be merged into the updated patch for bug 335741. Created attachment 194054 [details] Proposed Patch Merged the changes of messages to the patch of bug 335741. This patch only includes one file. Committed to head. |
Given this java entity, the attached NPE occurs when trying to validate the attribute override. This prevents the rest of the JPA validation from completing. @Entity @AttributeOverride(name="bar") public class Bar { @Id private int id; } You can also see this problem in orm.xml. Remove the AttributeOverride annotation from the java and add this entity to the orm.xml: <entity class="model.Bar"> <attribute-override name="bar"></attribute-override> </entity> If the class model.Bar is not found, the same exception occurs.