i've got the following problem with dynamic class loading. I've written a program that loads JUnit testsuites and testcases dynamically from external class-files and runs them. This works quite well, but i've got problems with statements like the following:

private static Logger log = LoggingManager.getLoggerForClass();

In this case, i get a NoClassDefFoundError. If i remove the "static" prefix and put the initialisation into the constructor, there are problems anymore. Same if i initialise the variable with "null". So it seems that the problem occurs because of the method call at the initialisation.

Could it be that the class LoggingManager is not correctly loaded at this time? And is there a way to overcome this problem?