02-28-2019 04:14 AM
Hi All,
I’m looking to build a couple of custom snaps to enable native git support within the platform via the jgit library.
I have reached the point where I am deploying the custom snap pack but getting the following exceptions when trying to invoke the snap:
on first execution i get:
loader constraint violation: when resolving method “org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;” the class loader (instance of org/eclipse/jetty/webapp/WebAppClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of java/net/FactoryURLClassLoader) for the method’s defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature
further exections then fail with:
Could not initialize class org.eclipse.jgit.internal.storage.file.FileRepository
My feeling is that the issue is to do with the version of slf4j that is being used. this seems to be a core library for snaplogic however the version used is below the version required for the jgit dependency
I think the subsequent exception is a red herring (although open to any suggestions here also) the libraries required are definitely included in the build as i have checked and they are being brought through via maven dependencies.
as a side note it does appear that this is possible as i have recently managed to get this library working via the script snap in python, and calling the 3rd party libraries (happy to share that if it may be of interest to anyone).
Many thanks,
Kareem.
02-28-2019 08:57 AM
Can you exclude the SLF4J transitive dependency from your pom.xml (from whatever library is bringing it in)?
03-01-2019 05:44 AM
Hi Robin,
I Believe I have tried that but then running into issues similar to this thread:
not sure if you would possibly be open to a remote session to review this and if theres any options we might have missed?
Many thanks,
Kareem.