this means you have 2 persistence.xml in the classpath, just remove one otherwise your app is ambigous
Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2014-11-07 18:00 GMT+00:00 slawek <[email protected]>: > Hello, > I still work on this problem, terrible situation.... > I decide to create tests in separated eclipse project (ejb project), then I > add my main project to Properties -> Java Build Path -> Project in test > project. Then I set in Run Configuration -> JUnit -> Classpath -> > UserEntries path do ejb classes in my main project. Now I start my test, ejb > modules are found, but I got error: > > ERROR - FAIL ... Uslugi: The reference @PersistenceContext(name="em", > unitName="myTestDb") cannot be resolved as there are 2 units with the same > name. Update your unitName to one of the following: > myTestDb%201246978781 > myTestDb%20415205570 > > When persistance.xml is: > > <persistence-unit name="myTestDb" transaction-type="JTA"> > <jta-data-source>myTestDb</jta-data-source> > <properties> > </properties> > </persistence-unit> > > > So what is going on? I haven't idea what was happening and what i should to > do. > > Best Regars > sw > > > > ----- > Best Regards > sw > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/EJBContainer-and-tests-tp4672761p4672812.html > Sent from the TomEE Users mailing list archive at Nabble.com.
