Hi Gary, Have you tried with a different database, e.g. hsqldb or mysql, or even making sure the version of derby you are using is the latest? My other thought would be to rewrite the JPQL query as two expressions and see if that works?
Cheers Chico 2009/4/3 Gary Stevens <[email protected]> > > > Hello all, > > I have been trying to implement the data persistence samples included in > Shindig and hit a problem. I have set up a Derby\EclipseLink database with > the canonical data loaded into it and have tried to point my Shindig at it > instead of the canonicaldb.json file. My setup uses the > EclipseEntityManagerProvider class to create an implementation of > EntityManager and hits a snag inside of JPQLUtils.java's getTotalResults > method. The query it builds starts "select count(*)..." and when I load my > container I get a JPQL exception in my Eclipse console. The message reads: > > Syntax error parsing the query [select count(*) from PersonDb p where > p.objectId in (select f.friend.objectId from PersonDb p, FriendDb f where > p.objectId = f.person.objectId and p.id in (?1)) ], > line 1, column 13: syntax error at [*]. > Internal Exception: MismatchedTokenException(66!=70) > > From looking online, I am under the impression that the problem is a > difference in syntax between SQL and JPA/JPQL - that you can use the > annotation count(*) in SQL but not in JPQL because JPQL only allows one > argument in count() but SQL allows multiple arguments. Is this the > problem, and I need to rewrite how the getTotalResults method assembles the > query? Or am I further away from having the persistence sample working > than I think? If anyone else who has played around with the included > samples can offer any advice as well it would be greatly appreciated. > > Thank you, > - Gary F Stevens

