Tomcat和DB2 [英] Tomcat and DB2

查看:88
本文介绍了Tomcat和DB2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Tomcat 5.5和DB2进行连接池

v8.1。这是在Websphere Studio Application Developer

5.x下工作但我们正在尝试迁移到Eclipse和Tomcat。


数据源似乎正确创建但是当我尝试从数据源获取连接时出现错误:


org.apache.tomcat.dbcp.dbcp.SQLNestedException:无法创建JDBC

用于连接URL的类''COM.ibm.db2.jdbc.app.DB2Driver'的驱动程序

''jdbc:db2:mlmstrd1''

at

org.apache.tomcat.dbcp.dbcp.BasicDataSource.create DataSource(BasicDataSource.java:780)

at

org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConction(BasicDataSource.java:554)


引起:java.sql.SQLException:没有合适的驱动程序

at java.sql.DriverManager.getDriver(DriverManager.jav a:243)

at

org.apache.tomcat.dbcp.dbcp.BasicDataSource.create DataSource(BasicDataSource.java:773)

... 26更多

我已经尝试将db2java.zip重命名为db2java.jar并将其移动到

common \lib。无论我尝试什么,我都会得到同样的错误。


任何人都能给予的帮助将不胜感激。


谢谢,


Jon

I am trying to get connection pooling working with Tomcat 5.5 and DB2
v8.1. This was working under Websphere Studio Application Developer
5.x but we are trying to move onto Eclipse and Tomcat.

The datasources seem to get created correctly but I get an error when I
try to get the connection from the datasource:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
driver of class ''COM.ibm.db2.jdbc.app.DB2Driver'' for connect URL
''jdbc:db2:mlmstrd1''
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.create DataSource(BasicDataSource.java:780)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getCon nection(BasicDataSource.java:554)

Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.jav a:243)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.create DataSource(BasicDataSource.java:773)
... 26 more
I''ve tried renaming the db2java.zip to db2java.jar and moving it to
common\lib. No matter what I try I get the same error.

Any help that anyone can give would be greatly appreciated.

Thanks,

Jon

推荐答案

Jon Jon;

我有类似的的问题。我最后在common\lib和webapp'的WEB-INF \lib目录中插入了db2java.jar和

db2jcc.jar。

可能不应该不需要这样做,但它已经纠正了我的问题。


Pete H

Hi Jon;
I had similar issues. I finally punted and put db2java.jar and
db2jcc.jar in both common\lib and the webapp''s WEB-INF\lib directories.
Probably shouldn''t need to do it, but it has corrected my problems.

Pete H


文章< 11 ********************** @ g44g2000cwa.googlegroups .com>,

(br **** @ gmail。 com)说...
In article <11**********************@g44g2000cwa.googlegroups .com>,
(br****@gmail.com) says...
我试图让连接池与Tomcat 5.5和DB2
v8.1一起工作。这是在Websphere Studio Application Developer
5.x下工作,但我们正在尝试迁移到Eclipse和Tomcat。
I am trying to get connection pooling working with Tomcat 5.5 and DB2
v8.1. This was working under Websphere Studio Application Developer
5.x but we are trying to move onto Eclipse and Tomcat.




''数据库Web服务器软件安装指南''
http://tinyurl.com/8ekov 也许能够帮助你。



The ''Database Web Server Software Installation Guide'' at
http://tinyurl.com/8ekov might be able to help you.


我也试过了。仍然得到同样的错误。


org.apache.tomcat.dbcp.dbcp.SQLNestedException:无法创建JDBC

类''COM.ibm的驱动程序。 db2.jdbc.app.DB2Driver''用于连接URL

''jdbc:db2:bfstest''

I tried that as well. Still get the same error.

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
driver of class ''COM.ibm.db2.jdbc.app.DB2Driver'' for connect URL
''jdbc:db2:bfstest''


这篇关于Tomcat和DB2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