On 7/25/06, Gary VanMatre <[EMAIL PROTECTED]> wrote:
>I was looking at adding some junit test cases for a maven build mocking the >shale mail reader JPA library in the sandbox. > >I'm using the a transaction type of "RESOURCE_LOCAL" so the test can be >ran under JavaSE. The problem I'm seeing is that the test needs to load the >persistence.xml from the META-INF of the target jar. It can't seem to find it >under the project's target. I'm seeing a error message that the "default" >provider can't be found. > >What am I missing here? Any ideas? It seems to work with the latest toplink archive. http://www.oracle.com/technology/products/ias/toplink/JPA/index.html
That's good. Just as a quick reminder, the persistence.xml file is actually in the META-INF directory of the mailreader-jpa.jar file (i.e. the one that contains the entity classes), not in the webapp, so be sure this JAR is on the classpath for your tests. AFAIK that's a best practice, so you can reuse the entity classes and persistence unit combination in multiple environments. Craig
