• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Unable to configure JNDI Datasource in Tomcat 7

 
Ranch Hand
Posts: 539
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get the below errors when I run my servlet from Eclipse:


Here is the part I have included in my context.xml inside the Servers folder:



XE is the name of my database
Username: test
Password: test

Below are the init and doGet methods from my Servlet:




I have tested connecting using SQLDeveloper and also using normal JDBC; it connected without any problems. Please help.
 
Ranch Hand
Posts: 662
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure you are following what is said here? (have you updated web.xml, have you tried using context instead of resource)?
Also, is your database running locally. If yes, can you try using localhost instead of IP?
Are the port numbers, database name, userid, password correct and has got enough privileges? (remember case-sensitivity)
Do post back, if you are still getting this issue.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic