我正在学习 Apache Cayenne,所以我是新手。
我正在关注官方指南http://cayenne.apache.org/docs/3.0/tutorial.html。
我所做的与指南所说的完全相同,但是当我保存项目时,它会生成 2 个 xml 文件,而不是 3 个,并且当我运行 java 应用程序(使用生成的类)时会出现以下错误:
Exception in thread "main" org.apache.cayenne.ConfigurationException: [v.3.0RC2 Feb 03 2010 13:38:54] Error during Configuration initialization. [v.3.0RC2 Feb 03 2010 13:38:54] [org.apache.cayenne.conf.DefaultConfiguration] : Domain configuration file "cayenne.xml" is not found.
at org.apache.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:168)
at org.apache.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:141)
at org.apache.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:121)
at org.apache.cayenne.conf.Configuration.getSharedConfiguration(Configuration.java:91)
at org.apache.cayenne.access.DataContext.createDataContext(DataContext.java:143)
at org.example.cayenne.Main.main(Main.java:21)
Caused by: org.apache.cayenne.ConfigurationException: [v.3.0RC2 Feb 03 2010 13:38:54] [org.apache.cayenne.conf.DefaultConfiguration] : Domain configuration file "cayenne.xml" is not found.
at org.apache.cayenne.conf.DefaultConfiguration.initialize(DefaultConfiguration.java:141)
at org.apache.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:159)
... 5 more
我不知道发生了什么