I am having the same problem. Somehow Hibernate can't find the entitity classes in a different ejb package within the same ear package. I would really like to now how to fix this.
I found something, which I unfortunatelly don't have to time to check right now. There should be line:
... <jta-data-source>java:/UMKDS</jta-data-source> <jar-file>../data.jar</jar-file> <properties> ...
at persistence.xml, where data.jar is jar with entities. If you check it, I will appreciate if you could tell If it works.
OK, I'll check it today.
I've tried it and it should work but it doesn't :( . There is a bug that incorrectly generates the wrong path to the jar file. I hope they fix this soon.
I do however have a workaround. You can use the class property to list all the persistence classes that you want to have available in the persistence manager.
... <jta-data-source>java:/MyDS</jta-data-source> <class>yPackage.User</class> <class>yPackage.SomeOtherEntity</class> <properties> ...
It isn't really nice, but it works. I tested it.
I am developing a seam application integrated with JBPM. I am using Seam 1.0.1.GA on Jboss 4.0.4.GA with JBPM 3.1 I have a combined persistnace for JBMP and my application objects.
When I do a create query as follows:
User found =
(User) em.createQuery("from JBPM_ID_USER u where u.ID__ = :userName and u.PASSWORD_ = :password")
I get the following error:
15:08:26,080 ERROR [STDERR] javax.persistence.PersistenceException: org.hibernat
e.hql.ast.QuerySyntaxException: JBPM_ID_USER is not mapped [select NAME_ from JBPM_ID_USER]
I have copied the jbpm-identity-3.1.jar into ejb3 folder for the ear
have the following entires in the hibernate.cfg.xml
I hve tried both the ways mentioned above,but both ways failed to solve the issue.
Can anybody throw some light on this.