Re: Cayenne, Tapestry, Tomcat plumbling

From: Mike Kienenberger (mkienen..laska.net)
Date: Fri Jan 14 2005 - 16:15:02 EST

  • Next message: Jin Lee: "Re: Cayenne, Tapestry, Tomcat plumbling"

    Jin Lee <jinsle..mail.com> wrote:
    > To start off, I have cayenne.jar, tapestry.jar, and all the
    > dependencies in tomcat_home/shared/lib. Is this okay, or should it be
    > in the context's path?

    You're going to cause yourself all sorts of problems (classloading,
    primarily, with a single app, versioning with multiple apps) if you do this.

    I recommend sticking this stuff into .../WEB-INF/lib.

    > The problem lies in Tapestry's IPropertySelection. I have this method:
    >
    > public IPropertySelectionModel getPrimaryInvestigators() {
    > Visit visit = (Visit) getPage().getVisit();
    > DataContext context = visit.getDataContext();
    > SelectQuery q = new SelectQuery(Person.class);
    > List persons = context.performQuery(q);
    > context.commitChanges();

    Why do you have a commitChanges() in a read-only method? Probably won't fix
    anything, but I'd take it out since it's unnecessary (and will cause
    hard-to-trace behavior if you modified the DataContext contents on an
    earlier request).

    > return new PersonModel(persons);
    > }
    >
    > which return this error:
    >
    > Unable to resolve expression 'primaryInvestigators' for
    > assr.objects.NewASSR$Enhance_4..d5534[NewASSR].

    I can't comment on the Tapestry side of things as I've only used WebObjects
    and Struts.
    I don't see anything obvious. The error above does not appear to be a
    cayenne error, though. You might have better luck asking about it on the
    the Tapestry list.



    This archive was generated by hypermail 2.0.0 : Fri Jan 14 2005 - 16:14:59 EST