NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy

作者&投稿:仁任 (若有异议请与网页底部的电邮联系)
~ 报错日志:

解决方案:

解决冲突。

附:

No SLF4J providers were found.

This warning, i.e. not an error, message is reported when no SLF4J providers could be found on the class path. Placing one (and only one) of slf4j-nop.jar slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem. Note that these providers must target slf4j-api 1.8 or later.

In the absence of a provider, SLF4J will default to a no-operation (NOP) logger provider.

Please note that slf4j-api version 1.8.x and later use the ServiceLoader mechanism. Earlier versions relied on the static binder mechanism which is no longer honored by slf4j-api. Please read the FAQ entry What has changed in SLF4J version 1.8.0? for further important details.

If you are responsible for packaging an application and do not care about logging, then placing slf4j-nop.jar on the class path of your application will get rid of this warning message. Note that embedded components such as libraries or frameworks should not declare a dependency on any SLF4J providers but only depend on slf4j-api. When a library declares a compile-time dependency on a SLF4J provider, it imposes that provider on the end-user, thus negating SLF4J's purpose.

Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8
Planning for the advent of Jigsaw (Java 9), slf4j-api version 1.8.x and later use the ServiceLoader mechanism. Earlier versions of SLF4J relied on the static binder mechanism which is no longer honored by slf4j-api.

In case SLF4J finds no providers targeting SLF4J 1.8 but finds instead bindings targeting SLF4J 1.7 or earlier, it will list the bindings it finds but otherwise ignores them.

See also the FAQ entry What has changed in SLF4J version 1.8.0? for further important details.

IllegalStateException: org.slf4j.LoggerFactory in failed state. Original exception was thrown EARLIER.
This IllegalStateException is thrown post-initialization and informs the user that initialization of LoggerFactory has failed.

NOTE It is important to realize that the exception causing the failure was thrown at an earlier stage. This earlier exception should provide more valuable information about the root cause of the problem.

The method o.a.commons.logging.impl.SLF4FLogFactory#release was invoked.
Given the structure of the commons-logging API, in particular as implemented by SLF4J, the o.a.commons.logging.impl.SLF4FLogFactory#release() method should never be called. However, depending on the deployment of commons-logging.jar files in your servlet container, release() method may be unexpectedly invoked by a copy of org.apache.commons.logging.LogFactory class shipping with commons-logging.jar.

This is a relatively common occurrence with recent versions of Tomcat, especially if you place jcl-over-slf4j.jar in WEB-INF/lib directory of your web-application instead of $TOMCAT_HOME/common/lib, where $TOMCAT_HOME stands for the directory where Tomcat is installed. In order to fully benefit from the stability offered by jcl-over-slf4j.jar, we recommend that you place jcl-over-slf4j.jar in $TOMCAT_HOME/common/lib without placing a copy in your web-applications.

Please also see bug #22.

Operation [suchAndSuch] is not supported in jcl-over-slf4j.
An UnsupportedOperationException is thrown whenever one of the protected methods introduced in JCL 1.1 are invoked. These methods are invoked by LogFactory implementations shipping with commons-logging.jar. However, the LogFactory implemented by jcl-over-slf4j.jar, namely SLF4FLogFactory, does not call any of these methods.

If you observe this problem, then it is highly probable that you have a copy of commons-logging.jar in your class path overriding the classes shipping with jcl-over-slf4j.jar. Note that this issue is very similar in nature to the warning issued when the "o.a.commons.logging.impl.SLF4FLogFactory.release()" method is invoked, discussed in the previous item.

Detected logger name mismatch

Logger name mismatch warnings are printed only if the slf4j.detectLoggerNameMismatch system property is set to true. By default, this property is not set and no warnings will be printed even in case of a logger name mismatch.

SINCE 1.7.9 The warning will be printed in case the name of the logger specified via a class passed as an argument to the LoggerFactory.getLogger(Class) method differs from the name of the caller as computed internally by SLF4J.

For example, the following code snippet

will result in the warning

