Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Name java:jdbc is not bound in this Context

 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am struggling with this error for many hours now.
Tomcat 7.0 inside Eclipse 3.6

Server.xml



Web.xml




I tried first on Eclipse Galileo and Tomcat 6.2, then I upgraded to Eclipse 3.6 and Tomcat 7.0. Same error.

Any help is greatly appreciated.


 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 35977
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the error occuring on server startup or when you call the code to lookup the DataSource? If the later, are you using "java:comp/env/jdbc/MSSQLDataSource" as the name?
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:Is the error occuring on server startup or when you call the code to lookup the DataSource? If the later, are you using "java:comp/env/jdbc/MSSQLDataSource" as the name?


I get the error when I access the datasource. This is an old project that has been running for years. I am doing some maintinance on it, but I cannot deploy it locally.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 35977
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote: If the later, are you using "java:comp/env/jdbc/MSSQLDataSource" as the name?

How about this part of the question? When we upgraded the JavaRanch version of Tomcat, we were missing the "java:comp/env". Older versions of Tomcat didn't require it.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!