The class loading mechanism improperly assumes that the executing context can be used to load the custom formatter class when handling the case of a default value being present. The proper way to do this is to reference the ClassCache that is initialized when the compile() method is called.
This correction is a simple replacement of ClassUtils.loadClass with ClassFile.loadClass. In the first case, the classloader of the current thread is used, while in the second case the registered classpath of the compiler is used. You don't see a problem when running from the commandline, but you do see a problem when third party tools, such as the maven-jibx-plugin executes the compile method.