用户名: 密码: [免费注册] [忘记密码]
您的位置:首页 -- JAVA技术--
tomcat在Vista下不正常解决方案
发布:    2010-03-18     返回

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的环境变量配置。

典型客户
JAVA技术
 
友情链接: 沈阳网站建设 |  阜新网站建设 |  阜新网站 |  安全评价 |  沃尔沃配件 |  链接申请与客服联系
域信息科技提供专业的jsp空间服务,jsp空间,jsp空间租用,jsp空间购买,虚拟JSP主机,jsp主机,独享TOMCAT,JSP服务器
售前电话:400-004-4994
售后电话:400-004-4994
技术支持(7×24支持):400-004-4994 018241839456
公司地址:阜新市中华路65号新天地大厦9F
邮编:123000       传真:0418-2493388-606
经营性ICP证:辽B-2-4-20070114    ICP备案: 辽ICP备07005704号
域信息科技提供专业的jsp空间,虚拟JSP主机,jsp主机,独享TOMCAT,JSP服务器
域信息科技提供专业的jsp空间,虚拟JSP主机,jsp主机,独享TOMCAT,JSP服务器