cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evgeny Ryabitskiy <evgeny.ryabits...@gmail.com>
Subject Re: cayenne.xml not found
Date Sun, 25 Jul 2010 16:34:57 GMT
Hello!

First of all I would recommended you using official release 3.0
instead of release candidate.

Exception tells that your cayenne.xml still not in classpath. Mostly
it's Eclipse/Maven problem.

Have you install Maven 2 Eclipse integration plug-in? Have you run
"mvn install" before Main?

Hints:
Check your target if it contains cayenne.xml.
Check your Eclipse project settings that build output is configured on
target/...


Evgeny.


2010/7/25 masjab <mjabban@jastech-solutions.com>:
>
> Hey all,
>
> I am trying to complete the "getting started" tutorial but I can´t.
> Everything was easy but when I run the Main.java I get the following error:
>
> Exception in thread "main" org.apache.cayenne.ConfigurationException:
> [v.3.0RC2 Feb 03 2010 13:38:54] Error during Configuration initialization.
> [v.3.0RC2 Feb 03 2010 13:38:54]
> [org.apache.cayenne.conf.DefaultConfiguration] : Domain configuration file
> "cayenne.xml" is not found.
>        at
> org.apache.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:168)
>        at
> org.apache.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:141)
>        at
> org.apache.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:121)
>        at
> org.apache.cayenne.conf.Configuration.getSharedConfiguration(Configuration.java:91)
>        at
> org.apache.cayenne.access.DataContext.createDataContext(DataContext.java:143)
>        at org.example.cayenne.Main.main(Main.java:12)
> Caused by: org.apache.cayenne.ConfigurationException: [v.3.0RC2 Feb 03 2010
> 13:38:54] [org.apache.cayenne.conf.DefaultConfiguration] : Domain
> configuration file "cayenne.xml" is not found.
>        at
> org.apache.cayenne.conf.DefaultConfiguration.initialize(DefaultConfiguration.java:141)
>        at
> org.apache.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:159)
>        ... 5 more
>
>
> I did search and I saw that I am not the only one...
> But after readying still don´t know what to do.
>
>
> In Eclipse the cayenne.xml is in src/main/resources
> My pom.xml looks like this:
>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
>  <modelVersion>4.0.0</modelVersion>
>  <groupId>org.example.cayenne</groupId>
>  <artifactId>tutorial</artifactId>
>  <version>0.0.1-SNAPSHOT</version>
>
>  <dependencies>
>                <dependency>
>                        <groupId>org.apache.cayenne</groupId>
>                        <artifactId>cayenne-server</artifactId>
>   <!-- Here specify the version of Cayenne you are actually using -->
>                        <version>3.0RC2</version>
>                </dependency>
>
>                <dependency>
>                        <groupId>mysql</groupId>
>                        <artifactId>mysql-connector-java</artifactId>
>                        <version>5.1.13</version>
>                </dependency>
>        </dependencies>
> </project>
>
>
> The tables are created in my database, no prob...
>
> THX 2 ALL Your HELP
>
>
>
> --
> View this message in context: http://cayenne.195.n3.nabble.com/cayenne-xml-not-found-tp993821p993821.html
> Sent from the Cayenne - User mailing list archive at Nabble.com.
>

Mime
View raw message