1

@Tests我在 eclipse 中运行 play 框架,当我在 Junit 中运行一些错误消息时似乎收到了一些错误消息。我得到的错误是

[error] c.a.e.s.d.BeanDescriptorManager - Error in deployment
javax.persistence.PersistenceException: Error with [models.PurchaseRequest] 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[models.PurchaseRequest]
    at com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.setEntityBeanClass(BeanDescriptorManager.java:1462) ~[avaje-ebeanorm-server.jar:na]
    at com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.createByteCode(BeanDescriptorManager.java:1138) ~[avaje-ebeanorm-server.jar:na]
    at com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.readDeployAssociations(BeanDescriptorManager.java:1058) ~[avaje-ebeanorm-server.jar:na]
    at com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.readEntityDeploymentAssociations(BeanDescriptorManager.java:565) ~[avaje-ebeanorm-server.jar:na]
    at com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager.deploy(BeanDescriptorManager.java:252) ~[avaje-ebeanorm-server.jar:na]
    at com.avaje.ebeaninternal.server.core.InternalConfiguration.<init>(InternalConfiguration.java:124) [avaje-ebeanorm-server.jar:na]

如果我ebean.default="models.*"application.conf错误消息中删除更改,那么我认为这可能是问题的根源。

4

1 回答 1

0

Play 期望您使用字节码增强(例如,AspectJ)将 JPA 注释连接到您的持久性提供程序(并且已经在您继承的超类上运行了增强),但您没有在您的建造。您需要确保使用适当的 Eclipse facet 和/或 Maven 插件运行增强步骤。

于 2013-08-21T01:47:34.877 回答