query syntax problem

8 views
Skip to first unread message

Snehal

unread,
May 8, 2009, 7:44:12 PM5/8/09
to typ...@googlegroups.com
i'm having an issue with my query syntax using the Domain.listItems(query) method.  I'm sending the AWS query into the method and getting the following error.  What's throwing me off is that the same query works fine through "QueryTool".  Am i supposed to be using a different query syntax?

select * from message where deliverDt < '2009-05-08T19:41:41.867-04:00'

com.xerox.amazonws.sdb.
SDBException: Client error : The specified query expression syntax is not valid.
    at com.xerox.amazonws.sdb.Domain.makeRequestInt(Domain.java:555)
    at com.xerox.amazonws.sdb.Domain.listItems(Domain.java:173)
    at com.xerox.amazonws.sdb.Domain.listItems(Domain.java:149)
    at com.xerox.amazonws.sdb.Domain.listItems(Domain.java:137)
    at com.futureself.dao.MessageInfoDAO.getAllBeforeDate(MessageInfoDAO.java:112)
    at com.futureself.service.MessageInfoService.getAllBeforeDate(MessageInfoService.java:40)
    at test.com.futureme.dao.TestMessageInfoService.testGetPastMessages(TestMessageInfoService.java:103)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at junit.framework.TestCase.runTest(TestCase.java:168)
    at junit.framework.TestCase.runBare(TestCase.java:134)
    at junit.framework.TestResult$1.protect(TestResult.java:110)
    at junit.framework.TestResult.runProtected(TestResult.java:128)
    at junit.framework.TestResult.run(TestResult.java:113)
    at junit.framework.TestCase.run(TestCase.java:124)
    at junit.framework.TestSuite.runTest(TestSuite.java:232)
    at junit.framework.TestSuite.run(TestSuite.java:227)
    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:91)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

David Kavanagh

unread,
May 8, 2009, 11:26:02 PM5/8/09
to typ...@googlegroups.com
The query tool uses the newer "select" syntax. The "listItems" method you are calling uses the older "query" syntax. That older syntax was deprecated, so my tool is just meant for the newer select statements. You should use "selectItems()" instead.

David

Snehal

unread,
May 9, 2009, 11:29:34 AM5/9/09
to typ...@googlegroups.com
Thanks for your help David.  Everything works as expected now.
Reply all
Reply to author
Forward
0 new messages