Illegal Argument Exception in Google Wave App

Posted by Yoenhofen on Stack Overflow See other posts from Stack Overflow or by Yoenhofen
Published on 2010-01-06T21:17:57Z Indexed on 2010/04/15 4:03 UTC
Read the original article Hit count: 313

I'm writing a Google Wave robot and I just messed something up. It was working just fine but now I'm getting an IllegalArgument exception on the line that includes query.execute.

Am I doing something stupid? I've seen several code samples very similar to what I'm doing. I can include the code of the WaveUpdate class if necessary.

The intent here is to select all WaveUpdate members that have an updateDateTime in the last hour.

    PersistenceManager pm = PMF.get().getPersistenceManager();
    try
    {
        Query query = pm.newQuery(WaveUpdate.class);
        query.setFilter("emailAddress > '' && updateDateTime > referenceDateTime");
        query.declareParameters("java.util.Date referenceDateTime");
        Calendar referenceDateTime = Calendar.getInstance();
        referenceDateTime.add(Calendar.HOUR_OF_DAY, -1);
        List<WaveUpdate> updates = (List<WaveUpdate>) query.execute(referenceDateTime.getTime());

© Stack Overflow or respective owner

Related posts about java

Related posts about google-app-engine