2 u014353911 u014353911 于 2017.09.12 16:28 提问

tomcat日志报错,大家帮看看,谢谢
 12-Sep-2017 16:21:27.977 严重 [main] org.apache.catalina.realm.UserDatabaseRealm.startInternal Exception looking up UserDatabase under key [UserDatabase]
 javax.naming.NamingException: 与元素类型 "user" 相关联的 "password" 属性值不能包含 '<' 字符。
    at org.apache.naming.NamingContext.lookup(NamingContext.java:856)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:173)
    at org.apache.catalina.realm.UserDatabaseRealm.startInternal(UserDatabaseRealm.java:213)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.realm.CombinedRealm.startInternal(CombinedRealm.java:245)
    at org.apache.catalina.realm.LockOutRealm.startInternal(LockOutRealm.java:115)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:934)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:657)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)

12-Sep-2017 16:21:27.978 严重 [main] org.apache.catalina.realm.CombinedRealm.startInternal Failed to start [org.apache.catalina.realm.UserDatabaseRealm] realm
 org.apache.catalina.LifecycleException: No UserDatabase component found under key [UserDatabase]
    at org.apache.catalina.realm.UserDatabaseRealm.startInternal(UserDatabaseRealm.java:223)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.realm.CombinedRealm.startInternal(CombinedRealm.java:245)
    at org.apache.catalina.realm.LockOutRealm.startInternal(LockOutRealm.java:115)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:934)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:657)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)

哪里的问题呢?看不明白

10个回答

u012966390
u012966390   2017.09.12 17:21
已采纳

检查数据库里的值 就发现了

lcmsx
lcmsx   2017.09.12 16:31

"javax.naming.NamingException: 与元素类型 "user" 相关联的 "password" 属性值不能包含 '<' 字符。"

这里说得很明白了,你的user对象中的password属性里面包含了'<'字符,而你的特性中不支持。你看看你是在啥环境中使用报这个错的。贴图出来。

Royal_phy
Royal_phy   2017.09.12 16:32

password中有特殊字符吧,特殊字要转换

qq_35498454
qq_35498454   2017.09.12 16:32

UserDatabase 这个类?与元素类型 "user" 相关联的 "password" 属性值不能包含 '<' 字符。---就是多了个‘’<‘’

qq_37639017
qq_37639017   2017.09.12 16:34

估计是你的password的input框多了一个“<”符号

usecf
usecf   2017.09.12 16:55

"javax.naming.NamingException: 与元素类型 "user" 相关联的 "password" 属性值不能包含 '<' 字符。"
看看是不是你访问数据库操作 那块写的问题

java_xdo
java_xdo   2017.09.12 18:31

查看user或者password中是否包含<

u014353911
u014353911   2017.09.12 21:16

特殊字符不能用做密码里?

u014353911
u014353911   2017.09.12 23:18

是tomcat安装出错了

big121380
big121380   2017.09.17 11:31

看哈你的tomcat-users.xml。里面的

Csdn user default icon
上传中...
上传图片
插入图片