The upgrade to SLF4J 2 via #29152 has broken ConstantFieldSubstitutionProcessor when the class processed has both a static boolean field to make constant at build time and a static logger. The reason seems to be the usage of different classloaders so the service.isAssignableFrom(clazz) invocation in java.util.ServiceLoader.LazyClassPathLookupIterator#hasNextService fails.

This issue is about catching and logging those error, skipping the processing of such fields which will be then evaluated at runtime.