NoClassDefFoundError:org.slf4j.LoggerFactory是一个受限制的类

时间:2013-08-28 14:10:39

标签: java google-app-engine maven-3 slf4j lombok

我正在使用maven构建GAE / J Web应用程序。

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

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

...
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)
...

我试着做一个maven清理并再次构建一切,但我没有运气。

为什么这门课程会受到“限制”?我怎样才能找出原因?

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

1 个答案:

答案 0 :(得分:1)

我有类似的问题,并回到JDK 1.7.0_21来解决它们。

Archived JDK downloads