Hi Slawek, Also give your persistence-unit name a unique name and not the same name as your DataSource, so there is no confusion.
Andy. http://www.tomitribe.com - @AndyGeeDe - On a mobile device, and I have fat fingers. Sorry for typos. On 7 Nov 2014 18:11, "slawek" <[email protected]> wrote: > 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. >
