把相关驱动包放到:Commom\lib下试试!

解决方案 »

  1.   

    放了,绝对放了,不然getJDBCconn(){.....this.conn = DriverManager.getConnection(connectUrl,userName,userPass);......}也不会能用。
      

  2.   

    1把JDBC驱动部署在/WEB-INF/lib和Tomcat_Home/common/lib中。
    2分步打印
    Context jndiCntx = new InitialContext();System.out.println("Looking up jdbc/DefaultDS");DataSource ds = (javax.sql.DataSource)jndiCntx.lookup("java:comp/env/jdbc/DefaultDS");System.out.println("Found. Connecting to jdbc/DefaultDS");con = ds.getConnection();3.Your question asking if sqlodbc.jar was in $CATALINA_HOME/common/lib directory got me started down the right path.  Tomcat 6 did away with the $CATALINA_HOME/common/lib directory. The correct place to put libraries that need to be loaded before your application starts is now in the $CATALINA_HOME/lib directory. Not sure why they chnaged this, but this was why Tomcat could not load the driver.这个问题挺普遍的 还不能确定是tom猫的bug......
    希望你解决后 总结下 
      

  3.   

    晕 我真该死还是没考到/common/lib下 谢谢大家了