You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a class with a non-primitive array property, e.g. "MyObject[] myObjects" labeled with @transient.
Compile the class and instrument it with Ebean weaver.
At runtime, Ebean fails to load with the following exception:
Caused by: java.lang.IllegalArgumentException: field [myObjects] not found in [com.xxx.MyContainer][id]
at com.avaje.ebeaninternal.server.reflect.EnhanceBeanReflect.getFieldIndex(EnhanceBeanReflect.java:139)
at com.avaje.ebeaninternal.server.reflect.EnhanceBeanReflect.getGetter(EnhanceBeanReflect.java:143)
at com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.setBeanReflect(BeanDescriptorManager.java:1377)
... 52 more
Workarounds:
Change the property to a List or Set rather than array.
Mark the field with "transient" as well if possible, i.e. if you don't need to use Java serialization on the field.
Fix: Move the "return new DeployBeanPropertyAssocOne(desc, propertyType);" statement inside the "if (!isTransientField(field)){" block in DeployCreateProperties.createProp(), and return null if the field is marked @transient, rather than assuming it is a persistent OneToOne.
The text was updated successfully, but these errors were encountered:
Create a class with a non-primitive array property, e.g. "MyObject[] myObjects" labeled with @transient.
Compile the class and instrument it with Ebean weaver.
At runtime, Ebean fails to load with the following exception:
Caused by: java.lang.IllegalArgumentException: field [myObjects] not found in [com.xxx.MyContainer][id]
at com.avaje.ebeaninternal.server.reflect.EnhanceBeanReflect.getFieldIndex(EnhanceBeanReflect.java:139)
at com.avaje.ebeaninternal.server.reflect.EnhanceBeanReflect.getGetter(EnhanceBeanReflect.java:143)
at com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.setBeanReflect(BeanDescriptorManager.java:1377)
... 52 more
Workarounds:
Fix: Move the "return new DeployBeanPropertyAssocOne(desc, propertyType);" statement inside the "if (!isTransientField(field)){" block in DeployCreateProperties.createProp(), and return null if the field is marked @transient, rather than assuming it is a persistent OneToOne.
The text was updated successfully, but these errors were encountered: