Chico,

I have not tried using any other databases, just tried manipulating the
test cases to generate databases using different the persistence-units
listed in persistence.xml plugged into the SpiEntityManagerFactory class.

I did try rewriting the query as two separate expressions and seemed to get
past the syntax error, but then I get errors about a missing column in the
AddressDb table called Address_Usage.  If I had to guess right now, that
error may be from the fact that the social-api project has changes that may
not yet be reflected in the samples project.  I have not dug very deep into
it yet.

I have also noticed when starting my Jetty server I see messages in the
Eclipse console about the org.eclipse.persistence.session.file and says the
version and build of the Eclipse Persistence Services (INFO: EclipseLink,
version: Eclipse Persistence Services - 1.0 (Build 1.0 - 20080707)).

Is there a setting somewhere in Shindig that I can change so that something
other than EclipseLink (say, Hibernate) loads in its place?

Thank you,
Gary F Stevens

chico charlesworth <chico.charleswo...@googlemail.com> wrote on 04/04/2009
07:03:09 AM:

> chico charlesworth <chico.charleswo...@googlemail.com>
> 04/04/2009 07:03 AM
>
> Please respond to
> shindig-dev@incubator.apache.org
>
> To
>
> shindig-dev@incubator.apache.org
>
> cc
>
> Subject
>
> Re: Implementing shindig-samples
>
> 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 <gstev...@us.ibm.com>
>
> >
> >
> > 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

Reply via email to