Community
Participate
Working Groups
Type any of these properties in to the persistence.xml source of an EclipseLink persistence.xml: <property name="eclipselink.cache.type." value=""/> <property name="eclipselink.cache.size." value=""/> <property name="eclipselink.cache.type." value=""/> <property name="eclipselink.descriptor.customizer." value=""/> java.lang.IllegalArgumentException at org.eclipse.jpt.eclipselink.core.internal.context.persistence.caching.Entity.initialize(Entity.java:50) at org.eclipse.jpt.eclipselink.core.internal.context.persistence.caching.Entity.<init>(Entity.java:41) at org.eclipse.jpt.eclipselink.core.internal.context.persistence.caching.EclipseLinkCaching.buildEntity(EclipseLinkCaching.java:521)
Investigate for 2.3.1.
Created attachment 172663 [details] proposed patch
Patch committed in 2.3.1 and head.
I discovered that this IllegalArgumentException is still encountered when building a project with this content. This can be reproduced by opening a project with the below persistence.xml from a closed state, or a project clean should also reproduce. This prevents the project from being built, which results in a non-functional Dali environment.
To reproduce: -Create a 2.1 EL project -Open persistence.xml editor -Create a Descriptor Customizer for an entity and enter a customizer class on the Customizer tab <save> -Edit the source by removing the entity class name from the the property "name" string <save> -close the project -open the project java.lang.IllegalArgumentException at org.eclipse.jpt.eclipselink.core.internal.context.persistence.customization.Entity.initialize(Entity.java:45) ... Project fails to build, and cannot be built until the above persistence.xml is corrected.
This is the exact property text that is causing the failure for me: <property name="eclipselink.descriptor.customizer." value="com.sun.org.apache.bcel.internal.generic.AALOAD"/>
That's an odd case, and an easy fix. I have checkin a fix so it won't block the building of the project. But there is a problem now if you edit the source and give an Entity name, you could end up with multiple dummy Entities in the Customization tab. We lost our way to detect when a Descriptor Customizer property is in the middle of being entered. The good thing is that these dummy Entities will disappear the next time the project is built. You have the same problem if you try to rename an Entity in the source tab.
Committed in 2.3.1 and head.
verified fixed in build wtp-sdk-M-3.2.1-20100716070539