Kanwar Manish | 24 May 2012 09:13
Picon

Domain configuration file "cayenne.xml" is not found.

Sorry guys, I am posting this bugger again.

But it has turned out to be a bummer for me.

I am using NetBeans 7.1.1
JDK 1.7

cayenne files are in the folder - "/WEB-INF/config/cayenne-files". Total
three files cayenne.xml, map and node files.

Error:
"[v.3.0.2 Jun 11 2011 09:26:09] Error during Configuration initialization.
[v.3.0.2 Jun 11 2011 09:26:09]
[org.apache.cayenne.conf.DefaultConfiguration] : Domain configuration file
"cayenne.xml" is not found."

My XML File section for cayenne:
"
    <filter>
        <filter-name>CayenneFilter</filter-name>

<filter-class>org.apache.cayenne.conf.WebApplicationContextFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>CayenneFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <context-param>
        <param-name>cayenne.configuration.path</param-name>
        <param-value>/WEB-INF/config/cayenne-files</param-value>
(Continue reading)

Michael Gentry | 24 May 2012 14:54
Favicon

Re: Domain configuration file "cayenne.xml" is not found.

Hi there,

I'm not a servlet guru (I know enough to get by and have my Tapestry
apps run), but I always put my <context-param> section before <filter>
and <filter-mapping>.  May not make a difference, but worth trying.  I
haven't looked through the source extensively, but you seem to be on
the right path from what the JavaDocs say.

mrg

On Thu, May 24, 2012 at 3:13 AM, Kanwar Manish <kanwarmanish <at> gmail.com> wrote:
> Sorry guys, I am posting this bugger again.
>
> But it has turned out to be a bummer for me.
>
> I am using NetBeans 7.1.1
> JDK 1.7
>
> cayenne files are in the folder - "/WEB-INF/config/cayenne-files". Total
> three files cayenne.xml, map and node files.
>
> Error:
> "[v.3.0.2 Jun 11 2011 09:26:09] Error during Configuration initialization.
> [v.3.0.2 Jun 11 2011 09:26:09]
> [org.apache.cayenne.conf.DefaultConfiguration] : Domain configuration file
> "cayenne.xml" is not found."
>
> My XML File section for cayenne:
> "
>    <filter>
(Continue reading)

Mike Kienenberger | 24 May 2012 17:33
Picon

Re: Domain configuration file "cayenne.xml" is not found.

Yes, dependent on your servlet version, context-param definitely has
to be the first section in the file.

Also, make sure that you're including the files in your war/ear.
Obvious, but sometimes still the cause :)

On Thu, May 24, 2012 at 8:54 AM, Michael Gentry <mgentry <at> masslight.net> wrote:
> Hi there,
>
> I'm not a servlet guru (I know enough to get by and have my Tapestry
> apps run), but I always put my <context-param> section before <filter>
> and <filter-mapping>.  May not make a difference, but worth trying.  I
> haven't looked through the source extensively, but you seem to be on
> the right path from what the JavaDocs say.
>
> mrg
>
>
> On Thu, May 24, 2012 at 3:13 AM, Kanwar Manish <kanwarmanish <at> gmail.com> wrote:
>> Sorry guys, I am posting this bugger again.
>>
>> But it has turned out to be a bummer for me.
>>
>> I am using NetBeans 7.1.1
>> JDK 1.7
>>
>> cayenne files are in the folder - "/WEB-INF/config/cayenne-files". Total
>> three files cayenne.xml, map and node files.
>>
>> Error:
(Continue reading)

Kanwar Manish | 25 May 2012 08:37
Picon

Re: Domain configuration file "cayenne.xml" is not found.

Worked - Possible Bug? [Not Solved - because I don't understand how it
worked. Two approaches below]

Question is - if the postgres jdbc jar is missing - why should the error be
- "....cayenne.xml not found...". Please read for details.

Thanks Guys for all the help. Please remember that I am a .NET specialist
and a Java newbie [phew - talk about being deadly ;-)]

Here is what I did - 1st approach

1. Moved to conf files to the default package.

2. Stepped through lot of errors for dependencies like Commons-Collections,
Ashwood and JDBC driver not found.

3. Used code below - and it worked.

"
        DefaultConfiguration conf = new DefaultConfiguration();
        conf.addClassPath("mypackage");
        Configuration.initializeSharedConfiguration(conf);
        DataContext context = DataContext.createDataContext();
        return context;
"

2nd Approach

To test out Michael's suggestion of keeping the '<context-param> section
before <filter> and <filter-mapping>', I moved back the config files to the
(Continue reading)


Gmane