Thanks for the test case. I think Cayenne got confused by the name "aCasa.test.xml". It usually expects "cayenne-xyz.xml" pattern for the file name, from which it extracts the project name. I just jira'd this to ensure we pick some default name when we can't get it from the project file:
https://issues.apache.org/jira/browse/CAY-2265 Andrus > On Mar 11, 2017, at 12:27 PM, Alexander Frei <lex.f...@gmail.com> wrote: > > Hi Andrus, > > this is the jUnit test case (TestUnitGroupList.class): > > @Test > public void test() { > > ServerRuntime cayenneRuntime = ServerRuntime.builder() > .addConfig("aCasa.test.xml") > .build(); > ObjectContext context = cayenneRuntime.newContext(); > cayenneRuntime.shutdown(); > } > > If I pass a non empty String as argument to builder() then everything works > as expected. > > And this is the stack trace without passing a string argument: > > java.lang.IllegalArgumentException: DataRowStore name can't be null. > at org.apache.cayenne.access.DataRowStore.<init>(DataRowStore.java:101) > at > org.apache.cayenne.access.DataDomain.nonNullSharedSnapshotCache(DataDomain.java:328) > at > org.apache.cayenne.access.DataDomain.getSharedSnapshotCache(DataDomain.java:316) > at > org.apache.cayenne.configuration.server.DataContextFactory.createdFromDataDomain(DataContextFactory.java:116) > at > org.apache.cayenne.configuration.server.DataContextFactory.createContext(DataContextFactory.java:61) > at > org.apache.cayenne.configuration.CayenneRuntime.newContext(CayenneRuntime.java:124) > at cayenne.TestUnitGroupList.test(TestUnitGroupList.java:48) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) > at > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) > at > org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) > at org.junit.runners.ParentRunner.run(ParentRunner.java:363) > at > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) > at > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) > > I'm working on Eclipse Version: Neon.2 Release (4.6.2) > > Thanks > Alex > > > > 2017-03-10 20:31 GMT+01:00 Andrus Adamchik <and...@objectstyle.org>: > Hi Alex, > > (cc'ying to your email, as it doesn't appear that you are subscribed to the > list). > > > Apache Cayenne is getting better and better, thank you. > > Thanks! :) > > > Tried the new version today and just wanted to point out that > > ServerRuntime.builder() doesn't work without an argument for the symbolic > > name, at least not in my case. > > According to the javadoc the parameter is optional, but I can't get it > > running without passing a String. > > So the example shown in the Getting Started guide does not work. > > http://cayenne.apache.org/docs/4.0/tutorial/getting-started-part3.html > > It seems to work for me (not in the tutorial, but my regular apps). Do you > have any details (like an exception stack trace)? > > Thanks, > Andrus > > > > On Mar 10, 2017, at 10:10 PM, Alexander Frei <lex.f...@gmail.com> wrote: > > > > Hi, > > > > Apache Cayenne is getting better and better, thank you. > > > > Here is some feedback: > > Tried the new version today and just wanted to point out that > > ServerRuntime.builder() doesn't work without an argument for the symbolic > > name, at least not in my case. > > According to the javadoc the parameter is optional, but I can't get it > > running without passing a String. > > So the example shown in the Getting Started guide does not work. > > http://cayenne.apache.org/docs/4.0/tutorial/getting-started-part3.html > > > > Alex > > > >