今天早上启动项目时控制台输出下面信息(tomcat是tomcat6.0),之前项目没有出现这样的问题.

2013-5-11 11:34:31 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 java.library.path: D:\LSoft\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\bin;D:\LSoft\MyEclipse\apache-tomcat-6.0\bin
2013-5-11 11:34:31 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2013-5-11 11:34:31 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 223 ms
2013-5-11 11:34:31 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2013-5-11 11:34:31 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.29
2013-5-11 11:34:31 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor host-manager.xml
2013-5-11 11:34:31 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor manager.xml
2013-5-11 11:34:31 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2013-5-11 11:34:31 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory Test
2013-5-11 11:34:31 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2013-5-11 11:34:31 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2013-5-11 11:34:31 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/10  config=null
2013-5-11 11:34:31 org.apache.catalina.startup.Catalina start
信息: Server startup in 391 ms

访问项目时页面出现

项目中有上传下载的功能,所以在tomcat server.xml添加了
<Context path="/sll103111040" reloadable="true" docBase="D:\LSoft\MyEclipse\Workspaces\MyEclipse 10\sll103111040\WebRoot" workDir="D:\LSoft\MyEclipse\Workspaces\MyEclipse 10\sll103111040\WebRoot\upload" />
设置虚拟路径,不知道是不是和这个有关系
当使用myeclipse中自带tomcat时输出(tomcat中的server.xml)没修改
2013-5-11 13:40:07 org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\LSoft\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\bin;D:\LSoft\MyEclipse\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201109141806\tomcat\bin
2013-5-11 13:40:07 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2013-5-11 13:40:07 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 212 ms
2013-5-11 13:40:07 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2013-5-11 13:40:07 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.13
2013-5-11 13:40:07 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\LSoft\MyEclipse\Workspaces\MyEclipse 10\.metadata\.me_tcat\webapps\sll103111040\WEB-INF\lib\javax.servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2013-5-11 13:40:08 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2013-5-11 13:40:08 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2013-5-11 13:40:08 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/11  config=null
2013-5-11 13:40:08 org.apache.catalina.startup.Catalina start
信息: Server startup in 367 ms
定时器:1368250814159
outUpload
ok
程序可以运行。
这个问题和我以前设置虚拟路径没关系的。
问题是The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:
引用信息:Loaded APR based Apache Tomcat Native library 1.1.17
解决方法:
Myeclipse 10中的tomcat 需要apr是1.1.17版本的 tcnative-1.dll
一.找到apr目录:
D:\LSoft\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\bin;(在这调语句后The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path)

二.下载1.1.17版本的apr 
下载地址:( tcnative-1.dll 1.1.17版本)
http://download.csdn.net/download/angry_carnival/5343202
三.重启tomcat就可以了
运行成功会看到这条语句
Loaded Apache Tomcat Native library 1.1.17.
apr详解:(熟悉apr)
http://blog.chenlb.com/2009/01/install-apache-portable-runtime-or-tomcat-native-on-tomcat.html

tomcat 6.0也需要找到apr的目录:
D:\LSoft\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\bin;
tomcat 6.0x需要apr版本是tcnative-1.dll 1.1.19版本
apr下载地址:(使用1.1.20版本就可以了)
http://download.csdn.net/download/angry_carnival/5343202

tomcat 6.0.10 APR 配置指南
连接地址:
http://hi.baidu.com/lucene1853/item/2fdadb17e4498a27f7625c78

ubuntu10.04手动安装jdk1.6.0_24配置 
连接地址:
http://www.cnblogs.com/Jackeyzhang/archive/2011/05/18/2049755.html

如果安装了apr技术,可以看到以下结果:
信息: Loaded APR based Apache Tomcat Native library 1.1.14.2009-1-13 11:12:51 org.apache.catalina.core.AprLifecycleListener init信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 使用APR提高Tomcat性能Tomcat可以使用APR来提供超强的可伸缩性和性能,更好地集成本地服务器技术.

但是项目文件访问时出错是和我修改了tomcat中conf下server.xml有关。因为修改server.xml原因当访问项目文件时错误信息是不显示的。
解决方法:
1.将server.xml修改的部分剪切掉,保存server.xml.重启tomcat错误信息会显示。先看tomcat启动是否正常。让后再访问项目文件。我的tomcat启动正常,项目文件访问报404

2.这时你根据控制台输出寻找错误。我的错误是
D:\LSoft\MyEclipse\apache-tomcat-6.0\webapps\BS\WEB-INF\lib
原因:
\WEB-INF\lib\ 下已经存在这个jar包
解决方法:
将WEB-INF/lib下的 servlet-api.jar 删掉吧! tomcat自己有,不需要你提供! 
顺便看看其他的jar, 和 tomcat\lib 目录比较一下,tomcat已经有的,就别留着了!
tomcat 启动后先将tomcat/common/lib目录下的jar包全部读入内存,如果webapps目录里的应用程序中WEB-INF/lib目录下有相同的包,将无法加载,估计不同版本的包之间也会造成类似问题。因此建议尽量不要把jar包放入tomcat/common/lib目录下,应该放入WEB- INF/lib目录下。

