I’m having issues upgrading a pom file from Hibernate 3.3.2 to 3.6.0. I can compile fine, the jar file is being pulled down, but I get the following error: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.Configuration when running Surefire tests. This class is in the referenced JAR, so I’m not quite sure what’s going on here unless the classpath maven is using is somehow referencing the wrong jar. I did a purge of my local repository cache to no avail.
A snip of my pom is below. Any thoughts?
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.6.0.Final</version>
</dependency>
<repository>
<id>JBoss</id>
<name>JBoss repository</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>
</repository>
I ended purging my repository and redownloading everything and it worked. Ugh, best kind of error…