I am using an API which uses slf4j (it happens to be jcifs-ng, but I don't 
think that matters.) When I am able to define my classpath myself, I can call 
this API with no problem - slf4j finds no bindings and falls back on NOP. But 
when I call the API running under a service whose classpath I can't control, I 
get this error:

java.lang.LinkageError: loader constraint violation: when resolving method 
"org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;"
 the class loader (instance of chs/api/mgr/local/ExtraJarPluginClassLoader) of 
the current class, org/slf4j/LoggerFactory, and the class loader (instance of 
<bootloader>) for the method's defining class, 
org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type 
org/slf4j/ILoggerFactory used in the signature
       at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:418)
       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
       at 
jcifs.smb.NtlmPasswordAuthenticator.<clinit>(NtlmPasswordAuthenticator.java:58)

I don't use sl4j directly. Is there some way I can bind to NOP before I make 
any calls to the API?

Larry Stamper
MP9-OCS
DISYS (Digital Intelligence Systems)
Consulting Software Engineer
Cell: (503) 560-7004
larry.stam...@daimler.com<mailto:larry.stam...@daimler.com>


If you are not the addressee, please inform us immediately that you have 
received this e-mail by mistake, and delete it. We thank you for your support.

_______________________________________________
slf4j-user mailing list
slf4j-user@qos.ch
http://mailman.qos.ch/mailman/listinfo/slf4j-user

Reply via email to