I use the ebean runtime weaver to enhance the entities, now when trying to query the database the following exception will be thrown:
Exception in thread "main" java.lang.IllegalAccessError: tried to access field com.ops.Premium.model.po.Zone.sid from class com.ops.Premium.model.po.ZoneManual at com.ops.Premium.model.po.ZoneManual._ebean_setField(ZoneManual.java:1) at com.avaje.ebean.server.reflect.EnhanceBeanReflect$Setter.set(EnhanceBeanReflect.java:110) at com.avaje.ebean.server.deploy.BeanProperty.setValue(BeanProperty.java:524) at com.avaje.ebean.server.deploy.BeanProperty.readSet(BeanProperty.java:391)
the field is private in Zone and has public getter/setter. If I change the property from private to public it starts working.Making them public is not really an option, no?
I think we need to set setAccessible on the field, no?I am not yet an expert on generating bytecode, would be great if you could look at that.
Thanks!
I think it will work if you make sid package protected (rather than private). No you should not make it public.
In regards getting it to work as private, I'll have a look into that. I think I see the problem ...
Yes, "package protected" did the trick. This is something I can live with. Being able to stick with "private" would be nice, though, not a high priority issue any more I think.
I think I'll get out v1.0.3 first... and then come back to this one.
In the meantime... people have to use package protected (can't use private).
I believe this is now fixed.