Illegal Argument Exception in Google Wave App
- by Yoenhofen
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());