users@glassfish.java.net

Re: Maven2 junit test not finding src/test/resources/META-INF/persistence.x

From: <glassfish_at_javadesktop.org>
Date: Wed, 17 Sep 2008 00:20:30 PDT

Thank you mvatkina,

>What would happen if you remove resource elements from your pom.xml?

After removing resource from pom.xml when running test throwing same error.

[b]On Netbean Console[/b]

[ERROR]Mojo:
[ERROR] org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test
[ERROR]FAILED for project:
[ERROR] com.abc:MyProjectM2:jar:1.0-SNAPSHOT
[ERROR]Reason:
[ERROR]There are test failures.
[ERROR]Please refer to D:\Documents and Settings\.....\My Documents\MyProjectM2M2\target\surefire-reports for the individual test results.

[b]( Inside target\surefire-reports\mytest.txt)[/b]

javax.persistence.PersistenceException: No Persistence provider for EntityManager named TestPU: Provider named oracle.toplink.essentials.PersistenceProvider threw unexpected exception at create EntityManagerFactory:
java.lang.AssertionError
java.lang.AssertionError
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.computePURootURL(PersistenceUnitProcessor.java:263)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:148)
[Message sent by forum member 'happy007' (happy007)]

http://forums.java.net/jive/thread.jspa?messageID=299744