Hi, I am having trouble obtain datasource to get a connection, I've looked over the mailing archives and followed the directions, but still can't get it to work.
I'm using I'm using Tomcat 4.0.3 and Sybase jconn2.jar I have a method that has this Context ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup("java:comp/env/"); DataSource ds = (DataSource) envCtx.lookup("jdbc/setsDataSource"); however, if I check for if (ds == null), that is true, so the get Connection that follows doesn't work. I have tried different approaches, I've put jconn2.jar in my Web-inf/lib, I have tried putting jconn2.jar in %tomcat%/common/lib, still doesn't work. My settings are as follows server.xml <Resource name="jdbc/setsDatasource" auth="Container" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/setsDatasource"> <parameter><name>driverClassName</name> <value>com.sybase.jdbc2.jdbc.SybDriver</value> </parameter> <parameter><name>url</name> <value>jdbc:sybase:Tds:servername:4946/database</value> </parameter> <parameter><name>user</name><value>username</value></parameter> <parameter><name>password</name><value>password</value></parameter> </ResourceParams> web.xml <resource-ref> <description>Sets Database</description> <res-ref-name>jdbc/setsDataSource</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> Any ideas would be appreciated, thanks. Dean -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>