You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The version of aws-sdk-java is aws-java-sdk-1.9.22.jar. When I try to make a s3 connection, I got following error:
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V
at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:120)
at com.amazonaws.internal.config.InternalConfig.load(InternalConfig.java:258)
at com.amazonaws.internal.config.InternalConfig$Factory.(InternalConfig.java:284)
at com.amazonaws.util.VersionInfoUtils.userAgent(VersionInfoUtils.java:139)
at com.amazonaws.util.VersionInfoUtils.initializeUserAgent(VersionInfoUtils.java:134)
at com.amazonaws.util.VersionInfoUtils.getUserAgent(VersionInfoUtils.java:95)
at com.amazonaws.ClientConfiguration.(ClientConfiguration.java:42)
at com.amazonaws.services.s3.AmazonS3Client.(AmazonS3Client.java:361)
at com.google.refine.importing.camel.CamelRouteBuilder.configure(CamelRouteBuilder.java:52)
The jar I am using is slf4j-api-1.7.10.jar, commons-logging-1.1.3.jar(which extract from aws-sdk zip), log4j-1.2.17.jar. In the zip file from the github,, there's no dependency of the slf4j.
Not sure why common logging delegate to slf4j. My understand is to use log4j as the implementation. I checked the failed signature, it was used until slf4j-api-1.5.58.jar. But my main program has to be slf4j-api-1.7.10.jar(otherwise will complain other similar signature issue)
Looking for some workaround for this problem. or change the code base to work with updated slf4j-api-1.7.10.
The text was updated successfully, but these errors were encountered:
Despite its Java package, org.apache.commons.logging.impl.SLF4JLocationAwareLog comes from Slf4j's jcl-over-slf4j module. You've presumably got a version of this on your classpath before the actual commons-logging implementation, which is why the SDK appears to be trying to use slf4j. The exception you're getting sounds like the version of jcl-over-slf4j you're picking up isn't compatible the version of slf4j-api you're using.
As I understand it, you've got two options:
Remove jcl-over-slf4j from your classpath. The SDK will then be sure to load the actual commons-logging implementation, which will call directly to log4j without touching slf4j. The rest of your application can use slf4j's API, which will also ultimately route down to log4j.
Pull in a version of jcl-over-slf4j that's compatible with your version of slf4j-api. You can then safely drop commons-logging. The SDK (and any other libraries that use commons-logging) will get the jcl-over-slf4j implementation and end up calling through slf4j-api to log4j.
The version of aws-sdk-java is aws-java-sdk-1.9.22.jar. When I try to make a s3 connection, I got following error:
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V
at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:120)
at com.amazonaws.internal.config.InternalConfig.load(InternalConfig.java:258)
at com.amazonaws.internal.config.InternalConfig$Factory.(InternalConfig.java:284)
at com.amazonaws.util.VersionInfoUtils.userAgent(VersionInfoUtils.java:139)
at com.amazonaws.util.VersionInfoUtils.initializeUserAgent(VersionInfoUtils.java:134)
at com.amazonaws.util.VersionInfoUtils.getUserAgent(VersionInfoUtils.java:95)
at com.amazonaws.ClientConfiguration.(ClientConfiguration.java:42)
at com.amazonaws.services.s3.AmazonS3Client.(AmazonS3Client.java:361)
at com.google.refine.importing.camel.CamelRouteBuilder.configure(CamelRouteBuilder.java:52)
The jar I am using is slf4j-api-1.7.10.jar, commons-logging-1.1.3.jar(which extract from aws-sdk zip), log4j-1.2.17.jar. In the zip file from the github,, there's no dependency of the slf4j.
Not sure why common logging delegate to slf4j. My understand is to use log4j as the implementation. I checked the failed signature, it was used until slf4j-api-1.5.58.jar. But my main program has to be slf4j-api-1.7.10.jar(otherwise will complain other similar signature issue)
Looking for some workaround for this problem. or change the code base to work with updated slf4j-api-1.7.10.
The text was updated successfully, but these errors were encountered: