It sounds like you have 2 issues working against you here. 1) classloader differences and 2) test data integrity
Classloader issues often manifest as missing method exceptions. This is because you likely have 2 different versions of the same class in 2 different jar files. If that happens, your only saving grace will be that eclipse and maven are loading the classes from different jars so at least one of them will be right. I had that same problem here:
http://forum.springsource.org/showthread.php?t=52499. If you have 2 jars that contain the same class files, it is possible that eclipse and maven will load the class files from different and potentially wrong jars. Whenever I see things like the this: NoSuchMethodError: org.hibernate.cache.CacheException.(Ljava/lang/ExceptionV The first thing I do is check to verify that eclipse and maven are loading the files from the same jar. you can see what jar a class is loaded from by putting the following in your test (at the top):
Code:
try
{
String classname="org.hibernate.cache.CacheException"; System.out.println("Jar="+Thread.currentThread().getContextClassLoader().loadClass(classname).getProtectionDomain().getCodeSource().getLocation());
}
catch (Exception e)
{}
Additionally, if you notice that changing the order of tests or grouping them in differing subsets affects your results, it is possible that data is being affected by previous tests that causes subsequent tests to fail. Verify that none of your tests are failing because of data issues.