C:programmingitem3srcabcdoutartifactsgsc>java -jar abcd.jar "" "C:programmingitem3srcabcdoutdatagscP22-保单P22-保单.zip" "C:programmingitem3srcabcdoutdatagsctest" SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/programming/item3/src/abcd/out/artifacts/gsc/slf4j-jdk14-1.5.6.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/programming/item3/src/abcd/out/artifacts/gsc/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/programming/item3/src/abcd/out/artifacts/gsc/slf4j-nop-1.5.3.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/programming/item3/src/abcd/out/artifacts/gsc/log4j-slf4j-impl-2.8.2.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.JDK14LoggerFactory] SLF4J: The requested version 1.5.6 by your slf4j binding is not compatible with [1.6, 1.7] SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details. Exception in thread "main" java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:221) at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:303) at java.util.logging.Logger.log(Unknown Source) at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:587) at org.slf4j.impl.JDK14LoggerAdapter.info(JDK14LoggerAdapter.java:284) at org.apache.spark.internal.Logging$class.logInfo(Logging.scala:57) at org.apache.spark.SparkContext.logInfo(SparkContext.scala:74) at org.apache.spark.SparkContext.(SparkContext.scala:184) at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2549) at org.apache.spark.sql.SparkSession$Builder$$anonfun$7.apply(SparkSession.scala:944) at org.apache.spark.sql.SparkSession$Builder$$anonfun$7.apply(SparkSession.scala:935) at scala.Option.getOrElse(Option.scala:120) at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:935) at myspark.warehouse.DataParsing$.getLocalSparkSession(DataParsing.scala:28) at myspark.warehouse.DataParsing$.main(DataParsing.scala:34) at myspark.warehouse.DataParsing.main(DataParsing.scala)
Exception in thread “main” java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
解决方法:
在pom.xml中指定runtime阶段使用哪个日志包
参考资料:https://lee1707.github.io/errors/2018/09/04/Errors-Error05-java.lang.AbstractMethodError-org.slf4j.impl.JDK14LoggerAdapter.log/
1.7.25 2.11.2 org.slf4j slf4j-jdk14${slf4j.version} runtime org.slf4j slf4j-nop${slf4j.version} runtime
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)