javax.naming.NameNotFoundException

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.

  • Java : Datasource et action servlet indisponible
    via by Unknown author,
  • Tomcat - User - JNDI Could not find datasource
    via by Unknown author,
  • EntityManager JNDI - name not found
    via Stack Overflow by plewand
    ,
    • javax.naming.NameNotFoundException: El nombre jdbc no este asociado a este contexto at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:140) at org.apache.naming.NamingContext.lookup(NamingContext.java:781) at org.apache.naming.NamingContext.lookup(NamingContext.java:140) at org.apache.naming.NamingContext.lookup(NamingContext.java:781) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137) at javax.naming.InitialContext.lookup(Unknown Source) at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56) at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:414) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292) at org.openxava.tab.Tab.getSessionFactory(Tab.java:1012) at org.openxava.tab.Tab.loadUserPreferences(Tab.java:910) at org.openxava.tab.Tab.setModelName(Tab.java:723)

    Users with the same issue

    CasperCasper
    6 times, last one,
    treefolktreefolk
    1 times, last one,
    asdasdasdasd
    2 times, last one,
    ruifungruifung
    13 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    29 more bugmates