Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java.io.IOException: Cannot rename original file to tomcat-users.xml.old  RSS feed

 
Abhishek Reddy
Ranch Hand
Posts: 259
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can any one tell why iam getting this error when i start the tomcat
i didnot change any of the file names ..

Error:
-------------------------------------------------------------
WARNING: Unexpected exception resolving reference
java.io.IOException: Cannot rename original file to C:\Program Files\Apache Soft
ware Foundation\Tomcat 5.0\conf\tomcat-users.xml.old
at org.apache.catalina.users.MemoryUserDatabase.save(MemoryUserDatabase.
java:523)
at org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance
(MemoryUserDatabaseFactory.java:98)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF
actory.java:129)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3
04)
at org.apache.naming.NamingContext.lookup(NamingContext.java:791)
at org.apache.naming.NamingContext.lookup(NamingContext.java:151)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBe
ans(GlobalResourcesLifecycleListener.java:155)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBe
ans(GlobalResourcesLifecycleListener.java:125)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycle
Event(GlobalResourcesLifecycleListener.java:97)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:230
6)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Dec 7, 2007 12:04:41 PM org.apache.catalina.mbeans.GlobalResourcesLifecycleListe
ner createMBeans
SEVERE: Exception processing Global JNDI Resources
javax.naming.NamingException: Cannot rename original file to C:\Program Files\Ap
ache Software Foundation\Tomcat 5.0\conf\tomcat-users.xml.old
at org.apache.naming.NamingContext.lookup(NamingContext.java:803)
at org.apache.naming.NamingContext.lookup(NamingContext.java:151)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBe
ans(GlobalResourcesLifecycleListener.java:155)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBe
ans(GlobalResourcesLifecycleListener.java:125)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycle
Event(GlobalResourcesLifecycleListener.java:97)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:230
6)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Dec 7, 2007 12:04:42 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 7, 2007 12:04:42 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.28
Dec 7, 2007 12:04:42 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.0\conf\tomcat-users.xml.old
at org.apache.catalina.users.MemoryUserDatabase.save(MemoryUserDatabase.
java:523)
at org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance
(MemoryUserDatabaseFactory.java:98)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF
actory.java:129)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3
04)
at org.apache.naming.NamingContext.lookup(NamingContext.java:791)
at org.apache.naming.NamingContext.lookup(NamingContext.java:151)
at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.j
ava:252)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1075)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478
)
at org.apache.catalina.core.StandardService.start(StandardService.java:4
80)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:231
3)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
javax.naming.NamingException: Cannot rename original file to C:\Program Files\Ap
ache Software Foundation\Tomcat 5.0\conf\tomcat-users.xml.old
at org.apache.naming.NamingContext.lookup(NamingContext.java:803)
at org.apache.naming.NamingContext.lookup(NamingContext.java:151)
at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.j
ava:252)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1075)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478
)
at org.apache.catalina.core.StandardService.start(StandardService.java:4
80)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:231
3)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Dec 7, 2007 12:04:42 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:259)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1075)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478
)
at org.apache.catalina.core.StandardService.start(StandardService.java:4
80)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:231
3)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Dec 7, 2007 12:04:42 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 203 ms
--------------------------------------------------------
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using something (like the Tomcat Administrator app) to change the usernames/passwords?
 
Abhishek Reddy
Ranch Hand
Posts: 259
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Ben Souther for the reply.
No i am not doing anything related to administrator appln.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looking at my installation I see that tomcat-users.xml gets updated with every restart so I am guessing that the rename is part of the normal startup and the renamed file will get erased after the replacement is written.

So - is this a file permission thing? Exactly how are you starting Tomcat?

Bill
 
Nandlal Prajapati
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try doing this...
give full control to the conf folder which is in the Apache folder by right clicking and selecting security tab.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!