你好,欢迎来到电脑编程技巧与维护杂志社! 杂志社简介广告服务读者反馈编程社区  
合订本订阅
 
 
您的位置:技术专栏 / Java专栏
tomcat在Vista下不正常解决方案
 

tomcat在Vista下不正常!

警告: Unexpected exception resolving reference
java.io.FileNotFoundException: C:Program Filestomcat6conftomcat-users.xml.new (拒绝访问。)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream. <init>(FileOutputStream.java:179)
at java.io.FileOutputStream. <init>(FileOutputStream.java:131)
at org.Apache.catalina.users.MemoryUserDatabase.save(MemoryUserDatabase.java:521)
at org.Apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance(MemoryUserDatabaseFactory.java:104)
at org.Apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:140)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.Apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.Apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.Apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:113)
at org.Apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
at org.Apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:137)
at org.Apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:109)
at org.Apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:81)
at org.Apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.Apache.catalina.core.StandardServer.start(StandardServer.java:703)
at org.Apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.Apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.Apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

严重: Exception looking up UserDatabase under key UserDatabase
javax.naming.NamingException: C:Program Filestomcat6conftomcat-users.xml.new (拒绝访问。)
at org.Apache.naming.NamingContext.lookup(NamingContext.java:805)
at org.Apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.Apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:253)
at org.Apache.catalina.core.ContainerBase.start(ContainerBase.java:1037)
at org.Apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.Apache.catalina.core.StandardService.start(StandardService.java:516)
at org.Apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.Apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.Apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.Apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2008-10-30 13:04:17 org.Apache.catalina.startup.Catalina start
严重: Catalina.start:
LifecycleException:  No UserDatabase component found under key UserDatabase
at org.Apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:261)
at org.Apache.catalina.core.ContainerBase.start(ContainerBase.java:1037)
at org.Apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.Apache.catalina.core.StandardService.start(StandardService.java:516)
at org.Apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.Apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.Apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.Apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2008-10-30 13:04:17 org.Apache.catalina.startup.Catalina start
信息: Server startup in 82 ms

这个问题遇到过,原因是vista系统下c盘是对users受写保护的。

解决方法:

1.装到其他盘就没有问题了。

2.找到$TOMCAT_HOME$conf,把conf文件夹设置为完全控制

(右键属性-安全-找到当前登录名-下面选择完全控制)
保存,重启TOMCAT 。

注意:

重要的是“当前登录名”,不是“CREATOR OWNER”,也不是“Administrator”,

如果没有当前用户的话,添加一个即可。

另外,启动窗口一闪而过,很有可能是环境变量没有配置。如果以上都不能解决再检查
一下JAVA和TOMCAT的环境变量配置。

  推荐精品文章

·2024年12月目录 
·2024年11月目录 
·2024年10月目录 
·2024年9月目录 
·2024年8月目录 
·2024年7月目录 
·2024年6月目录 
·2024年5月目录 
·2024年4月目录 
·2024年3月目录 
·2024年2月目录 
·2024年1月目录
·2023年12月目录
·2023年11月目录

  联系方式
TEL:010-82561037
Fax: 010-82561614
QQ: 100164630
Mail:gaojian@comprg.com.cn

  友情链接
 
Copyright 2001-2010, www.comprg.com.cn, All Rights Reserved
京ICP备14022230号-1,电话/传真:010-82561037 82561614 ,Mail:gaojian@comprg.com.cn
地址:北京市海淀区远大路20号宝蓝大厦E座704,邮编:100089