You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by raggeler <r....@gmx.net> on 2006/07/30 18:37:37 UTC

org.objectstyle.cayenne.ConfigurationException

Hi All

I followed the tutorial here:

http://cwiki.apache.org/CAYDOC/tutorial-object-relational-mapping.html

Now when trying to create a DataContext, I get

Exception in thread "main" 
org.objectstyle.cayenne.ConfigurationException: [v.1.2RC1 May 31 2006] 
Error during Configuration initialization. [v.1.2RC1 May 31 2006] 
[org.objectstyle.cayenne.conf.DefaultConfiguration] : Domain 
configuration file "cayenne.xml" is not found.
    at 
org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:321)
    at 
org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:294)
    at 
org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:275)
    at 
org.objectstyle.cayenne.conf.Configuration.getSharedConfiguration(Configuration.java:212)
    at 
org.objectstyle.cayenne.access.DataContext.createDataContext(DataContext.java:242)
    at dbHandling.Main.main(Main.java:10)
Caused by: org.objectstyle.cayenne.ConfigurationException: [v.1.2RC1 May 
31 2006] [org.objectstyle.cayenne.conf.DefaultConfiguration] : Domain 
configuration file "cayenne.xml" is not found.
    at 
org.objectstyle.cayenne.conf.DefaultConfiguration.initialize(DefaultConfiguration.java:186)
    at 
org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:312)
    ... 5 more


Unfortunately I don't find anything useful with Google, and I'm pretty 
sure that I followed the tutorial correctly.

maybe anyone here has an idea?

Bye

Rafael

Re: org.objectstyle.cayenne.ConfigurationException

Posted by raggeler <r....@gmx.net>.
Many thanks, Andrus. I already tried several directories to put in the 
xml files, but I didn't refresh in Eclispe :/

Rafael

Andrus Adamchik wrote:
> Hi Rafael,
>
> Essentially the error means that Java runtime can't find cayenne.xml 
> anywhere in classpath. The catch is to put cayenne.xml and other XML 
> files in the root of an Eclipse *source* folder as shown on the 
> picture at the bottom of this page:
>
> http://cwiki.apache.org/CAYDOC/tutorial-generate-database-and-java-classes.html 
>
>
> And subsequently do "refresh" in Eclipse when you change those files.
>
> Hope this helps.
> Andrus
>
> On Jul 30, 2006, at 12:37 PM, raggeler wrote:
>
>> Hi All
>>
>> I followed the tutorial here:
>>
>> http://cwiki.apache.org/CAYDOC/tutorial-object-relational-mapping.html
>>
>> Now when trying to create a DataContext, I get
>>
>> Exception in thread "main" 
>> org.objectstyle.cayenne.ConfigurationException: [v.1.2RC1 May 31 
>> 2006] Error during Configuration initialization. [v.1.2RC1 May 31 
>> 2006] [org.objectstyle.cayenne.conf.DefaultConfiguration] : Domain 
>> configuration file "cayenne.xml" is not found.
>>    at 
>> org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:321) 
>>
>>    at 
>> org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:294) 
>>
>>    at 
>> org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:275) 
>>
>>    at 
>> org.objectstyle.cayenne.conf.Configuration.getSharedConfiguration(Configuration.java:212) 
>>
>>    at 
>> org.objectstyle.cayenne.access.DataContext.createDataContext(DataContext.java:242) 
>>
>>    at dbHandling.Main.main(Main.java:10)
>> Caused by: org.objectstyle.cayenne.ConfigurationException: [v.1.2RC1 
>> May 31 2006] [org.objectstyle.cayenne.conf.DefaultConfiguration] : 
>> Domain configuration file "cayenne.xml" is not found.
>>    at 
>> org.objectstyle.cayenne.conf.DefaultConfiguration.initialize(DefaultConfiguration.java:186) 
>>
>>    at 
>> org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:312) 
>>
>>    ... 5 more
>>
>>
>> Unfortunately I don't find anything useful with Google, and I'm 
>> pretty sure that I followed the tutorial correctly.
>>
>> maybe anyone here has an idea?
>>
>> Bye
>>
>> Rafael
>>


Re: org.objectstyle.cayenne.ConfigurationException

Posted by Andrus Adamchik <an...@objectstyle.org>.
Hi Rafael,

Essentially the error means that Java runtime can't find cayenne.xml  
anywhere in classpath. The catch is to put cayenne.xml and other XML  
files in the root of an Eclipse *source* folder as shown on the  
picture at the bottom of this page:

http://cwiki.apache.org/CAYDOC/tutorial-generate-database-and-java- 
classes.html

And subsequently do "refresh" in Eclipse when you change those files.

Hope this helps.
Andrus

On Jul 30, 2006, at 12:37 PM, raggeler wrote:

> Hi All
>
> I followed the tutorial here:
>
> http://cwiki.apache.org/CAYDOC/tutorial-object-relational-mapping.html
>
> Now when trying to create a DataContext, I get
>
> Exception in thread "main"  
> org.objectstyle.cayenne.ConfigurationException: [v.1.2RC1 May 31  
> 2006] Error during Configuration initialization. [v.1.2RC1 May 31  
> 2006] [org.objectstyle.cayenne.conf.DefaultConfiguration] : Domain  
> configuration file "cayenne.xml" is not found.
>    at  
> org.objectstyle.cayenne.conf.Configuration.initializeSharedConfigurati 
> on(Configuration.java:321)
>    at  
> org.objectstyle.cayenne.conf.Configuration.initializeSharedConfigurati 
> on(Configuration.java:294)
>    at  
> org.objectstyle.cayenne.conf.Configuration.initializeSharedConfigurati 
> on(Configuration.java:275)
>    at  
> org.objectstyle.cayenne.conf.Configuration.getSharedConfiguration 
> (Configuration.java:212)
>    at org.objectstyle.cayenne.access.DataContext.createDataContext 
> (DataContext.java:242)
>    at dbHandling.Main.main(Main.java:10)
> Caused by: org.objectstyle.cayenne.ConfigurationException: [v. 
> 1.2RC1 May 31 2006]  
> [org.objectstyle.cayenne.conf.DefaultConfiguration] : Domain  
> configuration file "cayenne.xml" is not found.
>    at org.objectstyle.cayenne.conf.DefaultConfiguration.initialize 
> (DefaultConfiguration.java:186)
>    at  
> org.objectstyle.cayenne.conf.Configuration.initializeSharedConfigurati 
> on(Configuration.java:312)
>    ... 5 more
>
>
> Unfortunately I don't find anything useful with Google, and I'm  
> pretty sure that I followed the tutorial correctly.
>
> maybe anyone here has an idea?
>
> Bye
>
> Rafael
>