ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Creating a Web Application with Ant and Tomcat 4
Subject:   Name jdbc is not bound in this Context
Date:   2003-01-27 13:51:17
From:   anonymous2
Response to: Name jdbc is not bound in this Context


If you have not put your database's JDBC driver file in Tomcat's common/lib directory, as instructed, you get the message "Couldn't create addressesDB sttribute: Couldn't open connection to Public database: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'". So I don't think this is your problem, but please check it anyway.

Otherwise, you can view your Tomcat configuration by pointing your browser at http://localhost:8080/admin and looking at AddressBook's Context and Data Source Panels [see figures 8 & 9]. Do these panels look correct?

You do not need to reference the context.xml in the web.xml. The information in context.xml gets put in Tomcat's conf/server.xml file automatically by the Ant/Tomcat admin process. Check server.xml out with your favourite text editor. Does this look correct?

Finally, what versions of OS, MySQL, JDBC driver, Tomcat and Ant are you using?


1 to 1 of 1
  1. Name jdbc is not bound in this Context
    2003-10-29 17:05:35  anonymous2 [View]

1 to 1 of 1