Re: Using Cayenne without Maven
Michael Gentry <[email protected]> Thu, 21 Jul 2022 17:15:51 -0400
| Newsgroups | gmane.comp.java.cayenne.user |
|---|---|
| Message-ID | <CAOy5kzPOPkthLq9FH4mF9X8HpCz04V26CNVCyiJbcS+yyU6PjA@mail.gmail.com> |
Hi Ali, What tooling are you using? Cayenne should be looking for that file at the root/top of one of the classpaths. Maven will package src/main/resource up and make it available at the root, but you can specify other classpath values yourself. Like if you are using a barebones java command, try adding a -cp entry, etc. On Thu, Jul 21, 2022 at 5:04 PM Ali Baharev <[email protected]> wrote: > Hi, > > I am trying to integrate Cayenne into a project that must not use > Maven. The application – not too surprisingly – crashes on this line: > > ServerRuntime cayenneRuntime = ServerRuntime.builder() > .addConfig("cayenne-project.xml") > .build(); > > Exception in thread "main" > org.apache.cayenne.configuration.server.DataDomainLoadException: > [v.4.1.1 Dec 20 2021 16:33:19] Configuration resource > "cayenne-project.xml" is not found. > > It looks like Cayenne is assuming the Maven project folder structure, > which of course is not there, since I am not using Maven. > > I tried the full absolute path, but that did not work either, I get > the same Exception. > > Where exactly is Cayenne looking for the configuration file? > > How can I specify the location of the configuration file? > > Are there more stumbling blocks if I must not use Maven? > > Thank you in advance! > > Ali >