Bug 128 : NPE running an update where the ManyToOne
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.0.1
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
19/07/2009
Updated 
19/07/2009
Type 
Bug
 
Attachments 
No attachments

I have just found a NPE running an update where the ManyToOne is null ...

Exception in thread "main" java.lang.RuntimeException: get id on [app.data.Address] type[null] threw error.
at com.avaje.ebean.server.deploy.BeanProperty.getValue(BeanProperty.java:640)
at com.avaje.ebean.server.deploy.id.ImportedIdSimple.hasChanged(ImportedIdSimple.java:88)

..
Caused by: java.lang.NullPointerException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.avaje.ebean.server.deploy.BeanProperty.getValue(BeanProperty.java:635)


Fix is in the BeanPropertyAssocOne.

 
Rob 19 Jul 09:43
Fixed in v2.0.0 build 2009-07-19

Only just released 2.0.0 build 2009-07-17 ... so put this fix into v2.0.0 2009-07-19 and put that only source-forge.

Some folks will have downloaded the early build with this bug.

Rob 19 Jul 09:45
Note:

The build version (and java version) is logged when you start Ebean...

e.g.

INFO: Ebean Version[2.0.0-20090719] Java Version[1.5.0_03]

woResponse

Upload a file