Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Eclipselink 1.1, one-to-many inside an embeddable

Hello everybody!

I'm using Eclipselink 1.1M1 (August 13, 2008) and failing to get a one-to-may working inside an ebmeddable -
upon deployment I continue to get a NosuchElementException:

Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.1 (Build SNAPSHOT - 20080813)): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [Embed] failed.
Internal Exception: java.util.NoSuchElementException
    at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
    ... 9 more
Caused by: java.util.NoSuchElementException
    at java.util.AbstractList$Itr.next(Unknown Source)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataDescriptor.getPrimaryKeyFieldName(MetadataDescriptor.java:679)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.CollectionAccessor.addManyToManyRelationKeyFields(CollectionAccessor.java:116)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.CollectionAccessor.processJoinTable(CollectionAccessor.java:314)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.process(OneToManyAccessor.java:99)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processRelationship(RelationshipAccessor.java:363)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processAccessorsWithRelationships(MetadataProject.java:643)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.process(MetadataProject.java:632)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:452)
    at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:303)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:830)

Seems to me that the CollectionAccessor tries to read the embeddable's primary key field's name (asumes there is one)
and fails instead of resorting to the embedding entities primary field.

Am I trying to achieve something which is not supported by EclipseLink 1.1 ?
BTW, I'm already using  xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/orm"

Thanks a lot for your help,
Werner

Back to the top