Where are your jdbc for sql server jars? Put all three under /%TOMCAT_HOME%/common/lib.
Also, your factoryClassName should be: factoryClassName=org.apache.naming.factory.ResourceFactory I'm currently using connection pooling with sql server and thats the only things i can see that might cause you problems. Also, make sure you don't have any duplicate entries for the jdbc for sql server jars in your classpath. Hope That Helps, Jason --- vijaya prasad pala <[EMAIL PROTECTED]> wrote: > Hi, > > From one week i am trying to solve this problem. > Please any one help me. > if i am connection directly its ok. but if i am > using > connection pooling this exception is comming. > > my connection pooling syntax in server.xml is > -------------------------------------------------------------------------------------------------------------------------- > <Resource name="jdbc/edmsCP" auth="Container" > type="javax.sql.DataSource"/> > <ResourceParams name="jdbc/edmsCP"> > <parameter> > <name>factory</name> > > <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> > </parameter> > <parameter> > <name>driverClassName</name> > > <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value> > </parameter> > <parameter> > <name>url</name> > > <value>jdbc:microsoft:sqlserver://vijay2k:1433;databasename=eDMS</value> > </parameter> > <parameter> > <name>username</name> > <value>sa</value> > </parameter> > <parameter> > <name>password</name> > <value>sa</value> > </parameter> > <parameter> > <name>maxActive</name> > <value>20</value> > </parameter> > <parameter> > <name>maxIdle</name> > <value>10</value> > </parameter> > <parameter> > <name>maxWait</name> > <value>-1</value> > </parameter> > </ResourceParams> > --------------------------------------------------------------------------------------------- > web.xml > ----------------------- > <?xml version="1.0" encoding="ISO-8859-1"?> > <!DOCTYPE web-app > PUBLIC "-//Sun Microsystems, Inc.//DTD Web > Application 2.3//EN" > "http://java.sun.com/dtd/web-app_2_3.dtd"> > <web-app> > <resource-ref> > <res-ref-name>jdbc/edmsCP</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <res-auth>Container</res-auth> > </resource-ref> > </web-app> > ----------------------------------------------------------------------------------------------- > Here is my code.. > ----------- > public Connection getConnection() > { > Connection conn = null; > try > { > Context initCtx = new InitialContext(); > Context envCtx = (Context) > initCtx.lookup("java:comp/env"); > > if(envCtx == null ) > throw new Exception("No Context"); > else > System.out.println("Context Ok -> " + envCtx); > > DataSource ds = (DataSource) > envCtx.lookup("jdbc/edmsCP"); > > System.out.println("DataSource ->" + ds); > > if (ds != null) > conn = ds.getConnection(); > > } > catch(Exception ex) > { > System.out.println(ex.getMessage()); > //ex.printStackTrace(); > }finally > { > return conn; > } > } > ----------------------- > > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product > search > http://shopping.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]