Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unable to implement connection pooling with sybase

Bhavani Kumar
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everyone,
i am trying to implement connection pooling with sybase as the database and tomcat 5 as the container. But this is the exception thats coming :

javax.naming.NameNotFoundException: Name jdbc/TestDB2 is not bound in
this Context

My server.xml looks lilke this :
<Context path="/DBTest2" docBase="DBTest2" debug="5" reloadable="true" crossContext="true" >

<Logger classname="org.apache.catalina.logger.FileLogger"
prefix="localhost_DBTest2_log." suffix=".txt" timestamp="true" />

<Resource name="jdbc/TestDB2" auth="Container" type="javax.sql.DataSource" />

<ResourceParams name="jdbc/TestDB2">










This is my web.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

<web-app xmlns=""
<description>MySQL Test App</description>
<description>DB Connection</description>

this is my test.jsp

<%@ taglib uri="" prefix="sql" %>
<%@ taglib uri="" prefix="c" %>

<sql:query var="rs" dataSource="jdbc/TestDB2">
select id, foo, bar from testdata

<title>DB Test</title>


<c:forEach var="row" items="${rs.rows}">
Foo ${}<br/>
Bar ${}<br/>


Any help would be much appreciated as i am stuck with this since the last 2 days

thanking you all in advance

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic