我一直在使用Kundera API为cassandra数据库支持的Spring框架开发Web休息服务。部署在Eclipse IDE中的Wildfly运行时环境中。
我已将Ambistence.xml和其他属性文件外部化到Wildfly 10.1目录的/ standalone / configuration文件夹中。
它在Eclipse IDE运行时运行良好,但是当我在实际服务器环境(CentOS)中部署它时,它显示错误,因为找不到文件异常。当我在代码中查看它时,错误在com.impetus.kundera.configure.MetamodelConfiguration中启动。我从未使用Wildfly或任何应用程序服务器。
我使用的是Spring MVC,而不是Spring Boot,并且出于某些内部原因无法使用Spring Boot。
在Eclipse中创建服务器时,我选择了“文件系统和shell操作”控制的选项,并且未选中外部管理的服务器生命周期。
04:29:39,260 INFO [com.impetus.kundera.configure.PersistenceUnitConfiguration] (ServerService Thread Pool -- 106) Loading Metadata from persistence.xml ...
04:29:39,261 INFO [com.impetus.kundera.configure.PersistenceUnitConfiguration] (ServerService Thread Pool -- 106) Loading Metadata from persistence.xml ...
04:29:39,272 INFO [com.impetus.kundera.configure.PersistenceUnitConfiguration] (ServerService Thread Pool -- 106) Finishing persistence unit metadata configuration ...
04:29:39,278 INFO [com.impetus.kundera.configure.MetamodelConfiguration] (ServerService Thread Pool -- 106) No class to scan for persistence unit _pu. Entities will be loaded from classpath/ context-path
04:29:39,281 WARN [org.springframework.web.context.support.XmlWebApplicationContext] (ServerService Thread Pool -- 106) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in com.exivos.webclient.config.KunderaConfig: Invocation of init method failed; nested exception is com.impetus.kundera.classreading.ResourceReadingException: java.io.FileNotFoundException: /content/web-client.war/WEB-INF/classes (No such file or directory)
04:29:39,282 ERROR [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 106) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in com.exivos.webclient.config.KunderaConfig: Invocation of init method failed; nested exception is com.impetus.kundera.classreading.ResourceReadingException: java.io.FileNotFoundException: /content/web-client.war/WEB-INF/classes (No such file or directory