Exception looking up UserDatabase under key UserDatabase

严重: Exception looking up UserDatabase under key UserDatabase
javax.naming.NamingException: Cannot rename original file to C:\Program Files\Apache Software Foundation\Tomcat 6.0\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.java:253)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1007)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2010-1-20 15:17:15 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:1007)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2010-1-20 15:17:15 org.apache.catalina.startup.Catalina start
信息: Server startup in 204 m

 

以上是MyEclipse6.0启动外部tomcat6的报错信息.(系统是vista)

从网上找到的解决方法:

 

(1)server.xml文件中少了默认的:


       <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved"
           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
          pserver.xml文件中少了默认的:


       <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved"
           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
          pathname="conf/tomcat-users.xml" />

athname="conf/tomcat-users.xml" />

 

(2)将conf文件夹的只读属性去掉  或者右键以管理员身份运行就不会出错了

 

解决:

   本人采用第二种,修改conf的权限,导致原因分析,权限不足

 

 

你可能感兴趣的:(java,apache,tomcat,UP,sun)