Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LinkageError when using plugins #3

Closed
brianhks opened this issue Apr 21, 2020 · 1 comment
Closed

LinkageError when using plugins #3

brianhks opened this issue Apr 21, 2020 · 1 comment

Comments

@brianhks
Copy link
Member

An example of this error is shown below when using the Kairos plugin while reporting JMX metrics from Cassandra:
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of org/kairosdb/metrics4j/configuration/PluginClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature

@brianhks
Copy link
Member Author

When using a plugin that includes slf4j and the parent application also uses slf4j but a different version this error can occur. The solution is to remove the slf4j jar from the plugin folder and let the plugin load the parent dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant