NoClassDefFoundError: org.slf4j.LoggerFactory is a restricted class

大城市里の小女人 提交于 2019-12-11 08:25:15

问题


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


回答1:


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

Archived JDK downloads



来源:https://stackoverflow.com/questions/18490366/noclassdeffounderror-org-slf4j-loggerfactory-is-a-restricted-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!