我正在尝试运行 tomcat 5.5,但在启动服务器时出现以下错误。
java.io.IOException: Cannot rename original file to C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\tomcat-users.xml.old
下面是完整的堆栈跟踪。
`Jun 22, 2012 12:17:43 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 361 ms
Jun 22, 2012 12:17:44 PM org.apache.naming.NamingContext lookup
WARNING: Unexpected exception resolving reference
java.io.IOException: Cannot rename original file to C:\Program Files\Apache Soft
ware Foundation\Tomcat 5.5\conf\tomcat-users.xml.old
at org.apache.catalina.users.MemoryUserDatabase.save(MemoryUserDatabase.
java:582)
at org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance
(MemoryUserDatabaseFactory.java:104)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF
actory.java:140)
at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContextBindingsEnumeration.nextElementInterna
l(NamingContextBindingsEnumeration.java:113)
at org.apache.naming.NamingContextBindingsEnumeration.next(NamingContext
BindingsEnumeration.java:71)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBe
ans(GlobalResourcesLifecycleListener.java:137)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBe
ans(GlobalResourcesLifecycleListener.java:109)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycle
Event(GlobalResourcesLifecycleListener.java:81)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:120)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:693
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jun 22, 2012 12:17:44 PM org.apache.catalina.mbeans.GlobalResourcesLifecycleList
ener createMBeans
SEVERE: Exception processing Global JNDI Resources
javax.naming.NamingException: Cannot rename original file to C:\Program Files\Ap
ache Software Foundation\Tomcat 5.5\conf\tomcat-users.xml.old
at org.apache.naming.NamingContext.lookup(NamingContext.java:805)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContextBindingsEnumeration.nextElementInterna
l(NamingContextBindingsEnumeration.java:113)
at org.apache.naming.NamingContextBindingsEnumeration.next(NamingContext
BindingsEnumeration.java:71)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBe
ans(GlobalResourcesLifecycleListener.java:137)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBe
ans(GlobalResourcesLifecycleListener.java:109)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycle
Event(GlobalResourcesLifecycleListener.java:81)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:120)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:693
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jun 22, 2012 12:17:44 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 22, 2012 12:17:44 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.25
Jun 22, 2012 12:17:44 PM org.apache.naming.NamingContext lookup
WARNING: Unexpected exception resolving reference
java.io.IOException: Cannot rename original file to C:\Program Files\Apache Soft
ware Foundation\Tomcat 5.5\conf\tomcat-users.xml.old
at org.apache.catalina.users.MemoryUserDatabase.save(MemoryUserDatabase.
java:582)
at org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance
(MemoryUserDatabaseFactory.java:104)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF
actory.java:140)
at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.j
ava:253)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1006)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
)
at org.apache.catalina.core.StandardService.start(StandardService.java:4
48)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jun 22, 2012 12:17:44 PM org.apache.catalina.realm.UserDatabaseRealm start
SEVERE: Exception looking up UserDatabase under key UserDatabase
javax.naming.NamingException: Cannot rename original file to C:\Program Files\Ap
ache Software Foundation\Tomcat 5.5\conf\tomcat-users.xml.old
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.j
ava:253)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1006)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
)
at org.apache.catalina.core.StandardService.start(StandardService.java:4
48)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jun 22, 2012 12:17:44 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException: No UserDatabase component found under key UserDatabase
at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.j
ava:261)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1006)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
)
at org.apache.catalina.core.StandardService.start(StandardService.java:4
48)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jun 22, 2012 12:17:44 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 102 ms
`