I am trying to do a join on 2 entities AttrEntity and DescEntity. The problem is that the AttrEntity and DescEntity are in different jar files so when I execute the query I get an exception saying that the entity DescEntity was not found. Is there anyway I can execute this query while not modifying my jar files?
Are both of your entities participating in the same persistence unit?
If this persistence unit is defined in one jar, did you import the other with a <jar-file> element in the persistence.xml ?
If you activate logging during the persistence unit creation, do you see the two entities in the list of mapped classes? (I know EclipseLink and Hibernate log this kind of information)
If you define your query as a named query with @NamedQuery, is it accepted by the persistence provider?
posted 9 years ago
I used the <jar-file> tag in the second jar file. That made it work.