Improved the error message for the case where the factory's configuration
root is null.
Fix error messages