Bug 191 : NPE bug in SqlTreeNodeBean.createListProxies when the entity that the bean set is proxy'ing uses inheritance.
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.3.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
08/12/2009
Updated 
08/12/2009
Type 
Bug
 
Attachments 
No attachments

Here is the NPE stack trace

java.lang.NullPointerException
at com.avaje.ebean.server.loadcontext.DLoadManyContext.(DLoadManyContext.java:59)
at com.avaje.ebean.server.loadcontext.DLoadContext.createManyContext(DLoadContext.java:266)
at com.avaje.ebean.server.loadcontext.DLoadContext.getManyContext(DLoadContext.java:256)
at com.avaje.ebean.server.loadcontext.DLoadContext.register(DLoadContext.java:220)
at com.avaje.ebean.server.query.CQuery.register(CQuery.java:724)
at com.avaje.ebean.server.query.SqlTreeNodeBean.createListProxies(SqlTreeNodeBean.java:360)
at com.avaje.ebean.server.query.SqlTreeNodeBean.load(SqlTreeNodeBean.java:300)
at com.avaje.ebean.server.query.SqlTreeNodeManyRoot.load(SqlTreeNodeManyRoot.java:30)
at com.avaje.ebean.server.query.SqlTreeNodeBean.load(SqlTreeNodeBean.java:290)
at com.avaje.ebean.server.query.CQuery.readRow(CQuery.java:557)
at com.avaje.ebean.server.query.CQuery.readBeanInternal(CQuery.java:594)
at com.avaje.ebean.server.query.CQuery.readTheRows(CQuery.java:675)
at com.avaje.ebean.server.query.CQuery.readCollection(CQuery.java:660)
at com.avaje.ebean.server.query.CQueryEngine.findMany(CQueryEngine.java:166)
at com.avaje.ebean.server.query.DefaultOrmQueryEngine.findMany(DefaultOrmQueryEngine.java:88)
at com.avaje.ebean.server.core.OrmQueryRequest.findList(OrmQueryRequest.java:277)
at com.avaje.ebean.server.core.DefaultServer.findList(DefaultServer.java:1288)
at com.avaje.ebean.server.core.DefaultBeanLoader.loadMany(DefaultBeanLoader.java:143)
at com.avaje.ebean.server.core.DefaultServer.loadMany(DefaultServer.java:372)
at com.avaje.ebean.server.loadcontext.DLoadManyContext.loadMany(DLoadManyContext.java:143)
at com.avaje.ebean.common.AbstractBeanCollection.lazyLoadCollection(AbstractBeanCollection.java:140)
at com.avaje.ebean.common.BeanSet.init(BeanSet.java:110)
at com.avaje.ebean.common.BeanSet.toArray(BeanSet.java:298)
at java.util.ArrayList.addAll(ArrayList.java:473)

 
Rob 08 Dec 10:16
Fixed in HEAD

Fixed in HEAD.

Issue here was the BeanDescriptor needed to take into account the inheritance heirachy when finding the BeanProperty.

woResponse

Upload a file