I was convinced maven-surefire-plugin classloader was mucked producing 
NoClassDefFoundError  configed maven-surefire-plugin

useSystemClassLoader=true and useManifestOnlyJar=false.NoClassDefFoundError 
displayed..no joy
<useSystemClassLoader>false</useSystemClassLoader>NoClassDefFoundError 
displayed..still no joy

then i read this 
blog:http://javarevisited.blogspot.com/2011/06/noclassdeffounderror-exception-in.html
VM not initializing statics causes NCDFE ???

the original coder was obsessed with static singleton model
I ripped out all the statics and went with ctor and voila NoClassDefFoundError 
disappeared

environment:
Apache Maven 3.2.5
Java version: 1.8.0_40, vendor: Oracle CorporationJava home: /jdk1.8/jreDefault 
locale: en_US, platform encoding: Cp1252
why adding static methods or static variables to a class called from 
maven-surefire-plugin cause NoClassDefFoundError
?
Martin 

                                          

Reply via email to