So this question is going to be somewhat vague, and I apologize, but I don't really even know where to start. We use Jenkins to automate some builds during the night. We execute our builds with maven. For a while, everything was working out nice. We had findbugs, and code coverage results and a steady history of successful builds. All of the sudden, seemingly out of now where we are getting random NoClassDefFound exceptions while the unit tests are being run. Its very strange, because before hand, the log messages clearly show it building the sources and succeeding. Then the unit tests start to run and they instantly die with the aforementioned exception. We did recently perform an update of Jenkins, but I'm not entirely convinced that has much to do with it. The really strange part is that the builds don't always fail with this exception. Sometimes they run and pass fine, other times they fail immediately. The failures are not consistent in terms of the specific unit tests that fail, or the specific classes which cannot be found. While they seem to revolve around the same small set of classes and unit tests, there doesn't appear to be any real pattern to it.
Has anyone else out there seen this with maven builds on jenkins? I really have no idea what to do. The log messages aren't exactly useful, and I don't know what I could do to the Jenkins configuration to get better debugging information out of the failed builds. I can gather whatever information anyone may need if anyone has any ideas. Here is an example stack trace from one of the recently failed builds:
com.ipti.ptl.common.problems.detectors.CMDRProblemDetectorTest.afterPropertiesSetTest
Failing for the past 3 builds (Since Unstable#411 )
Took 18 ms.
Error Message
com/ipti/hardware/bcicinterface/CPacketReceivedArgs
Stacktrace
java.lang.NoClassDefFoundError: com/ipti/hardware/bcicinterface/CPacketReceivedArgs
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
at java.lang.Class.getDeclaredMethods(Class.java:1845)
at com.ipti.common.eventbus.EventBus.subscribe(EventBus.java:107)
at com.ipti.ptl.common.problems.detectors.CMDRProblemDetector.afterPropertiesSet(CMDRProblemDetector.java:23)
at com.ipti.ptl.common.problems.detectors.CMDRProblemDetectorTest.afterPropertiesSetTest(CMDRProblemDetectorTest.java:37