Unit Test JPA with JUnit H2 In Memory Database

You may also like...

Leave a Reply

6 Comments on "Unit Test JPA with JUnit H2 In Memory Database"

avatar
  Subscribe  
newest oldest
Notify of
Rajiv Mothilal
Guest
Rajiv Mothilal

Hi Memorynotfound. The persistence.xml requires a provider. which should be used?

Memorynotfound.com
Guest
Memorynotfound.com

Hello Rajiv,

It’s not required, but you can use the following HibernatePersistenceProvider</code.
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>

Kr,
Memorynotfound

Tore Angell Petersen
Guest
Tore Angell Petersen

Hi Memorynotfound!
I have a problem with the code, when I use it in my project and try to run a mvn clean package I get a NoClassDefFound error. I have followed your tutorial to the point, so I’m woundering if you got any pointers?
/Tore