Community
Participate
Working Groups
@Entity @NoSql(dataFormat=DataFormatType.MAPPED) public class FancyEntity implements Serializable { // ... other fields @ElementCollection private Map<String,Attribute> attributes = new HashMap<>(); // ... getter/setter omitted } Leads to Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.4.1.v20120825fb0a20b): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [myPersistenceUnit] failed. Internal Exception: java.lang.ClassCastException: org.eclipse.persistence.eis.mappings.EISCompositeCollectionMapping cannot be cast to org.eclipse.persistence.mappings.foundation.MapComponentMapping at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:221) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.createPredeployFailedPersistenceException(EntityManagerSetupImpl.java:1541) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1532) at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:208) This error disappears after defining a map key manually (using @MapKey). Either this should produce a more meaningful exception or map key defaulting should be defaulted better. See http://stackoverflow.com/questions/12227031/how-to-map-mapstring-embeddable-using-eclipselink-mongodb-nosql too.
Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Community: Please vote for this bug if it is important to you. Votes are one of the main criteria we use to determine which bugs to fix next.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink