javax.naming.NameNotFoundException: Name [UserDatabase] is not bound in this Context. Unable to find [UserDatabase].


Samebug tips

Add localDataSource="true" to the realm when using local database.


,
via Stack Overflow by dereck

Make sure you use the same name for your database everywhere in context.xml.


,
via Stack Overflow by john

Solutions on the web

Solution icon of stackoverflow
Name [UserDatabase] is not bound in this Context. Unable to find [UserDatabase].

Solution icon of stackoverflow
Name [UserDatabase] is not bound in this Context. Unable to find [UserDatabase].

Solution icon of stackoverflow
Name [UserDatabase] is not bound in this Context. Unable to find [UserDatabase].

Solution icon of web
via soso.io by Unknown author, 1 year ago
Name [UserDatabase] is not bound in this Context. Unable to find [UserDatabase].

Solution icon of stackoverflow
Name [UserDatabase] is not bound in this Context. Unable to find [UserDatabase].

Solution icon of stackoverflow
Name [UserDatabase] is not bound in this Context. Unable to find [UserDatabase].

Solution icon of web
Name [UserDatabase] is not bound in this Context. Unable to find [UserDatabase].

Solution icon of stackoverflow
Name [UserDatabase] is not bound in this Context. Unable to find [UserDatabase].

Solution icon of github
Name [UserDatabase] is not bound in this Context. Unable to find [UserDatabase].

Solution icon of web
Name UserDatabase is not bound in this Context

Stack trace

javax.naming.NameNotFoundException: Name [UserDatabase] is not bound in this Context. Unable to find [UserDatabase].
	at org.apache.naming.NamingContext.lookup(NamingContext.java:817)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:173)
	at org.apache.catalina.realm.UserDatabaseRealm.startInternal(UserDatabaseRealm.java:215)
	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:926)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
	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:793)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
	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:355)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

6 times, 5 months ago
Once, 8 months ago
Once, 10 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 1 year ago
30 more bugmates