Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tomcat-users.xml corruption problem

Status
Not open for further replies.

sagin

Programmer
Dec 27, 2005
1
IL
I have been running tomcat on windows 2003 with no problems until the computer was unexpectdly shut down (power cut).

When I restarted the computer and tried to run tomcat again it wouldn't work.

I saw the following exception in the catalina_log:

2005-12-27 17:02:30 UserDatabaseRealm[Standalone]: Exception looking up UserDatabase under key UserDatabase
javax.naming.NamingException: Premature end of file.
at org.apache.naming.NamingContext.lookup(NamingContext.java:797)
at org.apache.naming.NamingContext.lookup(NamingContext.java:147)
at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:250)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
at org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:222)
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:585)
at org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:198)
at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:260)


After inquiring a little I discovered that the tomcat-users.xml file located at conf directory is empty.
After I replaced this file with a valid one, the problem was solved. I saw some more messages in this forum that regard this problem.
And here's my question:

I don't want to need to replace this file every time the computer crashes unexpectedly, how can I prevent this file from being corrupted?


10x,
Sagi
 
I'm not really sure what this has to do with Tomcat - its more of a OS related problem.

You CANNOT prevent a file from being corrupted if its going to be corrupted due to unforseen circumstances.


--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top