我在启动tomEE服务器时遇到异常,我正在使用的hibernate和openejb版本分别是5.2和7.0.1。
在persistence.xml
中,我已经提供了所需类的所有条目。在War文件中,我可以看到相应的类,我们正在获取类未找到异常。我可以在以下链接中看到一些相关问题,您是否看到我正在使用的版本存在任何版本兼容性问题。
integration test with openejb container and hibernate fails
SEVERE: Unable to deploy collapsed ear in war StandardEngine[Catalina].StandardHost[localhost].StandardContext[/adminmgmt-web] org.apache.openejb.OpenEJBException: Creating application failed: C:\servers\tomee\enterprise-server-dozer-2.0.0-20161003.201205-21\webapps[\adminmgmt-web: org.apache.openejb.OpenEJBRuntimeException: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [com.admin.transportation.core.model.TaskInstance]: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [com.admin.transportation.core.model.TaskInstance]
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1039)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1257)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1115)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5076)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1405)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1395)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
caused by: org.apache.openejb.OpenEJBException: org.apache.openejb.OpenEJBRuntimeException: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [com.admin.transportation.core.model.TaskInstance]: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [com.admin.transportation.core.model.TaskInstance]
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:870)
... 13 more
答案 0 :(得分:0)
该链接看起来像另一个问题,你可以共享你的设置(WEB-INF / lib中的哪些库,其中是persistence.xml,它的内容是什么),也许是一个示例原因我有一些应用程序使用5.2.3冬眠的第五部分。
另请注意,对于tomee快照(如果您想尝试),您需要设置
<property name="tomee.jpa.factory.lazy" value="true"/>
在你的persistence.xml中导致hibernate生命周期