Recently, the following error occurs in Tomcat, and many documents have not been found on the Internet. Finally, copy the configuration file of Tomcat that has been started properly, and tomcat can run normally. After comparison, the default value is missing in my server. xml file:
<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"/>
The error "exception looking up userdatabase under key userdatabase" is caused:
Severe: exception looking up userdatabase under key userdatabase
Javax. Naming. namenotfoundexception: Name userdatabase is not bound in this cont
XT
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.
Ava: 253)
At org. Apache. Catalina. Core. containerbase. Start (containerbase. Java: 1006
At org. Apache. Catalina. Core. standardengine. Start (standardengine. Java: 44
)
At org. Apache. Catalina. Core. standardservice. Start (standardservice. Java:
48)
At org. Apache. Catalina. Core. standardserver. Start (standardserver. Java: 70
)
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: 295)
At org. Apache. Catalina. startup. Bootstrap. Main (Bootstrap. Java: 433)
2009-8-25 9:38:36 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.
Ava: 261)
At org. Apache. Catalina. Core. containerbase. Start (containerbase. Java: 1006
At org. Apache. Catalina. Core. standardengine. Start (standardengine. Java: 44
)
At org. Apache. Catalina. Core. standardservice. Start (standardservice. Java:
48)
At org. Apache. Catalina. Core. standardserver. Start (standardserver. Java: 70
)
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: 295)
At org. Apache. Catalina. startup. Bootstrap. Main (Bootstrap. Java: 433)
2009-8-25 9:38:36 org. Apache. Catalina. startup. Catalina start
Information: server startup in 121 MS