1、錯誤描述
usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } 2014-6-16 23:48:52 org.apache.catalina.core.AprLifecycleListener init 信息: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.4.8. 2014-6-16 23:48:52 org.apache.catalina.core.AprLifecycleListener init 信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 2014-6-16 23:48:53 org.apache.catalina.core.AprLifecycleListener initializeSSL 信息: OpenSSL successfully initialized (OpenSSL 1.0.1e 11 Feb 2013) 2014-6-16 23:48:54 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["http-apr-8686"] 2014-6-16 23:48:54 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["ajp-apr-8009"] 2014-6-16 23:48:54 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 3240 ms 2014-6-16 23:48:54 org.apache.catalina.core.StandardService startInternal 信息: Starting service Catalina 2014-6-16 23:48:54 org.apache.catalina.core.StandardEngine startInternal 信息: Starting Servlet Engine: Apache Tomcat/7.0.53 2014-6-16 23:48:56 org.apache.tomcat.websocket.server.WsSci onStartup 信息: JSR 356 WebSocket (Java WebSocket 1.0) support is not available when running on Java 6. To suppress this message, run Tomcat on Java 7, remove the WebSocket JARs from $CATALINA_HOME/lib or add the WebSocketJARs to the tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA_BASE/conf/catalina.properties. Note that the deprecated Tomcat 7 WebSocket API will be available. 2014-6-16 23:48:57 org.apache.catalina.util.SessionIdGenerator createSecureRandom 信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [343] milliseconds. 2014-6-16 23:48:58 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\docs 2014-6-16 23:48:58 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\examples 2014-6-16 23:48:59 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: contextInitialized() 2014-6-16 23:48:59 org.apache.catalina.core.ApplicationContext log 信息: SessionListener: contextInitialized() 2014-6-16 23:48:59 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@5f1ba8') 2014-6-16 23:48:59 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\host-manager 2014-6-16 23:48:59 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\manager 2014-6-16 23:48:59 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\ROOT 2014-6-16 23:48:59 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\StudentSystem 2014-6-16 23:49:01 com.sun.faces.config.ConfigureListener contextInitialized 信息: 初始化上下文 '/StudentSystem' 的 Mojarra 2.0.3 (FCS b03) 2014-6-16 23:49:02 com.sun.faces.spi.InjectionProviderFactory createInstance 信息: JSF1048:有 PostConstruct/PreDestroy 注釋。標有這些注釋的 ManagedBeans 方法將表示注釋已處理。 2014-6-16 23:49:03 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Parsing configuration file [struts-default.xml] 2014-6-16 23:49:03 com.opensymphony.xwork2.util.logging.jdk.JdkLogger error 嚴重: Dispatcher initialization failed Unable to load configuration. - bean - jar:file:/D:/MyEclipse/apache-tomcat-7.0.53/webapps/StudentSystem/WEB-INF/lib/struts2-core-2.3.16.3.jar!/struts-default.xml:69:87 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489) at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: Unable to load bean: type: class:org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader - bean - jar:file:/D:/MyEclipse/apache-tomcat-7.0.53/webapps/StudentSystem/WEB-INF/lib/struts2-core-2.3.16.3.jar!/struts-default.xml:69:87 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245) at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:234) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) ... 20 more Caused by: java.lang.NoClassDefFoundError: freemarker/cache/TemplateLoader at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2957) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:144) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216) ... 23 more Caused by: java.lang.ClassNotFoundException: freemarker.cache.TemplateLoader at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 32 more 2014-6-16 23:49:03 org.apache.catalina.core.StandardContext filterStart 嚴重: Exception starting filter struts2 Unable to load configuration. - bean - jar:file:/D:/MyEclipse/apache-tomcat-7.0.53/webapps/StudentSystem/WEB-INF/lib/struts2-core-2.3.16.3.jar!/struts-default.xml:69:87 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501) at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) at org.apache.catalina.core.ApplicationFilterConfig. (ApplicationFilterConfig.java:105) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: Unable to load configuration. - bean - jar:file:/D:/MyEclipse/apache-tomcat-7.0.53/webapps/StudentSystem/WEB-INF/lib/struts2-core-2.3.16.3.jar!/struts-default.xml:69:87 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489) ... 18 more Caused by: Unable to load bean: type: class:org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader - bean - jar:file:/D:/MyEclipse/apache-tomcat-7.0.53/webapps/StudentSystem/WEB-INF/lib/struts2-core-2.3.16.3.jar!/struts-default.xml:69:87 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245) at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:234) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) ... 20 more Caused by: java.lang.NoClassDefFoundError: freemarker/cache/TemplateLoader at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2957) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:144) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216) ... 23 more Caused by: java.lang.ClassNotFoundException: freemarker.cache.TemplateLoader at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 32 more 2014-6-16 23:49:03 org.apache.catalina.core.StandardContext startInternal 嚴重: Error filterStart 2014-6-16 23:49:03 org.apach e.catalina.core.StandardContext startInternal 嚴重: Context [/StudentSystem] startup failed due to previous errors 2014-6-16 23:49:03 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 嚴重: The web application [/StudentSystem] created a ThreadLocal with key of type [com.sun.faces.util.Util$1] (value [com.sun.faces.util.Util$1@5f634c]) and a value of type [java.util.HashMap] (value [{com.sun.faces.patternCache={ = }}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 2014-6-16 23:49:03 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["http-apr-8686"] 2014-6-16 23:49:03 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["ajp-apr-8009"] 2014-6-16 23:49:03 org.apache.catalina.startup.Catalina start 信息: Server startup in 9114 ms
2、錯誤原因
缺少freemarker-2.3.19.jar
3、解決辦法
導入freemarker-2.3.19.jar