Windows XP Windows 7 Windows 2003 Windows Vista Windows教程綜合 Linux 系統教程
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟件教程
 Windows教程網 >> Windows Vista系統教程 >> Windows Vista常見問題解答 >> TOMCAT在Vista下運行不正常的問題解決方法

TOMCAT在Vista下運行不正常的問題解決方法

日期:2017/1/20 17:32:13      編輯:Windows 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受寫保護的,那麼,Windows7下面是不是也會碰到這個問題呢?

解決方法:

1、裝到其他盤就沒有問題了。

Copyright © Windows教程網 All Rights Reserved