com.arjuna.common.util.logging.LogFactory#setupLogSystem makes calls to
com.arjuna.common.util.logging.LogFactory#loadFactory("com.arjuna.common.internal.util.logging.jakarta.JakartaLogFactory", null) when the jakarta log system is selected.
When the logger class name argument is nullm the loadfactory will try to instanciate the "com.arjuna.common.internal.util.logging.jakarta.JakartaLogFactory" class with a no-arg constructor and this class does NOT have a
no-arg ctor.
private static LogFactoryInterface loadFactory(String classname, String arg) throws LogConfigurationException
{
try {
Class factoryClass = Thread.currentThread().getContextClassLoader().loadClass(classname);
LogFactoryInterface logFactoryInterface = null;
if(arg == null)
else {
Constructor ctor = factoryClass.getConstructor(new Class[]
logFactoryInterface = (LogFactoryInterface)ctor.newInstance(arg);
}
return logFactoryInterface;
} catch (Exception e) { throw new LogConfigurationException(e); }
}
Proposed fix: The fix is to simply always forward the argument to the String arg ctor - with a null arg, the JakartaLogFactory will properly
use the default logger from commons.logging
private static LogFactoryInterface loadFactory(String classname, String arg) throws LogConfigurationException
{
try {
Class factoryClass = Thread.currentThread().getContextClassLoader().loadClass(classname);
LogFactoryInterface logFactoryInterface = null;
Constructor ctor = factoryClass.getConstructor(new Class[] { String.class}
);
logFactoryInterface = (LogFactoryInterface)ctor.newInstance(arg);
return logFactoryInterface;
} catch (Exception e)
}