cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Baldwin <>
Subject ServerRuntime.builder().addConfig
Date Wed, 17 Jul 2019 14:25:36 GMT
My goal is to provide an unambiguous (deterministic) path to my project xml file to ServerRuntime
during automated testing (the plan is to have multiple stages of testing).   

My understanding  is that 4.0.1 uses:
to accomplish this normally.

1. While trying to understand the behavior of .addConfig(), I have had to rely primarily on
experiments (i.e. hacking), since I have found no documentation in JavaDocs (addConfig() JavaDoc
has no comments). 

2. So it appears from my experiments that addConfig() assumes CLASSPATH referencing and will
not accept an explicit path.
org.apache.cayenne.configuration.server.DataDomainLoadException: [v.4.0.1 Dec 20 2018 11:02:32]
Configuration resource "/webdev/cms/src/main/resources/config/cayenne/cayenne-CMSDomain.xml"
is not found.
If I understand the behavior, addConfig() *only* allows project-file-path specification relative
to one of the paths already specified in the CLASSPATH, and will not accept a full path entry.

3. To further complicate this, during testing, cayenne is complaining that multiple project
files are found in the classpath (gradle, by default, appears to create a complex classpath
that include multiple resource directories that contain the two project files).

Currently, I have the test-resources earlier in the classpath (cayenne runtime appears to
select based on classpath positioning).  I would prefer a more explicit solution.

1. With not much info in the JavaDocs on usage-options, does anyone have an online reference
that could provide more insight (i.e. alternatives, use-case examples, etc)?

2. Does anyone know of a simpler way to accomplish my goal (i.e. deterministically or explicitly
provide the project file to cayenne runtime)?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message