好久前就打算学习下Java,一直没有行动,乱乱的,今天在老师的提点下,终于决定动下手了,结果一动手就弄出了这个所谓的 Windows XP下 Tomcat无法启动的问题(Ubuntu不适合做服务器的说).
O.o 各种不爽
环境
Windows XP Service Pack 2
java version "1.6.0_04"
Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)
Tomcat 6
本来以为是要重新启动的,谁知道重新启动后还是没反应,让我彻底郁闷了,无奈之下打开了日志.
[2008-03-07 18:18:35] [info] Service Tomcat6 name Apache Tomcat
[2008-03-07 18:18:36] [info] Service Tomcat6 installed
[2008-03-07 18:18:36] [info] Procrun finished.
[2008-03-07 18:18:36] [info] Updating service...
[2008-03-07 18:18:36] [info] Service Tomcat6 updated
[2008-03-07 18:18:36] [info] Update service finished.
[2008-03-07 18:18:36] [info] Procrun finished.
[2008-03-07 18:18:58] [info] Updating service...
[2008-03-07 18:18:58] [info] Service Tomcat6 updated
[2008-03-07 18:18:58] [info] Update service finished.
[2008-03-07 18:18:58] [info] Procrun finished.
[2008-03-07 18:18:59] [info] Updating service...
[2008-03-07 18:18:59] [info] Service Tomcat6 updated
[2008-03-07 18:18:59] [info] Update service finished.
[2008-03-07 18:18:59] [info] Procrun finished.
[2008-03-07 18:19:49] [info] Running Service...
[2008-03-07 18:19:49] [info] Starting service...
[2008-03-07 18:19:49] [173 javajni.c] [error] 找不到指定的模块。
[2008-03-07 18:19:49] [924 prunsrv.c] [error] Failed creating java C:\jre1.6.0_04\bin\client\jvm.dll
[2008-03-07 18:19:49] [1179 prunsrv.c] [error] ServiceStart returned 1
[2008-03-07 18:19:49] [info] Run service finished.
[2008-03-07 18:19:49] [info] Procrun finished.
[2008-03-07 18:29:55] [173 javajni.c] [error] 找不到指定的模块。
[2008-03-07 18:29:55] [924 prunsrv.c] [error] Failed creating java C:\jre1.6.0_04\bin\client\jvm.dll
[2008-03-07 18:29:55] [1179 prunsrv.c] [error] ServiceStart returned 1
[2008-03-07 18:30:03] [173 javajni.c] [error] 找不到指定的模块。
[2008-03-07 18:30:03] [924 prunsrv.c] [error] Failed creating java C:\jre1.6.0_04\bin\client\jvm.dll
[2008-03-07 18:30:03] [1179 prunsrv.c] [error] ServiceStart returned 1
[2008-03-07 18:30:38] [173 javajni.c] [error] 找不到指定的模块。
[2008-03-07 18:30:38] [924 prunsrv.c] [error] Failed creating java C:\jre1.6.0_04\bin\client\jvm.dll
[2008-03-07 18:30:38] [1179 prunsrv.c] [error] ServiceStart returned 1
[2008-03-07 18:31:15] [173 javajni.c] [error] 找不到指定的模块。
[2008-03-07 18:31:15] [924 prunsrv.c] [error] Failed creating java C:\jre1.6.0_04\bin\client\jvm.dll
[2008-03-07 18:31:15] [1179 prunsrv.c] [error] ServiceStart returned 1
[2008-03-07 18:33:08] [173 javajni.c] [error] 找不到指定的模块。
[2008-03-07 18:33:08] [924 prunsrv.c] [error] Failed creating java C:\jre1.6.0_04\bin\client\jvm.dll
[2008-03-07 18:33:08] [1179 prunsrv.c] [error] ServiceStart returned 1
[2008-03-07 18:33:24] [173 javajni.c] [error] 找不到指定的模块。
[2008-03-07 18:33:24] [924 prunsrv.c] [error] Failed creating java C:\jre1.6.0_04\bin\client\jvm.dll
[2008-03-07 18:33:24] [1179 prunsrv.c] [error] ServiceStart returned 1
[2008-03-07 18:33:37] [173 javajni.c] [error] 找不到指定的模块。
[2008-03-07 18:33:37] [924 prunsrv.c] [error] Failed creating java C:\jre1.6.0_04\bin\client\jvm.dll
[2008-03-07 18:33:37] [1179 prunsrv.c] [error] ServiceStart returned 1
看上去实在是n复杂,按日志的提示检查了下JRE环境配置和环境变量,一切正常,
这次彻底郁闷了.
仔细看看日志, 还有句找不到指定的模块, 晕了,是不是缺少什么dll之类的.
用Filemon监控下吧,日志如下
630 12:20:40 tomcat6.exe:13092 QUERY INFORMATION C:\WINDOWS\system32\MSVCR71.dll NOT FOUND Attributes: Error
631 12:20:40 tomcat6.exe:13092 QUERY INFORMATION C:\WINDOWS\system\MSVCR71.dll NOT FOUND Attributes: Error
632 12:20:40 tomcat6.exe:13092 QUERY INFORMATION C:\WINDOWS\MSVCR71.dll NOT FOUND Attributes: Error
633 12:20:40 tomcat6.exe:13092 QUERY INFORMATION D:\Tomcat\MSVCR71.dll NOT FOUND Attributes: Error
634 12:20:40 tomcat6.exe:13092 QUERY INFORMATION C:\WINDOWS\system32\MSVCR71.dll NOT FOUND Attributes: Error
635 12:20:40 tomcat6.exe:13092 QUERY INFORMATION C:\WINDOWS\MSVCR71.dll NOT FOUND Attributes: Error
636 12:20:40 tomcat6.exe:13092 QUERY INFORMATION C:\WINDOWS\System32\Wbem\MSVCR71.dll NOT FOUND Attributes: Error
607 12:20:40 tomcat6.exe:13092 QUERY INFORMATION D:\J2SDK\MSVCR71.dll NOT FOUND Attributes: Error
果然,这个MSVCR71.dll(VC7运行库)在捣鬼,唉,没办法,买不起VS200X,现在还在用DevCPP环境,自然出了这么个问题,好在这是个公共库,google一个,放到%system%再次启动,ok,问题解决了.
传说中的TomCat终于出现了.
为了防止误导大家,又google了一下,看来sun社区的高手们也是这么解决的,呵呵,附上一个引用吧.
Re: Can't register Tomcat as Windows service on some computers, under Java6
2007-2-12 ??5:46 (reply 4 of 26)
After a few months I've found solution of this problem:
When I run tomcat5.exe under Sysinternals File Monitor, I see that Tomcat can't find msvcr71.dll. Some computers have it, and some not. When I copy this file to /system32 directory, everything works well.
Probably some part of JRE 1.6 uses this DLL, but it isn't included in JRE installation package.
网址:
阅读(3979) | 评论(0) | 转发(0) |