javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

tip

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

tip

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

tip

Try removing the server.xml file and adding it again to the project, and do a Clean Build.

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

  • Tomcat - User - JNDI Could not find datasource
    via by Unknown author,
  • No title
    via by Unknown author,
    • javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:769) at org.apache.naming.NamingContext.lookup(NamingContext.java:139) at org.apache.naming.NamingContext.lookup(NamingContext.java:780) at org.apache.naming.NamingContext.lookup(NamingContext.java:139) at org.apache.naming.NamingContext.lookup(NamingContext.java:780) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136) at javax.naming.InitialContext.lookup(InitialContext.java:351)

    Users with the same issue

    Casper
    Casper6 times, last one,
    treefolk
    treefolk1 times, last one,
    asdasd
    asdasd2 times, last one,
    ruifung
    ruifung13 times, last one,
    Unknown visitor1 times, last one,
    29 more bugmates