This content has been marked as final.
Show 1 reply
-
1. Re: Cannot use persistence unit from different jar
jaikiran Mar 14, 2009 2:40 AM (in response to tony_green)"tony_green" wrote:
If I try to intialize an EntityManager with @PersistenceContext(unitName="gsw-app-0.0.1.ear/gsw-data-0.0.1.jar#gsw-db") from a servlet in my WAR, I get an exception: java.lang.IllegalArgumentException: Can't find a deployment unit named gsw-app-0.0.1.ear
Try:@PersistenceContext(unitName="gsw-data-0.0.1.jar#gsw-db")
I don't have my setup in front of me right now - so i can't say whether this is the right approach or whether this is going to work.