开发者

Problems using db2 type 4 drivers with glassfish

开发者 https://www.devze.com 2023-03-12 08:38 出处:网络
I am trying to create a connection pool for a db2 database in glassfish and I\'m somewhat new to the entire process. I created the pool yesterday with no problems, I pinged the server successfully and

I am trying to create a connection pool for a db2 database in glassfish and I'm somewhat new to the entire process. I created the pool yesterday with no problems, I pinged the server successfully and all was well. The next time I start glassfish, my connection pool is gone! After recreating the connection pool with the same settings, the ping is failing with the following error in the server.log:

RAR5099 : Wrong class name or classpath for Datasource Object java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2ConnectionPoolDataSource 

I've tried moving the db2 driver .jar files around to lib/ or lib/ext/ and I've played around with the classpath prefixes and suffixes, but I've had no luck. It seems like glassfish isn't finding the drivers but I can't understand why.

BTW: I'm using OS X 10.6 and I configured the connection pool in a pretty basic way. I also added driverType = 4 to the propert开发者_运维百科ies.

Thanks in advance for your help!


You need to have the files db2jcc.jar and db2jcc_license_cu.jar in your classpath. The mentioned lib/ext/ should probably do the trick. The correct classname is probably com.ibm.db2.jcc.DB2SimpleDataSource for use with GlassFish.

0

精彩评论

暂无评论...
验证码 换一张
取 消