OK, lets start over. You say below: >>> Yes, XML files can be placed in subdirectories of any CLASSPATH directory. >>> So if you have the project file under >>> "WEB-INF/classes/org/example/cayenne-myproject.xml" , your location would >>> be "org/example/cayenne-myproject.xml".
And I am reporting that this only works if the config files are in the "WEB-INF/classes" directory. If I put them in a directory, say "WEB-INF/classes/cayenne-config” it fails. My understanding from your comment is that it is possible to put them in this directory. If so, then how is this done per Cayenne rules. I would prefer an example. If it is not possible to do so then please let me know. > On Jul 6, 2015, at 11:14 AM, Andrus Adamchik <and...@objectstyle.org> wrote: > > Try debugging your app, putting a breakpoint in > ClassLoaderResourceLocator.findResources(..) method. This may give you an > idea. > > Andrus > > >> On Jul 5, 2015, at 9:11 PM, Joe Baldwin <jfbald...@earthlink.net> wrote: >> >> OK, so the question is “how”. >> >> (I spent about 45min hacking different combinations and none worked. All I >> could get working is depositing all the config files in the top level >> WEB-INF/classes dir. I am sure I am missing something but the previous two >> solutions stopped working with 4.0) >> >> >> >>> On Jul 5, 2015, at 8:56 PM, Andrus Adamchik <and...@objectstyle.org> wrote: >>> >>> >>>> On Jul 5, 2015, at 8:51 PM, Joe Baldwin <jfbald...@earthlink.net> wrote: >>>> >>>>> >>>>> "configuration-location" init parameter.” >>>> >>>> >>>> This was mentioned in the docs. Is this not good practice? >>>> >>>> I would *prefer* to put them in a separate directory under “classes”. Is >>>> there a better way to do this - in your experience? >>> >>> Yes, XML files can be placed in subdirectories of any CLASSPATH directory. >>> So if you have the project file under >>> "WEB-INF/classes/org/example/cayenne-myproject.xml" , your location would >>> be "org/example/cayenne-myproject.xml". This is a standard way of locating >>> any kind of resources in Java via ClassLoader. >>> >>> Andrus >> >> >