SLF4J: Detected logger name mismatch. Given name: "com.foo.Kangaroo"; computed name: "com.acme.Fruit".
but only if slf4j.detectLoggerNameMismatch system property is set to true.

No warning will be issued for the special case where the class in which the logger is defined is a super-type of the class parameter passed as argument. For example,

If you come across a mismatch warning which cannot be explained, then you might have spotted a white elephant, that is a very rare occurrence where SLF4J cannot correctly compute the name of the class where a logger is defined. We are very interested to learn about such cases. If and when you spot an inexplicable mismatch, please do file a bug report with us.

Failed to load class org.slf4j.impl.StaticLoggerBinder
This warning message is reported when the org.slf4j.impl.StaticLoggerBinder class could not be loaded into memory. This happens when no appropriate SLF4J binding could be found on the class path. Placing one (and only one) of slf4j-nop.jar slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem.

SINCE 1.6.0 As of SLF4J version 1.6, in the absence of a binding, SLF4J will default to a no-operation (NOP) logger implementation.

If you are responsible for packaging an application and do not care about logging, then placing slf4j-nop.jar on the class path of your application will get rid of this warning message. Note that embedded components such as libraries or frameworks should not declare a dependency on any SLF4J binding but only depend on slf4j-api. When a library declares a compile-time dependency on a SLF4J binding, it imposes that binding on the end-user, thus negating SLF4J's purpose.

Multiple bindings were found on the class path
SLF4J API is designed to bind with one and only one underlying logging framework at a time. If more than one binding is present on the class path, SLF4J will emit a warning, listing the location of those bindings.

When multiple bindings are available on the class path, select one and only one binding you wish to use, and remove the other bindings. For example, if you have both slf4j-simple-1.8.0-beta2.jar and slf4j-nop-1.8.0-beta2.jar on the class path and you wish to use the nop (no-operation) binding, then remove slf4j-simple-1.8.0-beta2.jar from the class path.

The list of locations that SLF4J provides in this warning usually provides sufficient information to identify the dependency transitively pulling in an unwanted SLF4J binding into your project. In your project's pom.xml file, exclude this SLF4J binding when declaring the unscrupulous dependency. For example, cassandra-all version 0.8.1 declares both log4j and slf4j-log4j12 as compile-time dependencies. Thus, when you include cassandra-all as a dependency in your project, the cassandra-all declaration will cause both slf4j-log4j12.jar and log4j.jar to be pulled in as dependencies. In case you do not wish to use log4j as the the SLF4J backend, you can instruct Maven to exclude these two artifacts as shown next:

NOTE The warning emitted by SLF4J is just that, a warning. Even when multiple bindings are present, SLF4J will pick one logging framework/implementation and bind with it. The way SLF4J picks a binding is determined by the JVM and for all practical purposes should be considered random. As of version 1.6.6, SLF4J will name the framework/implementation class it is actually bound to.

Embedded components such as libraries or frameworks should not declare a dependency on any SLF4J binding but only depend on slf4j-api. When a library declares a compile-time dependency on a SLF4J binding, it imposes that binding on the end-user, thus negating SLF4J's purpose. When you come across an embedded component declaring a compile-time dependency on any SLF4J binding, please take the time to contact the authors of said component/library and kindly ask them to mend their ways.

slf4j-api version does not match that of the binding
An SLF4J binding designates an artifact such as slf4j-jdk14.jar or slf4j-log4j12.jar used to bind slf4j to an underlying logging framework, say, java.util.logging and respectively log4j.

Mixing mixing different versions of slf4j-api.jar and SLF4J binding can cause problems. For example, if you are using slf4j-api-1.8.0-beta2.jar, then you should also use slf4j-simple-1.8.0-beta2.jar, using slf4j-simple-1.5.5.jar will not work.

NOTE From the client's perspective all versions of slf4j-api are compatible. Client code compiled with slf4j-api-N.jar will run perfectly fine with slf4j-api-M.jar for any N and M. You only need to ensure that the version of your binding matches that of the slf4j-api.jar. You do not have to worry about the version of slf4j-api.jar used by a given dependency in your project. You can always use any version of slf4j-api.jar, and as long as the version of slf4j-api.jar and its binding match, you should be fine.

At initialization time, if SLF4J suspects that there may be a api vs. binding version mismatch problem, it will emit a warning about the suspected mismatch.

Logging factory implementation cannot be null
This error is reported when the LoggerFactory class could not find an appropriate binding. Placing one (and only one) of slf4j-nop.jar, slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should prove to be an effective remedy.

Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError.
The purpose of slf4j-log4j12 module is to delegate or redirect calls made to an SLF4J logger to log4j. The purpose of the log4j-over-slf4j module is to redirect calls made to a log4j logger to SLF4J. If SLF4J is bound withslf4j-log4j12.jar and log4j-over-slf4j.jar is also present on the class path, a StackOverflowError will inevitably occur immediately after the first invocation of an SLF4J or a log4j logger.

Here is how the exception might look like:

subsequent lines omitted...

SINCE 1.5.11 SLF4J software preempts the inevitable stack overflow error by throwing an exception with details about the actual cause of the problem. This is deemed to be better than leaving the user wondering about the reasons of the StackOverflowError.

For more background on this topic see Bridging legacy APIs.

Detected both jcl-over-slf4j.jar AND slf4j-jcl.jar on the class path, preempting StackOverflowError.
The purpose of slf4j-jcl module is to delegate or redirect calls made to an SLF4J logger to jakarta commons logging (JCL). The purpose of the jcl-over-slf4j module is to redirect calls made to a JCL logger to SLF4J. If SLF4J is bound with slf4j-jcl.jar and jcl-over-slf4j.jar is also present on the class path, then a StackOverflowError will inevitably occur immediately after the first invocation of an SLF4J or a JCL logger.

Here is how the exception might look like:

SINCE 1.5.11 SLF4J software preempts the inevitable stack overflow error by throwing an exception with details about the actual cause of the problem. This is deemed to be better than leaving the user wondering about the reasons of the StackOverflowError.

For more background on this topic see Bridging legacy APIs.

Failed to load class "org.slf4j.impl.StaticMDCBinder"
This error indicates that appropriate SLF4J binding could not be found on the class path. Placing one (and only one) of slf4j-nop.jar, slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem.

MDCAdapter cannot be null
This error is reported when org.slf4j.MDC class has not been initialized correctly. Same cause and remedy as the previously listed item.

A number (N) of logging calls during the initialization phase have been intercepted and are now being replayed. These are subject to the filtering rules of the underlying logging system.
SINCE 1.7.15 Logging calls made during the initilization phase are recorded and replayed post-inititilization. Note that the replayed logging calls are subject to filtering by the underlying logging system.

In principle, replaying only occurs for apllications which are already multi-threaded at the time the first logging call occurs.

See also substitute loggers.

Substitute loggers were created during the default configuration phase of the underlying logging system
Highly configurable logging systems such as logback and log4j may create components which invoke loggers during their own initialization. See issue LOGBACK-127 for a typical occurrence. However, since the binding process with SLF4J has not yet completed (because the underlying logging system was not yet completely loaded into memory), it is not possible to honor such logger creation requests.

To avoid this chicken-and-egg problem, SLF4J creates substitute loggers during this phase (initialization). Calls made to the substitute loggers during this phase are simply dropped. After the initialization completes, the substitute logger will delegate logging calls to the appropriate logger implementation and otherwise will function as any other logger returned by LoggerFactory.

If any substitute logger had to be created, SLF4J will emit a a listing of such loggers. This list is intended to let you know that any logging calls made to these loggers during initialization have been dropped.

See also intercepted and replayed logging calls.

SLF4J versions 1.4.0 and later requires log4j 1.2.12 or later
The trace level was added to log4j in version 1.2.12 released on August 29, 2005. The trace level was added to the SLF4J API in version 1.4.0 on May 16th, 2007. Thus, starting with SLF4J 1.4.0, the log4j binding for SLF4J requires log4j version 1.2.12 or above.

