Bug 367 : DeployCreateProperties.determineTargetType(Field) assumes that maps don't use parameterized elements
Priority 
High
Reported Version 
 
Logged By 
sunkid
Status 
Fixed
Fixed Version 
2.7.4
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
03/05/2011
Updated 
03/05/2011
Type 
Bug
 
Attachments 
No attachments

The following error is thrown when using a @Transient Map> attribute, for example.


javax.persistence.PersistenceException: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class
at com.avaje.ebeaninternal.server.deploy.parse.DeployCreateProperties.createProperties(DeployCreateProperties.java:199)
at com.avaje.ebeaninternal.server.deploy.parse.DeployCreateProperties.createProperties(DeployCreateProperties.java:94)
at com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.createDeployBeanInfo(BeanDescriptorManager.java:1088)
at com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.readEntityDeploymentInitial(BeanDescriptorManager.java:598)
at com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.deploy(BeanDescriptorManager.java:274)
at com.avaje.ebeaninternal.server.core.InternalConfiguration.(InternalConfiguration.java:150)
at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:209)
at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:64)
at com.avaje.ebean.EbeanServerFactory.create(EbeanServerFactory.java:78)


Line 414 of com.avaje.ebeaninternal.server.deploy.parse.DeployCreateProperties directly casts the second type argument of the map to a class, when it is actually a ParameterTypeImpl

 
sunkid 03 May 01:08
buggered HTML conversion

just to clarify, the attribute is a Map<String, List<String>>

Rob 25 Jun 05:22
Fixed in HEAD

fixed in HEAD.

woResponse

Upload a file