纠结了两天。今天早上将server.xml恢复后发现了问题。其实以前遇到过一次这个问题。是别人帮忙修改的也没太在意。而且有很长一段时间用domino。现在是重拾tomcat,之前记录问题都是喜欢拿别人解决问题的方法修改变成自己笔记的。突然发现问题很严重,毕竟自己通过整理思路和寻求bug解决方案印象会很深刻的。所以还是自己动手做做笔记写写博客会很好的。有不懂的可以去参考前辈的方案

tomcat中服务启动时输出D:\LSoft\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\bin相关推荐

  1. MySQL服务启动时显示本地计算机上的MySQL服务启动后停止;mysql服务无法启动

    两个问题: (1) 关闭mysql服务后后再次启动,显示:MySQL服务启动时显示本地计算机上的MySQL服务启动后停止.某些服务在未由其它服务-: (2)cmd窗口输入 net start mysq ...

  2. 【疑难解决】EasyNVR启动时输出乱码是什么原因导致的,该如何解决?

    不管是在Windows还是Linux平台,在EasyNVR的正常启动中,exe程序跑通后,即可直接后台运行,无需过多操作,一般启动失败都会在exe文件中前台显示出现.我们偶尔也会收到EasyNVR启动 ...

  3. windows下rabbitmq以服务启动时提示发生系统错误 1068

    rabbitMQ在服务中启动时提示报错如下: ! 解决办法:在widows服务中将workstation这个服务由禁止改为自动,在启动服务,后rabbit服务可以正常启动了 原因:通过查看系统日志发现 ...

  4. 在Visual Studio中构建启动时申请管理员权限的程序(UAC支持)

    这几天写了几个修改注册表的程序,因为需要管理员权限,所以就搜了一下如何构建启动时申请管理员权限的程序(UAC支持,也就是程序左下角多了个小盾牌). 其实方法很简单,就是修改manifest文件中执行权 ...

  5. java中项目启动时加载_如何在项目启动时,加载或解析某配置文件

    在web项目中有很多时候需要在项目启动时就执行一些方法,而且只需要执行一次,比如:加载解析自定义的配置文件.初始化数据库信息等等,在项目启动时就直接执行一些方法,可以减少很多繁琐的操作. 在工作中遇到 ...

  6. Linux环境中ElasticSearch启动时常见错误、解决

    ● ES启动常见报错及解决措施 说明    文章基于ElasicSearch版本:7.3.2,Linux版本:CentOS-7.7.供其他版本参考. 启动报错  报错1-- [xpack.ml.ena ...

  7. 【笔记】sping.profiles.active指定服务启动时读取的配置文件

    创建测试项目 首先创建一个简单的springboot项目 application.yml配置文件默认指定一个配置文件 spring:profiles:active: test application- ...

  8. Dubbo服务启动时Caused by: com.alibaba.dubbo.remoting.RemotingException: Failed to bind NettyServer on /19

    严重: Exception sending context initialized event to listener instance of class [org.springframework.w ...

  9. linux查看apache端口,linux系统下Apache服务启动时80端口报错

    当我们在安装好Apache重启后,在终端启动Apache服务时候出现下面报错: 错误代码: httpd:httpd:Could not reliably determine the servers f ...

最新文章

  1. pytorch模型转onnx-量化rknn(bisenet)
  2. iphone XCode调试技巧之EXC_BAD_ACCESS中BUG解决
  3. STL的pair学习, map学习
  4. Halcon初学者知识 【11】自定义算子和应用实例
  5. idea怎么将本地文件和远程git对比_IntelliJ IDEA将文件和文件夹与本地版本进行比较...
  6. ibatis 高速缓存
  7. Java Array.sort的六种常用方法总结
  8. SlidingMenu的使用,结合Fragment(eclipse环境)
  9. linux用户名和密码6,Linux系统中(CentOS 7)的用户和权限管理
  10. Swift Basic 3
  11. c调用python函数_python - Linux C调用Python 函数
  12. 2月第3周业务风控关注|上海网信办复测23个被约谈APP 涉及1号店、小红书等
  13. spring boot 创建第一个
  14. 思维导图学习---数据库相关基础思维导图(2)
  15. 【搞船日记】【Shapr3D的STL格式转Gcode】
  16. Cortex-M3 (NXP LPC1788)之WDT窗口看门狗定时器
  17. Python:运行时隐藏窗口
  18. 网络七层协议与网络四层协议
  19. 思科模拟器 --- 路由器单臂路由配置
  20. 实时展示摄像头内容(go server + electron-vue client)

热门文章

  1. [区块链]回归初心——关于DAO的深度再思考
  2. 【RDMA】RDMA技术详解(二):Send Receive操作
  3. 我看过的书籍,推荐给你们
  4. 三星手机怎么上传文件到云服务器,三星Quick Share快传功能曝光,基于云端服务实现文件传输...
  5. 关于程序员的真相,你知道几个?
  6. Mr.张小白【免安装版MySQL的相关配置】
  7. 【Linux下Ubuntu查看电脑cpu和显卡型号信息】
  8. 多重背包模板 C++
  9. 恭己临四极,垂衣驭八荒——唐太宗李世民
  10. Linux系统中使用wget命令下载mysql并且安装,安装中有历史版本则先卸载删除历史版本数据,Linux系统中保姆级MySQL安装教程