However, as reported in issue 59, in some environments it may be difficult to upgrade the log4j version. To accommodate such circumstances, SLF4J's Log4jLoggerAdapter will map the TRACE level as DEBUG.

java.lang.NoClassDefFoundError: org/slf4j/event/LoggingEvent
Logback-classic version 1.1.4 and later require slf4j-api version 1.7.15 or later.

With an earlier slf4j-api.jar in the classpath, attempting introspection of a Logger instance returned by logback version 1.1.4 or later will result in a NoClassDefFoundError similar to that shown below.

Placing slf4j-api.jar version 1.7.15 or later in the classpath should solve the issue.

Note that this problem only occurs with logback version 1.1.4 and later, other bindings such as slf4j-log4j, slf4j-jdk14 and slf4j-simple are unaffected.


python有哪些保留的关键词呢?
python的保留字如下:其中保留字分别有这些:False、None、True、and、as、assert、async、await、break、class、continue、def、del、elif、else、except、finally、for、from、global、if、import、in、is、lambda、nonlocal、not、or、pass、raise、return、try、while、with、yield。在 Python 中,定义一个...

hibernate 一对多时无法更新 一那面的外键值
...你这里的一对多 inverse 不是true 也就是没有 关系维护上的反转 或者说,是一对多的关系式一端来维护,在表上的表现就是,多出了一张中间表!!而且多端没有一端的外键!如果inverse为true 则没有中间表 由多端维护关系,多出一个一端的外键!

ABCDEFJ、然后呢?、
重开音节i发[ai],重闭\/轻音短[i][E]。o发长音[Eu][C:][u:],短音[Q][C][E] one殊。u字多发 [ju:]和[Q],忙碌busy(i)加[u:][u]。y头发[j]重读[ai],轻音\/结尾[i]变来。ay ,ey, o\/uy,多发[ei][i],[Ci][ai]。r前元音常卷舌,S后弱音须强化。英语字母发音顺口溜:...

