我正在使用 maven 构建 GAE/J Web 应用程序。
到目前为止,我还没有遇到任何问题,但是现在每当我尝试运行开发服务器时,我都会收到NoClassDefFoundError: org.slf4j.LoggerFactory is a restricted class。
这是控制台日志的摘录:
...
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 clean 并重新构建所有东西,但我没有运气。
为什么这个类会被“限制”?我怎样才能找出原因?
我正在使用 JDK 1.7.0_25、maven 3.1.0、GAE SDK 1.8.3、lombok 0.12.0、slf4j-jdk14-1.7.5