Static weaving of entities spread over multiple jars fails with EclipseLink

I have several entities spread in multiple jars. An entity located in jar X contains a collection of entities from jar Y. When I try to do static weaving on jar X I get the following error: > Exception Description: [class MyEntity] uses a non-entity [class MyOtherEntity] as target entity in the relationship attribute [method getMyOtherEntities]. The error is related to the following stack: > at org.eclipse.persistence.exceptions.ValidationException.nonEntityTargetInRelationship(ValidationException.java:1360) at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.getReferenceDescriptor(RelationshipAccessor.java:538) at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processJoinTable(RelationshipAccessor.java:692) at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ManyToManyAccessor.process(ManyToManyAccessor.java:160) at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processOwningRelationshipAccessors(MetadataProject.java:1489) at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage3(MetadataProject.java:1726) at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:535) at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:550) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1469) Both entities are annotated with @Entity and worked fine with Hibernate. Both classes are in the classpath and I've checked in the debugger that MyOtherEntity is found and annotated as expected. Is it possible to use static weaving while the entities are spread in multiple jars?

以上就是Static weaving of entities spread over multiple jars fails with EclipseLink的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