NUTCH-3108 Fix SLF4J Class Loader Conflict in language-identifier #849
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When running Apache Nutch 1.20 on a distributed Hadoop cluster with the language-identifier plugin enabled, a class loader conflict occurs during the parse process. This results in the following error:
2025-02-24 08:58:59,152 INFO mapreduce.Job: Task Id : attempt_1740061418437_0135_m_000001_0, Status : FAILED
Error: loader constraint violation: when resolving method 'org.slf4j.ILoggerFactory org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()' the class loader org.apache.nutch.plugin.PluginClassLoader @4c5228e7 of the current class, org/slf4j/LoggerFactory, and the class loader 'app' for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature (org.slf4j.LoggerFactory is in unnamed module of loader org.apache.nutch.plugin.PluginClassLoader @4c5228e7, parent loader 'app'; org.slf4j.impl.StaticLoggerBinder is in unnamed module of loader 'app')
I have managed to resolve this issue by modifying following files:
ivy.xml ->
and plugin.xml ->