JPA error on "primitive" property with "wrapped" field [message #385754] |
Fri, 06 March 2009 06:53  |
Eclipse User |
|
|
|
Hi,
One of our applications had a strange problem recently:
while using the entity MyEntity, we got a
java.lang.VerifyError: (class: MyEntity, method: setMyField signature:
(Z)V) Expecting to find integer on stackThe problem is this piece of code
The application is deployed on OCJ4 10.1.3.4, and uses Eclipselink as
delivered by Toplink 11.1.1.0.1.
We narrowed the problem to the following situation
@Entity
@Table(name = "MY_TABLE")
public MyEntity {
private Boolean myField;
@Column(name = "MY_FIELD")
public boolean getMyField() {
return myField;
}
public boolean setMyField(boolean myField) {
this.myField = myField;
}
As you can see, the myField is defined as Boolean object while the
getter/setter methods use primitives.
By changing myField to a primitive, the error disappeared.
Is this as specified by the spec (autoboxing not supported), or is this an
issue that should be reported in Bugzilla?
Cheers,
Nico
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07201 seconds