This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I like to know I can integrate a DB2 9.5 data source into WebSphere Application Server - ND, 22.214.171.124 on a Solaris system.
My problem is that I get no connection but this exception:
com.ibm.db2.jcc.a.SqlException: DatabaseMetaData information is not known for server DB2/SUN64SQL09050 by this version of JDBC driver
I defined a new data source (new DB2, DB2 Universal JDBC Driver Provider, Connection pool data source) with this classpath:
But nothing in the field “Native Library Path”.
Then I defined a new version 4 data source (required by my project). When I test the connection, WAS returns “successful”. But our application throws the exception above.
The problem seems to be that WebSphere includes old DB2 drivers by default. They overrule the new ones. It only works when I integrate the jars into my ear file and change the Class loader mode to "Parent Last". But this solution is not allowed for this application. So I search another solution.
Do I have to change the libraries that are loaded by this class loader: “WAS Bootstrap Extension Class Loader”?
I like to use the class loader mode "Parent First". When I view the class loaders (Enterprise Applications > My Application > my EJB > View Module Class Loader ) the order of the class loaders is JDK Extension Loader, JDK Application Class Loader, WAS Bootstrap Extension Class Loader, WAS Protection Class Loader.
WAS Bootstrap Extension Class Loader loads many libraries. Among them are those:
I think that’s the problem. But I haven’t found out how I can change that.
Does someone know how I can change the libraries the WAS Bootstrap Extension Class Loader loads? Can anybody tell me a simpler solution to integrate DB2 9.5 datasources in WAS6?
Display names must contain your first name, a space, then your last name. Fictitious names are not allowed.
Please edit your profile and correct your display name since accounts with invalid display names will be deleted."
As for your question, my version of Websphere (Windows) doesn't load any DB2 drivers by default. I have always configured that by putting the driver on the server and configuring the standard Websphere variable (DB2UNIVERSAL_JDBC_DRIVER_PATH) to point to the directory where I put it. I don't ever put the driver into my application.