Topic: jbuilerx + tomcat5中数据源问题 |
Print this page |
1.jbuilerx + tomcat5中数据源问题 | Copy to clipboard |
Posted by: skyedge Posted on: 2004-09-27 20:20 在tomat5中配置了数据源,进入tomcat/bin目录,启动startup.bat启动后,测试成功。但在jbuilder中配置好tomcat5后,启动测试调用数据源老是报错,错误信息为 org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) at org.apache.jsp.test_jsp._jspService(test_jsp.java:73) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) Caused by: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:243) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773) ... 32 more 请问该怎么解决? |
2.Re:jbuilerx + tomcat5中数据源问题 [Re: skyedge] | Copy to clipboard |
Posted by: scud Posted on: 2004-09-27 21:26 把jdbc驱动放到server/lib目录下 试试 |
3.Re:jbuilerx + tomcat5中数据源问题 [Re: scud] | Copy to clipboard |
Posted by: skyedge Posted on: 2004-09-29 08:57 这个也试过啊。不行的。 |
4.Re:jbuilerx + tomcat5中数据源问题 [Re: skyedge] | Copy to clipboard |
Posted by: lodestar78 Posted on: 2004-09-29 17:37 好像JBX调用外部的Tomcat时会用自带的conf文件代替Tomcat中的conf文件,所以你在Tomcat中配置的数据源没起作用,当然找不到。 我前段时间就碰到过这种问题,只好先用JBX开发,再保存到Tomcat里,单独打开Tomcat运行,好麻烦。 要不用 Intelli-J 开发会好点。 |
5.Re:jbuilerx + tomcat5中数据源问题 [Re: lodestar78] | Copy to clipboard |
Posted by: skyedge Posted on: 2004-09-30 15:15 呵呵,我现在是用spring框架,在里面配置了jdbc的数据连接,开发的时候就用这个,项目发布的时候只要修改成使用tomcat的数据源就可以了,很方便。 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |