You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Mark Struberg <st...@yahoo.de> on 2010/12/31 13:00:39 UTC

test warning: The persistence unit "test" was found multiple times

Hi!

I always get the following warning when running our build:

0  test  WARN   [main] openjpa.Runtime - The persistence unit "test" was found multiple times in the following resources "[file:/home/msx/develop/java/apache/openjpa/trunk/openjpa-persistence-locking/target/test-classes/META-INF/persistence.xml, jar:file:/home/msx/develop/java/apache/openjpa/trunk/openjpa-persistence-jdbc/target/openjpa-persistence-jdbc-2.2.0-SNAPSHOT-tests.jar!/META-INF/persistence.xml]", but persistence unit names should be unique. The first persistence unit matching the provided name in "file:/home/msx/develop/java/apache/openjpa/trunk/openjpa-persistence-locking/target/test-classes/META-INF/persistence.xml" is being used.


Will investigate after the build is done - this mail is kind of a self-reminder ;)

LieGrue,
strub


      

Re: test warning: The persistence unit "test" was found multiple times

Posted by Michael Dick <mi...@gmail.com>.
Just some quick thoughts,

This was probably introduced when we started packaging the tests in their
own jar. It might be good to separate out the test framework (classes like
SingleEMFTestCase) from the 'real' tests. Ideally we'd be able to put the
framework classes in openjpa-persistence and the tests in
openjpa-persistence-jdbc, but I suspect we have some compile dependencies
hidden away.

-mike

On Fri, Dec 31, 2010 at 6:00 AM, Mark Struberg <st...@yahoo.de> wrote:

> Hi!
>
> I always get the following warning when running our build:
>
> 0  test  WARN   [main] openjpa.Runtime - The persistence unit "test" was
> found multiple times in the following resources
> "[file:/home/msx/develop/java/apache/openjpa/trunk/openjpa-persistence-locking/target/test-classes/META-INF/persistence.xml,
> jar:file:/home/msx/develop/java/apache/openjpa/trunk/openjpa-persistence-jdbc/target/openjpa-persistence-jdbc-2.2.0-SNAPSHOT-tests.jar!/META-INF/persistence.xml]",
> but persistence unit names should be unique. The first persistence unit
> matching the provided name in
> "file:/home/msx/develop/java/apache/openjpa/trunk/openjpa-persistence-locking/target/test-classes/META-INF/persistence.xml"
> is being used.
>
>
> Will investigate after the build is done - this mail is kind of a
> self-reminder ;)
>
> LieGrue,
> strub
>
>
>
>