Re: Newbie - No DataMap found

From: Pierre Gilquin (pgilqui..luewin.ch)
Date: Mon Jan 09 2006 - 10:05:46 EST

  • Next message: Andrus Adamchik: "Re: Newbie - No DataMap found"

    Thank you, I add the package name in className and everything works.
    I did something wrong or import from EOModel doesnot take into account
    package name in the mapping ?

    Pierre

    ----- Original Message -----
    From: "Andrus Adamchik" <andru..bjectstyle.org>
    To: <cayenne-use..bjectstyle.org>
    Sent: Monday, January 09, 2006 2:19 PM
    Subject: Re: Newbie - No DataMap found

    > This Exception means that "root" query class - resto.Rubrique - is not
    > mapped to any entity. Can you doublecheck that a corresponding ObjEntity
    > in your mapping has a "Java Class" spelled correctly (including the
    > package name).
    >
    > BTW, you only need cayenne.jar in the CLASSPATH. Other Cayenne jars are
    > not needed.
    >
    > Andrus
    >
    >
    >
    > On Jan 9, 2006, at 4:02 AM, Pierre Gilquin wrote:
    >> Hello all,
    >>
    >> I am a newbie with Cayenne but I have experience with EOF. I am trying
    >> a make a test with a working eomodel from EOF. It was very quick to
    >> import the eomodel et generate classes with Cayenne Modeler.
    >> Then I write a main classe to test a simple query.
    >>
    >> At run time, I get the following "No DataMap found" exception and I dont
    >> have any clue.
    >> In my project directory and in my classpath, I have 3 xml : cayenne.xml,
    >> node and map and every cayenne jar is added in the classpath.
    >>
    >>
    >> Thanks in advance for your help
    >>
    >>
    >> Pierre Gilquin
    >>
    >>
    >> C:\JBuilder9\jdk1.4\bin\javaw -classpath "D:\cayenne-1.2M10\projs;D:
    >> \cayenne-1.2M10\lib\cayenne.jar;D:\cayenne-1.2M10\lib\cayenne-
    >> client-nodeps.jar;D:\cayenne-1.2M10\lib\cayenne-nodeps.jar;D:
    >> \cayenne-1.2M10\lib\dvmodeler\cayenne-dvmodeler.jar;D:
    >> \cayenne-1.2M10\lib\dvmodeler\forms-1.0.3.jar;D:\cayenne-1.2M10\lib
    >> \dvmodeler\jdom-1.0.jar;D:\cayenne-1.2M10\lib\dvmodeler
    >> \looks-1.3.1.jar;D:\cayenne-1.2M10\lib\modeler;C:\JBuilder9\jdk1.4
    >> \jre\lib\ext\mysql-connector-java-3.0.17-ga-bin.jar;C:\JBuilder9
    >> \jdk1.4\jre\lib\rt.jar;C:\JBuilder9\jdk1.4\jre\lib\i18n.jar;C:
    >> \JBuilder9\jdk1.4\jre\lib\sunrsasign.jar;C:\JBuilder9\jdk1.4\jre\lib
    >> \jsse.jar;C:\JBuilder9\jdk1.4\jre\lib\jce.jar;C:\JBuilder9\jdk1.4
    >> \jre\lib\charsets.jar;C:\JBuilder9\jdk1.4\jre\classes;C:\JBuilder9
    >> \jdk1.4\lib\tools.jar" resto.Main
    >> INFO QueryLogger: Created connection pool: jdbc:mysql://localhost/
    >> resto?
    >> capitalizeTypeNames=true&useUnicode=true&characterEncoding=ISO-8859-1&
    >> autoReconnect=true&maxReconnects=3
    >> Driver class: org.gjt.mm.mysql.Driver
    >> Min. connections in the pool: 1
    >> Max. connections in the pool: 1
    >> org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2M10 January 5
    >> 2006] No DataMap found, can't route query
    >> org.objectstyle.cayenne.query.SelectQuer..5b0afd[root=class
    >> resto.Rubrique,name=<null>]
    >> at org.objectstyle.cayenne.query.SelectQuery.route
    >> (SelectQuery.java:197)
    >>
    >



    This archive was generated by hypermail 2.0.0 : Mon Jan 09 2006 - 10:05:47 EST