开发者

Seam Gives Unknow Entity Exception For Entities in Jars

开发者 https://www.devze.com 2022-12-24 00:20 出处:网络
I am trying to use Seam to persist my jpa entities, when I reference an entity that is in a jar seam says unknown entity. I don\'t want to add all 开发者_高级运维classes in persistence.xml I want seam

I am trying to use Seam to persist my jpa entities, when I reference an entity that is in a jar seam says unknown entity. I don't want to add all 开发者_高级运维classes in persistence.xml I want seam to scan my jars and auto detect entities (as done by spring).

What am I missing?


It actually depends a lot on the environment of your application.

If it's Java SE (for example war packaged application deployed on tomcat), your jars are not scanned for entities that compose your persistence unit. Those classes are seen as normal java classes, entity manager doesn't care about them that much... And you have to point them manually, or switch to Java EE and ear...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号