启动tomcat后报错
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server.服务器版本: Apache Tomcat/9.0.41
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 服务器构建: Dec 3 2020 11:43:00 UTC
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 服务器版本号: 9.0.41.0
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 操作系统名称: Windows 10
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS.版本: 10.0
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 架构: amd64
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java 环境变量: E:\jdk-15.0.2
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java虚拟机版本: 15.0.2+7-27
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM.供应商: Oracle Corporation
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: E:\apache-tomcat-9.0.41
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: E:\apache-tomcat-9.0.41
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 命令行参数: -XX:+ShowCodeDetailsInExceptionMessages
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 命令行参数: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:63797
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 命令行参数: -javaagent:E:\eclipse\configuration\org.eclipse.osgi\405\0\.cp\lib\javaagent-shaded.jar
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 命令行参数: -Dcatalina.base=E:\apache-tomcat-9.0.41
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 命令行参数: -Dcatalina.home=E:\apache-tomcat-9.0.41
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 命令行参数: -Dwtp.deploy=E:\apache-tomcat-9.0.41\webapps
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: 命令行参数: -Dfile.encoding=UTF-8
2月 21, 2021 8:54:48 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: 使用APR版本[1.7.0]加载了基于APR的Apache Tomcat本机库[1.2.25]。
2月 21, 2021 8:54:48 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR功能:IPv6[true]、sendfile[true]、accept filters[false]、random[true]。
2月 21, 2021 8:54:48 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR/OpenSSL配置:useAprConnector[false],useOpenSSL[true]
2月 21, 2021 8:54:48 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL成功初始化 [OpenSSL 1.1.1g 21 Apr 2020]
2月 21, 2021 8:54:48 下午 org.apache.coyote.AbstractProtocol init
信息: 初始化协议处理器 ["http-nio-8080"]
2月 21, 2021 8:54:48 下午 org.apache.catalina.startup.Catalina load
信息: 服务器在[788]毫秒内初始化
2月 21, 2021 8:54:48 下午 org.apache.catalina.core.StandardService startInternal
信息: 正在启动服务[Catalina]
2月 21, 2021 8:54:48 下午 org.apache.catalina.core.StandardEngine startInternal
信息: 正在启动 Servlet 引擎:[Apache Tomcat/9.0.41]
2月 21, 2021 8:54:48 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
2月 21, 2021 8:54:49 下午 org.apache.catalina.core.StandardContext listenerStart
严重: 异常将上下文初始化事件发送到类的侦听器实例.[com.imooc.library.listenter.InitListener]
java.lang.NoClassDefFoundError: org/jaxen/JaxenException
at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:222)
at org.dom4j.tree.AbstractNode.createXPath(AbstractNode.java:202)
at org.dom4j.tree.AbstractNode.selectNodes(AbstractNode.java:159)
at com.imooc.library.utils.XmlDataSource.reloadUser(XmlDataSource.java:46)
at com.imooc.library.utils.XmlDataSource.<clinit>(XmlDataSource.java:35)
at com.imooc.library.listenter.InitListener.contextInitialized(InitListener.java:20)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4716)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5177)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
Caused by: java.lang.ClassNotFoundException: org.jaxen.JaxenException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
... 36 more
2月 21, 2021 8:54:49 下午 org.apache.catalina.core.StandardContext startInternal
严重: 一个或多个listeners启动失败,更多详细信息查看对应的容器日志文件
2月 21, 2021 8:54:49 下午 org.apache.catalina.core.StandardContext startInternal
严重: 由于之前的错误,Context[]启动失败
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/E:/apache-tomcat-9.0.41/lib/catalina.jar) to field java.io.ObjectStreamClass$Caches.localDescs
WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2月 21, 2021 8:54:49 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: 把web 应用程序部署到目录 [E:\apache-tomcat-9.0.41\webapps\docs]
2月 21, 2021 8:54:49 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
2月 21, 2021 8:54:49 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Web应用程序目录[E:\apache-tomcat-9.0.41\webapps\docs]的部署已在[138]毫秒内完成
2月 21, 2021 8:54:49 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: 把web 应用程序部署到目录 [E:\apache-tomcat-9.0.41\webapps\library]
2月 21, 2021 8:54:49 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
2月 21, 2021 8:54:49 下午 org.apache.catalina.core.StandardContext listenerStart
严重: 异常将上下文初始化事件发送到类的侦听器实例.[com.imooc.library.listenter.InitListener]
java.lang.NoClassDefFoundError: org/jaxen/JaxenException
at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:222)
at org.dom4j.tree.AbstractNode.createXPath(AbstractNode.java:202)
at org.dom4j.tree.AbstractNode.selectNodes(AbstractNode.java:159)
at com.imooc.library.utils.XmlDataSource.reloadUser(XmlDataSource.java:46)
at com.imooc.library.utils.XmlDataSource.<clinit>(XmlDataSource.java:35)
at com.imooc.library.listenter.InitListener.contextInitialized(InitListener.java:20)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4716)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5177)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1133)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1866)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1045)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:429)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
Caused by: java.lang.ClassNotFoundException: org.jaxen.JaxenException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
... 47 more
2月 21, 2021 8:54:49 下午 org.apache.catalina.core.StandardContext startInternal
严重: 一个或多个listeners启动失败,更多详细信息查看对应的容器日志文件
2月 21, 2021 8:54:49 下午 org.apache.catalina.core.StandardContext startInternal
严重: 由于之前的错误,Context[/library]启动失败
2月 21, 2021 8:54:49 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Web应用程序目录[E:\apache-tomcat-9.0.41\webapps\library]的部署已在[167]毫秒内完成
2月 21, 2021 8:54:49 下午 org.apache.coyote.AbstractProtocol start
信息: 开始协议处理句柄["http-nio-8080"]
2月 21, 2021 8:54:49 下午 org.apache.catalina.startup.Catalina start
信息: [929]毫秒后服务器启动
===========================================================
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>library</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<listener>
<listener-class>com.imooc.library.listenter.InitListener</listener-class>
</listener>
<filter>
<filter-name>first</filter-name>
<filter-class>com.imooc.library.filter.AuthFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>first</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>two</filter-name>
<filter-class>com.imooc.library.filter.EncodeFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>two</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
package com.imooc.library.listenter;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import com.imooc.library.utils.XmlDataSource;
public class InitListener implements ServletContextListener{
@Override
public void contextInitialized(ServletContextEvent sce) {
sce.getServletContext().setAttribute("userList", XmlDataSource.getUsers());
sce.getServletContext().setAttribute("category", XmlDataSource.getCategory());
sce.getServletContext().setAttribute("bookList", XmlDataSource.getBooks());
}
}
老师是我配置文件错了吗?还是那出现问题了?
正在回答
同学你好,报错提示找不到org.jaxen.JaxenException类,如:
问一下同学是否有导入jaxen的jar包,如果没有,导入jaxen的jar包再试试。在《XML入门》课程的源码包中有jaxen的jar包。
祝学习愉快~
- 参与学习 人
- 提交作业 9393 份
- 解答问题 16556 个
综合就业常年第一,编程排行常年霸榜,无需脱产即可学习,北上广深月薪过万 无论你是未就业的学生还是想转行的在职人员,不需要基础,只要你有梦想,想高薪
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星