是不是包含连接池的.JAR包在JBUIDER中没有加进去.把包加进去应该会好.

解决方案 »

  1.   

    laoyuan0032(老袁) 
    你说的有道理,可是,我把commons-collections.jar commons-dbcp.jar commons-pool.jar
    都加进去了,还是出现 
    connection pool successjava.sql.SQLException: Cannot load JDBC driver class 'null'....--------------------------------------------程序代码:
      Context initCtx = new InitialContext();                  Context ctx = (Context) initCtx.lookup("java:comp/env");
                            //获取连接池对象
                      Object obj = (Object) ctx.lookup("jdbc/OracleDB");                  System.out.println("connection pool success");                        //类型转换                  javax.sql.DataSource ds = (javax.sql.DataSource)obj;                  Connection conn = ds.getConnection();                  System.out.println("get connection success");
    ---------------------------
    我不用jbuilder,则tomcat 控制台显示
    connection pool success
    get connection success
    怎么回事儿,请高手继续献策!
      

  2.   

    我总感觉jbuilder8 它自己生成的server8080.xml 覆盖了tomcat/conf/下面的server.xml文件,使得server.xml的设置不起作用!思考中,等待中...,送分中...
      

  3.   

    1,在jbuilder中运行web app
    2,在输出窗口察看server0808的输出目录
    我的jbuilder7是C:/myapp/Tomcat/conf/server8080.xml
    3,把这个文件备份,
    其中有这样一行
    <!--This file, generated by JBuilder, may be deleted and regenerated at any time.-->4,删除这一行,停止web app
    5,此时Tomcat目录下没有conf目录了,建立这个目录,将删除了3中这句话的文件放在
    conf目录,还叫做server8080.xml,把自己需要的连接池等信息加入6,运行web app,我在jbuilder7中不会替换这个文件。ok...........................
    Using a Custom server.xml file with Tomcat in JBuilder 
    Question:  How do a use a custom server.xml with Tomcat in JBuilder 4,5 and 6?Answer:
    Make a copy of the JBuilder-generated server.xml file while your Web app 
    is running, modify the line which says the file was generated by JBuilder,
    make you mods, and then AFTER you quit the Web app you were just running, 
    save your modified copy back to server.xml. After that, JBuilder won't 
    modify that file.Note: Remember that when you shut down Tomcat you'll need to recreate 
    the directory that the server.xml file was in before you can save it back out. 
    After you've made the above modifications, JBuilder will leave the directory 
    alone.
     
      

  4.   

    至少我的机器是好用的。windows2000+jbuilder7(tomcat4.0.3+jdk1.3.1);英文是在google中搜索的,用完关闭了。没有连接。我是用“jbuilder server.xml"查找的,你可以是一试。
      

  5.   

    老兄,你太厉害了!我们的文章应该进精华区了! dllsf(dllsf) :你也拭了?我刚刚拭过!好使!散分!