You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by DOMINGUEZ Felipe <Fe...@eurocontrol.int> on 2006/10/12 11:41:49 UTC

problems when running cayenne objects under ant tasks

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 message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.

Any views expressed in this message are those of the sender.


Re: problems when running cayenne objects under ant tasks

Posted by Andrus Adamchik <an...@objectstyle.org>.
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