使用db2 runtime 8.1的客户端,然后在程序中使用JDBC的方式去连接数据库,程序发布在Tomcat5.5下,如果直接起动Tomcat,程序可以得到连接,但是在MyEclipse6.1中起动tomcat时,程序就得到不连接,报下以错误:
     com.ibm.mm.beans.CMBConnectFailedException: DGL0394A: 错误::DriverManager.getConnection; No suitable driver (STATE) : ; [SERVER = ICMNLSDB, USERID = icmadmin, SQL RC = 0, SQL STATE = 08001]
     那们大大可以给看一下,谢谢

解决方案 »

  1.   

    你可以先在myeclipse6.1连数据库看能不能连上,有一个连接数据库的视图
      

  2.   

    在MYECLIPSE中配置数据库连接时,需要加入驱动的.楼主没有加入驱动吧.
      

  3.   

    1)是同一个tomcat,
    2)在myeclipse6.1连数据库是可以连上的,用的是DB2JAVA.ZIP的包,com.ibm.db2.jdbc.app.DB2Driver,是可以连上的,
    3)驱动有加的
      

  4.   

    什么会引起“No suitable driver”(没有合适的驱动程序)错误?在调用 DriverManager.getConnection 方法期间,经常会出现“No suitable driver”的错误。 原因可能是在调用 getConnection 方法之前,加载合适的 JDBC 驱动程序失败,或者它可能正在指定一个非法的 JDBC URL——一个不被 JDBC 驱动程序识别的 URL。最好的办法是检查 JDBC 驱动程序的文档或联系您的 JDBC 驱动程序供应商,前提是您怀疑正在指定不被 JDBC 驱动程序识别的 URL。 检查一下,看你的项目里加载的JDBC驱动位置
      

  5.   

      
    DGL0394A error in driver manager... get connection No suitable driver. SQLCODE=0 SQLSTATE=08001
     
     Question 
    You get the no suitable driver message when you write a custom application on top of a WebSphere® Application Server to connect to DB2® Content Manager Version 8.  
      
     
     
    Answer 
    One of the reasons for getting this error message is that your environment is not set up properly. Check your LIBPATH variable within your application server. It needs to have the information that is contained in db2profile in order to be able to find the proper library files. After you have this set up, it will work. Because configuration problems such as this are not supported by IBM® Support, be sure that you read the Planning and Installing Your Content Management System.    这是在IBM官方网站找到得答案,应该不用翻译
      

  6.   

    http://www.ibm.com/developerworks/forums/thread.jspa?threadID=134409
    看看这个~~