My Play version 2.3.8 the full exception is:
javax.persistence.
PersistenceException: Error with [entity.manager.HitInfo] It has not been enhanced but it's superClass [class play.db.ebean.Model] is? (You are not allowed to mix enhancement in a single inheritance hierarchy) marker[play.db.ebean.Model] className[entity.manager.
HitInfo]
at com.avaje.ebeaninternal.
server.deploy.
BeanDescriptorManager.
setEntityBeanClass(
BeanDescriptorManager.java:
1425)
at com.avaje.ebeaninternal.
server.deploy.
BeanDescriptorManager.
createByteCode(
BeanDescriptorManager.java:
1130)
at com.avaje.ebeaninternal.
server.deploy.
BeanDescriptorManager.
readDeployAssociations(
BeanDescriptorManager.java:
1050)
at com.avaje.ebeaninternal.
server.deploy.
BeanDescriptorManager.
readEntityDeploymentAssociatio
ns(BeanDescriptorManager.java:
527)
at com.avaje.ebeaninternal.
server.deploy.
BeanDescriptorManager.deploy(
BeanDescriptorManager.java:
235)
at com.avaje.ebeaninternal.
server.core.
InternalConfiguration.<init>(
InternalConfiguration.java:
114)
at com.avaje.ebeaninternal.
server.core.
DefaultServerFactory.
createServer(
DefaultServerFactory.java:204)
at com.avaje.ebeaninternal.
server.core.
DefaultServerFactory.
createServer(
DefaultServerFactory.java:65)
at com.avaje.ebean.
EbeanServerFactory.create(
EbeanServerFactory.java:58)
at play.db.ebean.EbeanPlugin.
onStart(EbeanPlugin.java:89)
at play.api.Play$$anonfun$start$
1$$anonfun$apply$mcV$sp$1.
apply(Play.scala:91)
at play.api.Play$$anonfun$start$
1$$anonfun$apply$mcV$sp$1.
apply(Play.scala:91)
at scala.collection.immutable.
List.foreach(List.scala:381)
at play.api.Play$$anonfun$start$
1.apply$mcV$sp(Play.scala:91)
at play.api.Play$$anonfun$start$
1.apply(Play.scala:91)
at play.api.Play$$anonfun$start$
1.apply(Play.scala:91)
at play.utils.Threads$.
withContextClassLoader(
Threads.scala:21)
at play.api.Play$.start(Play.
scala:90)
at play.core.StaticApplication.<
init>(ApplicationProvider.
scala:55)
at play.core.server.NettyServer$.
createServer(NettyServer.
scala:253)
at play.core.server.NettyServer$$
anonfun$main$3.apply(
NettyServer.scala:289)
at play.core.server.NettyServer$$
anonfun$main$3.apply(
NettyServer.scala:284)
at scala.Option.map(Option.scala:
146)
at play.core.server.NettyServer$.
main(NettyServer.scala:284)
at play.core.server.NettyServer.
main(NettyServer.scala)
==============================
==============================
I have started getting these errors but only when I do a stage.
If I start play in console mode its fine.
The error I get is random sometimes its one class sometime its another.
in my project use about ten DataSource,
when i remove @Entity @Table on class in Prod Mode is right.
but i can not use Ebean API
以上是我提交在Play Framework 官方论坛的帖子
https://groups.google.com/forum/#!topic/play-framework/7cSOTeUt-8s
还没有收到回复
我项目中链接了十多个数据源,之前功能一直是正常的,从新部署项目时突然就出现异常了
说明下,项目在本地运行一直正常,打包后发布运行时会报错,然后项目启动不起来。
而且只是其中的一个数据源报这个错,去掉Model层上的@Entity @Table 项目就可以正常启动
因为项目中只有其中几个数据源使用Ebean的方法调用,其余数据源都是通过Ebean来获取sql接口来执行sql语句
后来把项目中不需要用到Ebean API中方法的 Model 都去掉注解,不继承Model类,然后项目就正常了
官方也查了好多资料,有出现相同问题的,但是没有标准的解决方案。
会一直关注和更新!