Java代码优化有哪些常用的方法
1、 尽量指定类的final修饰符 带有final修饰符的类是不可派生的。在Java核心API中,有许多应用final的例子,例如java.lang.String。为String类指定final防止了人们覆盖length()方法。另外,如果指定一个类为final,则该类所有的方法都是final。Java编译器会寻找机会内联(inline)所有的final方法(这和具体...

GTK+ 基础,第 2 部分: 如何使用 GTK+
清单7. GTK+ 信号被转换成地道的 C# 事件概念 private void DeleteCB (object o, DeleteEventArgs args) { Application.Quit (); args.RetVal = true; } 由于C# 事件的构造方式,所以 delete-event 处理程序的原型略有不同。它不是从回调返回 true,而是通过 args.RetVal 传递返回值。gtk_main() 和gtk_main...

Python36中的小类出错:__init__() missing 1 required positional...
B实例时有一个参数b_size,而且是必填的,也就是 b_instance = B(20)b_instance.d_b() # 打印出结果是20

Java Reflection (JAVA反射)机制详解
Class c = Class.forName(p);Object o = c.newInstance();return o;}}2、 动态检测对象的身份,替代instanceofpublic static booleanisKindOf(Object obj, String type)throws ClassNotFoundException {\/\/ get the class def for obj and typeClass c = obj.getClass();Class tClass = Class.forName(type)...

Python类的多重继承问题深入分析
class B(A):def foo2(self):pass class C(A):def foo1(self):print "C"class D(B, C):pass d = D()d.foo1()按照经典类的查找顺序从左到右深度优先的规则,在访问d.foo1()的时候,D这个类是没有的..那么往上查找,先找到B,里面没有,深度优先,访问A,找到了foo1(),所以这时候调用...

如何设计插件式结构的程序,兼谈Python语言
def runPlugin(self, filename):pluginName=os.path.splitext(filename)[0]plugin=__import__("plugins."+pluginName, fromlist=[pluginName])clazz=plugin.getPluginClass()o=clazz()o.setPlatform(self)o.start()self.plugins.append(o)def shutdown(self):for o in self.plugins:o.stop()o...

python if __name__=='__main__'为什么不执行?
main写错了,应该写成 if __name__ == '__main__':

香河县18561055656: 出现这种异常怎么办java.lang.NoClassDefFoundError -
蔚非烟酸: 常见的情况是: 1、你把大小写搞错了,Windows 不区分文件名的大小写,但Java 区分,所以文件名大小写错时你也编译了,但是在运行时就会出错了. 2、你的类的静态...

香河县18561055656: 求电脑大神 在cmd输入 java –version 出来的是 Exception in thread "main" java.lang.NoClassDefFoundEr -
蔚非烟酸: jdk的安装配置有问题,给出具体配置说明如下,希望对你有帮助:1.新建JAVA_HOME=JDK安装目录 例:JAVA_HOME=D:\Program Files\Java\jdk1.52.修改PATH 在最前面加上%JAVA_HOME%\BIN;%JAVA_HOME%\JRE\BIN;3.新建...

香河县18561055656: Java编程中Could not find the main class: test. Program will exit. -
蔚非烟酸: 执行JAVA路径是没错的,错的应该是你的环境配置问题了,你在运行-CMD上,录入JAVA -Version看他出不出来版本号.不出来就是环境变量配错了.如果配置错了可以按下面配置就搞定了 你按下面的步骤就可以设置了.有问题可以百度HI我...

香河县18561055656: 关于java提示找不到这个类 明明文件存在 -
蔚非烟酸: 这个 wrong name 是重点,它是在说你搞错了大小写或者目录结构.2个常识,相信教材上都讲了:1、Java 区分大小写,文件名必须与类名完全相同,大小写也要一样.2、Java 包名要和类文件所在的子目录结构一致 (相对于 classpath 根节点目录或jar文件内的根节点).NoClassDefFoundError 或 ClassNotFoundException 是两个不同类型的错误,一个是 Error 一个是 Exception,其中 Error 是表示这个错误无法自动恢复,你试多少次都没用(如果你不重启这个应用程序进程的话),Exception 则可能在下次再执行就正常了.

香河县18561055656: java.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Aspect 报这个错 但是我又找不到aspectj -
蔚非烟酸: 被编译时,所搜索的类定义存在,但运行时没找到该定义. 把对应的jar包加到启动路径 从代码上看是AspectJ ,你是不是用切面编程

香河县18561055656: myeclipse启动tomcat时报错 -
蔚非烟酸: 出现该错误是由于class编译器的JDK版本高于运行期的JDK版本.是由于tomcat运行时是1.6的JDK,Eclipse编译时则是1.7.修改方法:保证编译器和运行期的JDK版本一致.Eclipse修改:Windows Window -> Preferences->Java -> Compiler 设置 "Compiler compliance level" 为 1.6 (相应版本)

香河县18561055656: Flex结合Hibernate 说session没有创建... java.lang.NoClassDefFoundError : org/hibernate/Session -
蔚非烟酸: 无法找到org/hibernate/Session类定义.缺少hibernate的jar造成的. -----------------------------------------Flex是应该通过Servlet访问数据的吧.WEB-INF/lib下面有hibernate用的jar吗?

香河县18561055656: 请教各位,在sapconsole的配置问题.
蔚非烟酸: JDK 6啊?JDK 5还没SAP通盘接受呢,先换换JDK试试吧,早期JDK还是可以下载到的,比如说SUN 的JDK: http://java.sun.com/javase/downloads/previous.jsp

香河县18561055656: java程序编译通过,可是运行确出现exception in thread“main”java.lang.NoSuchMethodError:main错误. -
蔚非烟酸: 因为你的main方法没有写在public 类中你应该把public class Student 中的public 放到 class School前并且把你...

香河县18561055656: UC和手机QQ2009用不了!
蔚非烟酸: 手机不支持

你可能想看的相关专题

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 星空见康网