- 浏览: 2004836 次
- 性别:
- 来自: 深圳
文章分类
最新评论
-
蕃薯耀:
Java获取weblogic当前服务器名称Java weblo ...
Java获取weblogic当前服务器名称,Java weblogic 集群节点名称 -
蕃薯耀:
Eclipse创建Maven项目web.xml文件版本问题解决 ...
Eclipse创建Maven项目web.xml文件、JDK版本问题解决 -
蕃薯耀:
shiro ehcache缺少配置报错shiro ehcach ...
shiro ehcache缺少配置报错 -
蕃薯耀:
Apache Shiro1.4.1报错Object named ...
Apache Shiro1.4.1报错Object named 'filterChainResolver' -
蕃薯耀:
Eclipse优化Eclipse调优Eclipse 卡解决方案 ...
Eclipse优化,Eclipse调优,Eclipse 卡解决方案
org.apache.catalina.core.DefaultInstanceManager cannot be cast to 【蕃薯耀】
org.apache.jasper.JasperException: java.lang.ClassCastException: org.apache.catalina.core.DefaultInstanceManager cannot be cast to org.apache.tomcat.InstanceManager
-------------------------------------------------------------------------------------------------------------------------------
页面错误:
HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: java.lang.ClassCastException: org.apache.catalina.core.DefaultInstanceManager cannot be cast to org.apache.tomcat.InstanceManager org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:168) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:356) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) root cause java.lang.ClassCastException: org.apache.catalina.core.DefaultInstanceManager cannot be cast to org.apache.tomcat.InstanceManager org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(InstanceManagerFactory.java:32) org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:161) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:356) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) note The full stack trace of the root cause is available in the Apache Tomcat/7.0.11 logs. Apache Tomcat/7.0.11
Java控制台错误:
严重: Servlet.service() for servlet [jsp] in context with path [/servlet3] threw exception [java.lang.ClassCastException: org.apache.catalina.core.DefaultInstanceManager cannot be cast to org.apache.tomcat.InstanceManager] with root cause java.lang.ClassCastException: org.apache.catalina.core.DefaultInstanceManager cannot be cast to org.apache.tomcat.InstanceManager at org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(InstanceManagerFactory.java:32) at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:161) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:356) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:284) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:322) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1714) 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)
原因:
当项目中引用tomcat目录下面的lib下面的catalina.jar的时候,用myeclipse将项目部署到tomcat下面的时候,会将 catalina.jar包加到项目的web-inf下面的lib文件夹下面,这样这个包就会和tomcat下面的lib下面的catalina.jar 包冲突会报java.lang.ClassCastException: org.apache.catalina.util.DefaultAnnotationProcessor错误
解决方法:
修改了tomcat里的context.xml文件,
在context 元素下添加<Loader delegate="true" />
如下面所示:
<Context>
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
<!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
<!--
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
-->
<Loader delegate="true" />
</Context>
网上还有另一种解决方法:
将项目部署到tomcat下面后,将项目的web-inf/lib下面的catalina.jar删掉,然后在重启tomcat。
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
蕃薯耀 2012年9月29日 01:23:28 星期六
发表评论
-
Linux Nacos 集群安装,springCloud Nacos Linux 安装和集群配置
2021-03-26 10:03 895Linux Nacos 集群安装,springCloud N ... -
SpringCloud Nacos使用和配置,SpringCloud Nacos 服务注册中心配置使用
2021-03-26 09:22 1070SpringCloud Nacos使用 ... -
Nacos longPolling error,Nacos1.4.1服务配置文件更新一次后报错
2021-03-24 11:39 1408Nacos longPolling error,Nacos ... -
Windows Mysql5.7安装和配置,Windows 安装多个Mysql
2021-03-19 10:33 684Windows 安装Mysql5.7,Windows ... -
SpringCloud Gateway使用和配置,SpringCloud Gateway predicates详细配置
2021-03-18 11:29 1031SpringCloud Gateway使用和配置, Sp ... -
Windows RabbitMQ_3.8 安装和配置,Windows erlang下载
2021-03-16 17:17 904Windows RabbitMQ_3.8 安装和配置,Wi ... -
SpringCloud Hystrix dashboard2.2.7使用和配置,SpringCloud Hystrix dashboard服务监控
2021-03-15 18:53 845SpringCloud Hystrix dashboard ... -
SpringCloud Hystrix使用和配置,SpringCloud Hystrix服务熔断降级
2021-03-15 18:51 534SpringCloud Hystrix使用和配置,Sprin ... -
SpringCloud OpenFeign使用和配置,Java OpenFeign 使用教程
2021-03-11 09:36 562SpringCloud OpenFeign使用和配置,Jav ... -
Iframe自适应高度,Iframe高度问题解决
2021-03-11 09:34 557Iframe自适应高度,Iframe高度问题解决 ... -
Iframe自适应高度,Iframe高度问题解决
2021-03-11 09:33 1Iframe自适应高度,Iframe高度问题解决 = ... -
SpringCloud Ribbon实现负载均衡,SpringCloud Ribbon自定义策略
2021-03-09 09:47 595SpringCloud Ribbon实现负载均衡,Spri ... -
springCloud zookeeper整合,Java Zookeeper微服务整合
2021-03-08 10:32 549springCloud zookeeper整合,Java ... -
SpringCloud Eureka安装和使用,SpringCloud使用Eureka作为服务注册中心
2021-03-08 10:05 565SpringCloud Eureka安装和使用,Sp ... -
Linux 安装Consul,Linux yum安装consul
2021-03-05 15:04 756Linux 安装Consul,Linux yum安装con ... -
SpringCloud consul安装和使用,Windows Consul安装和使用,Java consul服务中心安装和使用
2021-03-05 14:58 452============================= ... -
哔哩哔哩视频下载,哔哩哔哩动画下载,blibli视频下载电脑
2021-02-26 11:38 633哔哩哔哩视频下载,哔哩哔哩动画下载,blibli视频下载电 ... -
elasticsearch kibana安装和配置
2021-02-20 17:19 663elasticsearch kibana安装和配置 ... -
elasticsearch安装和配置,elasticsearch启动报错:can not run elasticsearch as root
2021-02-20 17:17 749elasticsearch安装和配置 elasticsea ... -
Mybatis Map保存到数据库,Mybatis Map动态同步表,Mybatis Map Foreach插入数据库
2021-01-29 10:30 773Mybatis Map保存到数据库 ...
相关推荐
问题1:TOMCAT下载文件出错:org.apache.catalina.connector.ClientAbortException. 问题2:TOMCAT记录接收数据大小、发送数据大小和请求处理时间
org.apache.catalina.core.AprLifecycleListener myeclipse tomcat 無法啟動 用這個文件
2010-8-11 18:24:13 org.apache.catalina.core.AprLifecycleListener lifecycleEvent 信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the ...
jar包,官方版本,自测可用
3月 17, 2019 10:51:41 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server version: Apache Tomcat/7.0.78 3月 17, 2019 10:51:41 上午 org.apache.catalina.startup.VersionLoggerListener...
严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Error-附件资源
jar包,官方版本,自测可用
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) ...
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at ...
nginx过滤器不推荐使用 org.apache.catalina.valves.RemoteIpValve 代替。 此项目将永远不会再更新。 ============ java web应用的过滤器,通常可以配置全局服务器。 <filter> <filter>NginxFilter</filter> ...
2009-8-29 14:02:04 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the ...
apache-tomcat-8.5.78 源码 maven 版本,配置都已经搞定,开箱即用。是学习tomcat的不二之选。启动类 org.apache.catalina.startup.Bootstrap
这个过程由Apache Tomcat服务器执行,一个流行的Java Servlet容器。然而,部署过程中遇到了问题,特别是与`blog`应用程序相关的错误。 错误发生在尝试配置应用程序监听器时,监听器类为`org.springframework.web....
1. **下载CorsFilter**:根据描述,你需要的文件是"tomcat跨域jar文包件",这个文件通常包含`org.apache.catalina.filters.CorsFilter`类,这是Tomcat自带的CORS过滤器实现。你可以从Apache Tomcat的官方网站或者第...
org.apache.catalina org.apache.commons org.apache.coyote org.apache.ibatis org.apache.juli 4号包: org.apache.tiles org.apache.velocity org.apache.xerces org.apache.xml org.apache.xmlbeans org.apache....
org.apache.catalina org.apache.commons org.apache.coyote org.apache.ibatis org.apache.juli 4号包: org.apache.tiles org.apache.velocity org.apache.xerces org.apache.xml org.apache.xmlbeans org.apache....
1.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 1.org.apache.juli.FileHandler.prefix = catalina. java.util.logging.ConsoleHandler.level = OFF ``` 这里我们关闭了JULI(Tomcat的默认日志...
org.apache.catalina org.apache.commons org.apache.coyote org.apache.ibatis org.apache.juli 4号包: org.apache.tiles org.apache.velocity org.apache.xerces org.apache.xml org.apache.xmlbeans org.apache....
org.apache.catalina org.apache.commons org.apache.coyote org.apache.ibatis org.apache.juli 4号包: org.apache.tiles org.apache.velocity org.apache.xerces org.apache.xml org.apache.xmlbeans org.apache....