... due to the fact that the weaving process will put the array size as byte on the stack. I changed this to short and now weaving started to work.
BTW: I know, having tables with that much fields is a bad thing, but I have to deal with this legacy database anyway :-(
Index: ../ebean/src/com/avaje/ebean/enhance/agent/IndexFieldWeaver.java===================================================================--- ../ebean/src/com/avaje/ebean/enhance/agent/IndexFieldWeaver.java (revision 127)+++ ../ebean/src/com/avaje/ebean/enhance/agent/IndexFieldWeaver.java Fri Feb 13 21:43:32 CET 2009@@ -381,7 +381,7 @@ mv.visitInsn(ICONST_5); break; default:- mv.visitIntInsn(BIPUSH, value);+ mv.visitIntInsn(SIPUSH, value); } } }
Yes, nice bug. I have instead gone with a slight adjustment of:
default:if (value <= Byte.MAX_VALUE){ mv.visitIntInsn(BIPUSH, value);} else { mv.visitIntInsn(SIPUSH, value); }
... but yes, this would allow more that 127 properties for a given entity.
Fixed in v1.0.3