Bug 205 : NPE with ElPropertyChain when an invalid property is used
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.4.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
13/01/2010
Updated 
13/01/2010
Type 
Bug
 
Attachments 
No attachments

Exception in thread "EbeanBackgroundThread" java.lang.NullPointerException
at com.avaje.ebean.server.el.ElPropertyChain.(ElPropertyChain.java:82)
at com.avaje.ebean.server.el.ElPropertyChainBuilder.build(ElPropertyChainBuilder.java:77)
at com.avaje.ebean.server.deploy.BeanDescriptor.buildElGetValue(BeanDescriptor.java:1462)
at com.avaje.ebean.server.deploy.BeanDescriptor.buildElGetValue(BeanDescriptor.java:1454)
at com.avaje.ebean.server.deploy.BeanDescriptor.buildElGetValue(BeanDescriptor.java:1454)
at com.avaje.ebean.server.deploy.BeanDescriptor.buildElGetValue(BeanDescriptor.java:1454)
at com.avaje.ebean.server.deploy.BeanDescriptor.buildElGetValue(BeanDescriptor.java:1454)
at com.avaje.ebean.server.deploy.BeanDescriptor.getElPropertyValue(BeanDescriptor.java:1403)
at com.avaje.ebean.server.deploy.BeanDescriptor.getElGetValue(BeanDescriptor.java:1387)
at com.avaje.ebean.server.autofetch.StatisticsNodeUsage.buildTunedFetch(StatisticsNodeUsage.java:59)
at com.avaje.ebean.server.autofetch.Statistics.buildTunedFetch(Statistics.java:97)
at com.avaje.ebean.server.autofetch.DefaultAutoFetchManager.updateTunedQueryInfo(DefaultAutoFetchManager.java:339)
at com.avaje.ebean.server.autofetch.DefaultAutoFetchManagerLogging$UpdateProfile.run(DefaultAutoFetchManagerLogging.java:59)
at com.avaje.ebean.server.lib.BackgroundThread$Runner.runJobs(BackgroundThread.java:208)
at com.avaje.ebean.server.lib.BackgroundThread$Runner.run(BackgroundThread.java:172)
at java.lang.Thread.run(Thread.java:613)

 
Rob 13 Jan 07:36
This occurs..

This can occur when a nested property expression is incorrect. This can happen for example when a property is removed from the model (from an entity) and a query tries to use the old property.

The fix is to identify this situation and give a meanful error so that the developer can fix the problem.

Rob 13 Jan 07:36
Fixed in HEAD

Fixed in HEAD.

woResponse

Upload a file