• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Name jdbc is not bound in this Context

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to all Ranchers,
I am making connection pool with tomcat.i define necessary entry in server.xml,web.xml and made one listener class to get the connection.but i am getting error "javax.naming.NameNotFoundException:Name jdbc is not bound in this Context" when i start the tomcat server.and also in my listener value of dataSourcejndi name is displayed null.

is there any jar files need to put in tomcat common/lib,i put mysql connector and odbc14.jar .


Please guide me how to get the jndidatasource name in listener .I attached three files for your reference in single file.
1)web.xml
2)server.xml
3)Applistener.java

1)web.xml


2)Server.xml(in tomcat)


3)Listener Class to get the jndidatasource name
i am getting the jndiname null
 
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Access the Datasource using "java:comp/env/jdbc/test".
 
Jordan Josh
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks amit. I done that and its working good
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic