metteo / javageomodel

Automatically exported from code.google.com/p/javageomodel
0 stars 0 forks source link

GeocellManager.proximityFetch throws exception in AppEngine #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

private static final Key SMALLEST_KEY = 
KeyFactory.createKey(MyLocationCapable.class.getSimpleName(), 1);
private static final GeocellQuery GEOCELL_QUERY = new GeocellQuery("key >= 
idParam", "com.google.appengine.api.datastore.Key idParam", 
Lists.<Object>newArrayList(SMALLEST_KEY));

    Point center = new Point(latitude, longitude);
    PersistenceManager pm = PMF.instance().getPersistenceManager();
    return GeocellManager.proximityFetch(center, 4, 100, MyLocationCapable.class, GEOCELL_QUERY, pm);

What is the expected output? What do you see instead?
expected to get back some MyLocationCapables.  Instead I get a stack trace:

org.datanucleus.store.appengine.query.DatastoreQuery$UnsupportedDatastoreFeature
Exception: Problem with query <SELECT FROM mypackage.MyLocationCapable WHERE 
key >= idParam && geocellsP.contains(geocells) PARAMETERS 
com.google.appengine.api.datastore.Key idParam, String geocellsP>: Unsupported 
method <contains> while parsing expression: 
InvokeExpression{[ParameterExpression{geocellsP}].contains(VariableExpression{ge
ocells})}
    at org.datanucleus.store.appengine.query.DatastoreQuery.newUnsupportedQueryMethodException(DatastoreQuery.java:1015)
    at org.datanucleus.store.appengine.query.DatastoreQuery.handleContainsOperation(DatastoreQuery.java:993)
    at org.datanucleus.store.appengine.query.DatastoreQuery.addExpression(DatastoreQuery.java:880)
    at org.datanucleus.store.appengine.query.DatastoreQuery.addExpression(DatastoreQuery.java:850)
    at org.datanucleus.store.appengine.query.DatastoreQuery.addFilters(DatastoreQuery.java:827)
    at org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(DatastoreQuery.java:228)
    at org.datanucleus.store.appengine.query.JDOQLQuery.performExecute(JDOQLQuery.java:89)
    at org.datanucleus.store.query.Query.executeQuery(Query.java:1489)
    at org.datanucleus.store.query.Query.executeWithArray(Query.java:1371)
    at org.datanucleus.jdo.JDOQuery.executeWithArray(JDOQuery.java:312)
    at com.beoui.geocell.GeocellManager.proximityFetch(GeocellManager.java:286)

What version of the product are you using? On what operating system?

This is deployed to appengine.  Using geocell-0.0.3-SNAPSHOT.jar  that I 
downloaded last night (10/30/2010)

Original issue reported on code.google.com by ad...@basileus.mobi on 31 Oct 2010 at 3:41

GoogleCodeExporter commented 9 years ago
Available in 0.0.4 version.

Original comment by alexandr...@gmail.com on 11 Nov 2010 at 6:29

GoogleCodeExporter commented 9 years ago
also, when will 0.0.4 be available in a repository?

Original comment by orton.n...@gmail.com on 11 Nov 2010 at 11:17