我正在尝试将 JPA 添加到一个简单的 wildfly-swarm Rest API 中。我绕着圈子跑来跑去试图遵循 github 页面的 JPA 示例,但没有运气 [ https://github.com/wildfly-swarm/wildfly-swarm-examples/tree/master/jpa 我的应用程序有点像“你好world” REST API 作为 wildfly-swarm 的新手:我可以在像我这样的“hello world”项目中获得有关如何设置持久性的分步说明吗?这是回购https://github.com/desiby/swarm-rest
在添加 JPA 和 H2 作为依赖项并将“人”对象转换为持久性实体之后,这是我得到的错误(添加休眠依赖项后出现相同的错误:
2017-08-26 01:39:38,386 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("parallel-extension-add") failed - address: ([]): java.lang.RuntimeException: WFLYCTL0079: Failed initializing module org.jboss.as.jpa at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:115) at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:890) at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:659) at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:370) at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1322) at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:468) at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:387) at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:349) at org.jboss.as.server.ServerService.boot(ServerService.java:397) at org.jboss.as.server.ServerService.boot(ServerService.java:366) at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:299) at java.lang.Thread.run(Thread.java:745)
引起:java.util.concurrent.ExecutionException:java.lang.RuntimeException:org.jboss.modules.ModuleLoadException:从modules/org/hibernate/main/module.xml加载模块时出错