NoClassDefFoundError:org.slf4j.LoggerFactory是一个受限制的类 [英] NoClassDefFoundError: org.slf4j.LoggerFactory is a restricted class

查看:282
本文介绍了NoClassDefFoundError:org.slf4j.LoggerFactory是一个受限制的类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



到目前为止,我还没有遇到任何问题,但现在每当我尝试运行开发服务器我得到一个 NoClassDefFoundError:org.slf4j.LoggerFactory是一个受限制的类



以下是控制台日志的摘录:

  ... 
INFO cgadDevAppServerRunner - 警告:失败JettyContainerService $ ApiProxyHandler @ 4e4ad8a3:java.lang.NoClassDefFoundError:org.slf4j。 LoggerFactory是一个受限制的类。有关更多详细信息,请参阅Google App Engine开发人员指南。
INFO cgadDevAppServerRunner - ago 28,2013 1:36:53 PM com.google.apphosting.utils.jetty.JettyLogger警告
INFO cgadDevAppServerRunner - 警告:错误启动处理程序
INFO cgadDevAppServerRunner - java.lang.NoClassDefFoundError:org.slf4j.LoggerFactory是一个受限制的类。有关更多详细信息,请参阅Google App Engine开发人员指南。
INFO cgadDevAppServerRunner - 位于com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
INFO cgadDevAppServerRunner - 位于com.starchu.guice.jsf。 core.GuiceJSFConfigurer。< clinit>(GuiceJSFConfigurer.java)
INFO cgadDevAppServerRunner - at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
INFO cgadDevAppServerRunner - at sun.reflect.NativeConstructorAccessorImpl.newInstance NativeConstructorAccessorImpl.java:57)
INFO cgadDevAppServerRunner - at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
...

我试图做一个maven clean并且再次构建所有东西,但是我没有运气。

为什么会这样上课受限制?我怎么才能找出原因?

我使用的是JDK 1.7.0_25,maven 3.1.0,GAE SDK 1.8.3,lombok 0.12.0,slf4j-jdk14 -1.7.5

解决方案

我遇到过类似的问题,并将其恢复为JDK 1.7.0_21来解决它们。



存档的JDK下载


I am using maven for building a GAE/J web application.

Until now I haven't had any problems but now whenever I try to run the development server I get a NoClassDefFoundError: org.slf4j.LoggerFactory is a restricted class.

Here is an extract of the console log:

...
INFO  c.g.a.d.DevAppServerRunner - WARNING: failed JettyContainerService$ApiProxyHandler@4e4ad8a3: java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory is a restricted class. Please see the Google  App Engine developer's guide for more details.
INFO  c.g.a.d.DevAppServerRunner - ago 28, 2013 1:36:53 PM com.google.apphosting.utils.jetty.JettyLogger warn
INFO  c.g.a.d.DevAppServerRunner - WARNING: Error starting handlers
INFO  c.g.a.d.DevAppServerRunner - java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory is a restricted class. Please see the Google  App Engine developer's guide for more details.
INFO  c.g.a.d.DevAppServerRunner -         at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
INFO  c.g.a.d.DevAppServerRunner -         at com.starchu.guice.jsf.core.GuiceJSFConfigurer.<clinit>(GuiceJSFConfigurer.java)
INFO  c.g.a.d.DevAppServerRunner -         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
INFO  c.g.a.d.DevAppServerRunner -         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
INFO  c.g.a.d.DevAppServerRunner -         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
...

I tried to do a maven clean and build everything again but I had no luck.

Why would this class be "restricted"? How can I find out the cause?

I am using JDK 1.7.0_25, maven 3.1.0, GAE SDK 1.8.3, lombok 0.12.0, slf4j-jdk14-1.7.5

解决方案

I had similar issues and reverted to JDK 1.7.0_21 to solve them.

Archived JDK downloads

这篇关于NoClassDefFoundError:org.slf4j.LoggerFactory是一个受限制的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