[2021-06-10 17:20:42] [SEVERE] [deployment] [FAIL ... gsww: Missing required persistence.xml for @PersistenceContext ref "em" to unit ""]
[2021-06-10 17:20:42] [SEVERE] [deployment] [FAIL ... gsww: Missing required persistence.xml for @PersistenceContext ref "em" to unit ""]
[2021-06-10 17:20:42] [SEVERE] [deployment] [Invalid EjbModule(name=gsww, path=E:\software\TongWeb7.0\deployment\gsww)]
[2021-06-10 17:20:42] [SEVERE] [deployment] [FAIL ... gsww: Missing required persistence.xml for @PersistenceContext ref "em" to unit ""]
[2021-06-10 17:20:42] [SEVERE] [deployment] [FAIL ... gsww: Missing required persistence.xml for @PersistenceContext ref "em" to unit ""]
[2021-06-10 17:20:42] [SEVERE] [deployment] [Invalid WebModule(name=gsww, path=E:\software\TongWeb7.0\deployment\gsww)]
[2021-06-10 17:20:42] [INFO] [deployment] [Set the 'openejb.validation.output.level' system property to VERBOSE for increased validation details.]
[2021-06-10 17:20:42] [SEVERE] [deployment] [Unable to deploy collapsed ear in war StandardEngine[TONGWEB].StandardHost[server].StandardContext[gsww]]
com.tongweb.tongejb.config.ValidationFailedException: Module failed validation. AppModule(name=gsww)
at com.tongweb.tongejb.config.ReportValidationResults.deploy(ReportValidationResults.java:88)
at com.tongweb.tongejb.config.AppInfoBuilder.build(AppInfoBuilder.java:321)
at com.tongweb.tongejb.config.ThanosAppInfoBuilder.build(ThanosAppInfoBuilder.java:61)
at com.tongweb.tongejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:1048)
at com.tongweb.tw.thanos.ThanosWebtierWebAppBuilder.startInternal(ThanosWebtierWebAppBuilder.java:1065)
at com.tongweb.tomee.catalina.WebtierWebAppBuilder.configureStart(WebtierWebAppBuilder.java:1122)
at com.tongweb.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
at com.tongweb.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
这是因为TongWeb自身的JPA影响到了应用自带的JPA。
TongWeb7的解决办法是将bin/external.vmoptions中的-DWebModuleOnly改为true即可。