| Summary: | java.util.NoSuchElementException when using @ElementCollection for enum in Embeddable | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | darren |
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | michael.f.obrien, tom.ware |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
|
Description
darren
As far as I can tell this happens for EclipseLink versions 2.0.1 and 2.1.2 (except that 2.1.2 hits other problems first, such as not permitting my custom property annotations applied to a @Transient property, which I have to comment out to avoid: 'Mapping annotations cannot be applied to fields or properties that have a @Transient specified.'). I tried EclipseLink2.2.0RC4 with: - jlib/jpa/javax.persistence_2.0.3.v201010191057.jar - jlib/eclipselink.jar (No moxy or sdo.) I get the same error, I don't understand the versioning in the output: SEVERE: Exception while preparing the app javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [greendeskPU] failed. Internal Exception: java.util.NoSuchElementException Q1: How does 'Eclipse Persistence Services - 2.0.1.v20100213-r6600' relate to javax.persistence_2.0.3.v201010191057.jar and the "2.2.0RC"-ness of the EclipseLink2.2.0RC4 ? Q2: Does this indicate something is wrong with my libraries (in Netbeans6.9.1 I uninstalled EclipseLink2.0.1 in favour of EclipseLink2.2.0RC4, however there might be a problem with referencing older EclipseLink libraries. > I get the same error, I don't understand the versioning in the output: > > SEVERE: Exception while preparing the app > javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse > Persistence Services - 2.0.1.v20100213-r6600): .. .. > Q2: Does this indicate something is wrong with my libraries (in Netbeans6.9.1 I > uninstalled EclipseLink2.0.1 in favour of EclipseLink2.2.0RC4, however there > might be a problem with referencing older EclipseLink libraries. Yes, it did. I had the glassfish3.0.1 eclipselink jars under glassfish/modules (as well as in Netbeans IDE); I moved them out of glassfish (including javax.persistence.jar) and copied back in just javax.persistence_2.0.3.v201010191057.jar (from EclipseLink2.2.0RC4). I restarted glassfish, and my application runs with a new error (but at least it shows the expected version): Exception [EclipseLink-68] (Eclipse Persistence Services - 2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The value of an aggregate in object theObject is null. The javax.persistence libraries and eclipselink libraries are versioned separately. javax.persistence holds the JPA specification classes. 2.0.0 was the original implementation and each incremental release contains one or more bug fixes to the implementation classes within that library since the original implementation was releases. (i.e. 2.0.3 contains several bug fixes to the classes released to support the original specification) In general, you should use the most recent version of these classes available and they should be compatible with any EclipseLink version that supports JPA 2.0. EclipseLink 2.0.1.v20100213-r6600 is the version of EclipseLink that shipped with your GlassFish version. 2.2.0.v20110202-r8913 is our 2.2 release. The official release will quite soon, but those are our final EclipseLink 2.2 bits. BTW: PLease vote for the bugs you consider important. Community votes are one of the main criteria we use to determine when to fix bugs. (In reply to comment #4) > The javax.persistence libraries and eclipselink libraries are versioned > separately. .. Thanks tom for this clarification, have read and understood, am now using EclipseLink 2.2.0.v20110202-r8913 (a.k.a.RC4) with @ElementCollection in Embeddable with success, and have understood how to better coordinate javax.persistence libraries and eclipselink libraries between glassfish and my IDE netbeans. As far as I can tell this is fixed in EclipseLink 2.2.0.v20110202-r8913, darren (In reply to comment #3) > I restarted glassfish, and my application runs with a new error (but at least > it shows the expected version): > > Exception [EclipseLink-68] (Eclipse Persistence Services - > 2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.DescriptorException > Exception Description: The value of an aggregate in object theObject is null. This was because the embeddable field 'permissions' was not correctly initialized, this is now also working correctly, thanks, darren Are there any remaining issues related to this bug in EclipseLink 2.2? (In reply to comment #8) > Are there any remaining issues related to this bug in EclipseLink 2.2? Not as far as I can tell. Have set resolved. BTW as I'm new to Eclipse Bugzilla, could you please refer to information on whether in such cases: (A) I (the bug reported) should close this bug report (set as resolved, and if so, how I should indicate the "fixed in" version EclipseLink 2.2RC4), OR (B) whether somebody more "official" from the project should close it (set a resolved) ? Thanks, Darren Setting target to 2.2.0 - based on comments above. If you know that a bug you have filed is fixed and know the version, please feel free to close it. If you were not the filer, it is best to leave it open and add comments asking someone else to close it. The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |