0

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?

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
Noura
  • 722
  • 10
  • 24
  • @Noura ok, but can you show how your Application structure looks like ? See this http://stackoverflow.com/questions/2453746/jboss-seam-enabling-debug-page/2459795#2459795 to see how you can show your app. Looks for *So your ear application should looks like this one* – Arthur Ronald Mar 25 '10 at 21:15
  • This explains my question: http://stackoverflow.com/questions/2427221/seam-equivalent-of-spring-persistenceunitpostprocessor – Noura Mar 30 '10 at 16:33

1 Answers1

0

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...

Michal
  • 21
  • 1
  • 1
  • 4
  • I am deploying a war to JBoss AS, and since I am using maven I cannot use jar-file property, have to list classes. – Noura Apr 10 '10 at 11:14