tomcat 6.029启动时 严重: Exception looking up UserDatabase under key UserDatabase

tomcat在启动时报如下错误:

严重: Exception looking up UserDatabase under key UserDatabase
javax.naming.NameNotFoundException: Name UserDatabase is not bound in this Context
        at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
        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:445)
        at org.apache.catalina.core.StandardService.start(StandardService.java:519)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
        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:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
2011-12-9 14:31:20 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:445)
        at org.apache.catalina.core.StandardService.start(StandardService.java:519)
 2011-12-9 14:31:20 org.apache.catalina.startup.Catalina start
信息: Server startup in 20 ms

 

原因是因为在tomcat的conf/server.xml配置文件中不小心注释了一段resource配置:

不能把 注释下面这段..

<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" /> 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值