Re: cayenne.xml not found

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Mar 27 2006 - 01:09:11 EST

  • Next message: Andrus Adamchik: "Re: DataContext scope in web apps"

    You need to follow one of the deployment strategies for web
    applications for this to work. E.g.:

    http://objectstyle.org/cayenne/userguide/deploy/
    webapplicationcontextprovider.html

    Specifically you don't mention how you configure web.xml. In the
    example above you'll need the following piece:

    <listener>
        <listener-
    class>org.objectstyle.cayenne.conf.WebApplicationContextProvider</
    listener-class>
    </listener>

    Alternatively you can put Cayenne XML files in WEB-INF/classes/ and
    avoid configuration above, but this way you'll also loose all the
    benefits of auto-configuration, such as automatic creation of the
    context for the session and binding session context to each request
    thread.

    Andrus

    On Mar 26, 2006, at 10:49 PM, GbT wrote:

    > Hi to all,
    > I am a newbie with cayenne, coming from the webobjects world... I have
    > a problem in my tapestry app, I put all the cayenne.xml datamap.xml
    > and datanode.xml files in the WEB-INF directory, I tried also in the
    > other suggested locations... but when I call
    > DataContext.createDataContext() I get this error:
    >
    > [v.1.1.4 January 5 2006] Error during Configuration initialization.
    > [v.1.1.4 January 5 2006]
    > [org.objectstyle.cayenne.conf.DefaultConfiguration] : Domain
    > configuration file "cayenne.xml" is not found.
    >
    > I have a context declared in the tomcat context directory, without
    > cayenne it's working... but now when I call cayenne it gives me that
    > error... what could be the problem?
    >
    > Thanks
    >



    This archive was generated by hypermail 2.0.0 : Mon Mar 27 2006 - 01:09:37 EST