Re: org.objectstyle.cayenne.ConfigurationException

From: raggeler (r.aggele..mx.net)
Date: Sun Jul 30 2006 - 15:20:51 EDT

  • Next message: raggeler: "Mysql InnoDB and ForeignKeys"

    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
    >>



    This archive was generated by hypermail 2.0.0 : Sun Jul 30 2006 - 15:21:16 EDT