Re: problems when running cayenne objects under ant tasks

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Oct 12 2006 - 10:52:35 EDT

  • Next message: Kevin Menard: "Re: [ANN] Cayenne 2.0.1 released"

    Actually FileConfiguration is a great solution now, just like it was
    before.

    Andrus

    On Oct 12, 2006, at 5:41 AM, DOMINGUEZ Felipe wrote:

    > Hello,
    >
    >
    >
    > I have problems when running cayenne objects under ant tasks.
    >
    >
    >
    > I have created some ant task that use cayenne to access the DB, but
    > when
    > running they cannot find the cayenne.xml file.
    >
    >
    >
    >
    >
    > This file is under the classes directory and the 'classes'
    > directory is
    > added to the task classpath (all other classes in the 'classes'
    > directory are fund)
    >
    >
    >
    >
    >
    > The path definitios:
    >
    >
    >
    > <path id="project.classpath">
    >
    > <pathelement path="${classes}/"/>
    >
    > <fileset dir="${lib}">
    >
    > <include name="**/*.jar"/>
    >
    > </path>
    >
    >
    >
    >
    >
    > the task thefinitio:
    >
    >
    >
    > <taskdef name="taskNamem" classname="com.mypack.myclassTask"
    > classpathref="project.classpath" />
    >
    >
    >
    >
    >
    >
    >
    > the error :
    >
    > ======================================================================
    > ==
    > =======
    >
    > BUILD FAILED
    >
    > C:\PACS\tujamonencasa\web\WEB-INF\dataload\build.xml:34:
    > org.apache.cayenne.ConfigurationException: [v.2.0.1-incubating
    > October 1
    > 2006] Error during Configuration initialization. [v.2.0.1-incubating
    > October 1 2006] [org.apache.cayenne.conf.DefaultConfiguration] :
    > Domain
    > configuration file "cayenne.xml" is not found.
    >
    >
    >
    > Total time: 1 second
    >
    >
    >
    >
    >
    >
    >
    > Some other people had the same problem before, and the suggested
    > solutions were :
    >
    >
    >
    > o To add the directory of cayenne.xml file in the $CLASSPATH
    >
    > o To create a FileConfiguration with a File object passed
    > for ant
    >
    >
    >
    >
    >
    > http://www.objectstyle.org/cayenne/lists/cayenne-user/
    > 2004/12/0125.html
    >
    > http://www.objectstyle.org/cayenne/lists/cayenne-user/
    > 2004/12/0127.html
    >
    >
    >
    > but this was a year and half ago.
    >
    >
    >
    >
    > I am wondering if there is a better way to do it today.
    >
    >
    >
    > Thanks for your support.
    >
    >
    >
    > Cheers
    >
    >
    >
    > Felipe



    This archive was generated by hypermail 2.0.0 : Thu Oct 12 2006 - 10:53:00 EDT