rmpestano / dbunit-rules

https://github.com/database-rider/database-rider
15 stars 5 forks source link

jpa EntityManagerProvider depends on hibernate #9

Closed rmpestano closed 8 years ago

rmpestano commented 8 years ago

If we use jpa module entityManager provider will throw a class not found exception if hibernate is not on classpath:

Caused by: java.lang.NoClassDefFoundError: org/hibernate/Session at com.github.dbunit.rules.jpa.EntityManagerProvider.init(EntityManagerProvider.java:63) at com.github.dbunit.rules.jpa.EntityManagerProvider.instance(EntityManagerProvider.java:48)

this is the line is the cause: https://github.com/rmpestano/dbunit-rules/blob/master/jpa/src/main/java/com/github/dbunit/rules/jpa/EntityManagerProvider.java#L63