Re: No DataMap found for query exception???

From: Robert Zeigler (rdzeigl...arizona.edu)
Date: Mon Aug 09 2004 - 19:18:14 EDT

  • Next message: Robert Zeigler: "Re: No DataMap found for query exception???"

    Mike Kienenberger wrote:
    > Robert Zeigler <rdzeigl...arizona.edu> wrote:
    >
    >>Running cayenne version 1.1B1.
    >>I'm trying to execute a query, and getting a
    >>"No DataMap found for query with root: class
    >>org.eledge.domain.model.User" exception thrown.
    >>It's just a basic query...
    >>SelectQuery query = new SelectQuery(User.class);
    >>query.setExpression(ExpressionFactory.matchExp("login",login));
    >>query.andExpression(ExpressionFactory.matchExp("password",pass));
    >>dataContext.performQuery(query);//exception occurs here.
    >>
    >>I have switched package names, but everything has been refactored to use
    >>the new name. All of my objects extend a base object, which in turn
    >>extends CayenneDataObject. The base object is not part of the cayenne
    >>schema (? could that be the problem?). Any thoughts on this one are
    >>appreciated greatly.
    >
    >
    > No, your base object doesn't matter.
    >
    > Is "org.eledge.domain.model.User" your old name or your new name?

    It's the new name. I've double checked the .xml files, classes, etc.,
    and nothing is referencing the old package name.

    >
    > Are you sure that the DataMap is attached to a DataNode?

    Yes.

    >
    > Did it used to work before you changed packages?

    I don't know; I changed fairly early on. But I do have some more info in
    relation to this. I went ahead and regenerated the classes in a new
    directory, and created a "main" class that does just what I'm trying to
    do in my webapp. I ran it with no problems.
    At that point, I saved pertinent changes to the data object
    superclasses, and wiped out everything. I regenerated everything,
    put my changes back in, and so forth. I'm still getting the exception.
    =( I've also tried querying other classes with no modifications, and
    I'm still getting the exception.

    I'm getting the context from a "visit" session object.
    The context is created in the visit constructor, in the same manner as
    the cayenne-tapestry tutorial app. Any help greatly appreciated.

    Robert

    >
    > -Mike



    This archive was generated by hypermail 2.0.0 : Mon Aug 09 2004 - 19:17:48 EDT