The problem is not in this code.
A NullPointerException is being thrown from a static initializer method in one of the classes.
Static initializer code is either an assignment to a static variable at the point of declaration. For example:
Code:
private static Object someObject = someMethod();
Or, a block like this:
Code:
static {
// some code
}
Any exception in code like this prevents the class from initializing, and results in an Error being thrown (and the class becoming unusable).
A class is initialized the first time you create an instance of it, call one if it's static methods, or access one of it's static variables.
Graham.