Bug 345 : NPE when saving UUID type that is null ... aka when a ManyToOne property is null and uses UUID as PK.
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.7.2
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
09/12/2010
Updated 
09/12/2010
Type 
Bug
 
Attachments 
No attachments

Caused by: java.lang.NullPointerException
at
com.avaje.ebeaninternal.server.type.ScalarTypeUUID.formatValue(ScalarTypeUUID.java:
59)
at
com.avaje.ebeaninternal.server.type.ScalarTypeUUID.convertToDbString(ScalarTypeUUID.java:
47)
at
com.avaje.ebeaninternal.server.type.ScalarTypeUUID.convertToDbString(ScalarTypeUUID.java:
1)
at
com.avaje.ebeaninternal.server.type.ScalarTypeBaseVarchar.bind(ScalarTypeBaseVarchar.java:
55)
at
com.avaje.ebeaninternal.server.deploy.BeanProperty.bind(BeanProperty.java:
660)
at
com.avaje.ebeaninternal.server.persist.dml.DmlHandler.bindInternal(DmlHandler.java:
249)
at
com.avaje.ebeaninternal.server.persist.dml.DmlHandler.bind(DmlHandler.java:
208)
at
com.avaje.ebeaninternal.server.deploy.id.ImportedIdSimple.bind(ImportedIdSimple.java:
150)

 
Rob 09 Dec 10:33
Fixed in HEAD

Found the issue. Fix in ScalarTypeBaseVarchar ... refer to test case TestUuidInsertMasterDetail.testNullFK().

woResponse

Upload a file