简体   繁体   中英

Logging.LogFactory error in google web application engine project developmenter

I am using the google web application engine and develop a project. I meet with a problem of runtime error like that:

Apr 28, 2011 10:28:36 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Error starting handlers
java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory is a restricted class. Please see the Google  App Engine developer's guide for more details.
    at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
    at org.springframework.web.context.ContextLoader.<clinit>(ContextLoader.java:146)
    at org.springframework.web.context.ContextLoaderListener.createContextLoader(ContextLoaderListener.java:53)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:44)
    at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:224)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:185)
    at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:147)
    at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:219)
    at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
    at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
    at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113)
    at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
Apr 28, 2011 10:28:36 AM com.google.apphosting.utils.jetty.JettyLogger debug

How can I get the solution for this?

Here is my logging.properties...

A default java.util.logging configuration.

(All App Engine logging is through java.util.logging by default).

#

To use this configuration, copy it into your application's WEB-INF

folder and add the following to your appengine-web.xml:

#

Set the default logging level for all loggers to WARNING

.level = ALL handlers = java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level=ALL java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

Set the default logging level for ORM, specifically, to WARNING

DataNucleus.JDO.level=WARNING DataNucleus.Persistence.level=WARNING DataNucleus.Cache.level=WARNING DataNucleus.MetaData.level=WARNING DataNucleus.General.level=WARNING DataNucleus.Utility.level=WARNING DataNucleus.Transaction.level=WARNING DataNucleus.Datastore.level=WARNING DataNucleus.ClassLoading.level=WARNING DataNucleus.Plugin.level=WARNING DataNucleus.ValueGeneration.level=WARNING DataNucleus.Enhancer.level=WARNING DataNucleus.SchemaTool.level=WARNING java.sql.level=INFO

It is possible you're missing commons-logging-xxx.jar in your build path

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM