It's not a secret anymore!
The moose likes Websphere and the fly likes Setting up MySQL dataSource in WSAD 5.1.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Setting up MySQL dataSource in WSAD 5.1.1" Watch "Setting up MySQL dataSource in WSAD 5.1.1" New topic

Setting up MySQL dataSource in WSAD 5.1.1

M Streit

Joined: Jan 16, 2004
Posts: 27
Does anyone have experience/info on setting up a JDBC Datasource in WSAD for MySQL. I am trying to set up a datasource (with a JNDI name - ie: jdbc/cdcatalog) for a WAS 5.1 test server (just a basic server configuration) running inside WSAD 5.1.1. I am using the MySQL jarfile:
mysql-connector-java-3.0.9-stable-bin.jar. I have MySQL running OK on localhost:3306 (default). I am adding information to the Data source tab of the server configuration editor. In addition, I tried to add a resource reference to the web.xml:
<resource-ref id="ResourceRef_1083720835000">
<description>MySQL4 connection</description>
However, when I run a test app that attempts to connect to the database, I get all manner of exceptions related to errors with the lookup and methods not found. A sample of just ONE of the exceptions is:
Unable to find constructor for DataStoreHelper: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource. Perhaps I am using the wrong implementation class name...any help would be appreciated.
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi Mark,
Welcome to JavaRanch, the absolute best site on the www for Java information. We don't have many rules around here, but we do have one. Please change your display name to a first and last name to comply with the JavaRanch Naming Policy. You can change it here. Thank you for your cooperation.

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Cliff Edwards

Joined: Mar 22, 2004
Posts: 16
Here are two articles:
nexen graphics

Joined: May 16, 2004
Posts: 1
Hi, that articles are so god, but one question, I don't need to configure de server Data source?, i have the same problem and I don't know how do that! can someone help me?

PD: My English is so bad :roll:
Kyle Brown
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
The second article describes configuring your data source. Is there something else you're looking for?


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at for other WebSphere information.
Bob Hendry

Joined: Sep 21, 2000
Posts: 19
One thing you may want to remember, you cannot create EBJs using MySQL. At least that's what IBM support told me after I spent days trying....
Sushil Kumar

Joined: Nov 10, 2004
Posts: 3
Thanks Robert Eanes for the links
just an observation: You can configure the datasource in WSAD Also, you can use the directives from the second article (like implementation, helper class names) to configure the datasource in WSAD without going to administrative console.

Greg Charles

Joined: Oct 01, 2001
Posts: 2969

Bob, I think you mean WebSphere doesn't generate the support classes for CMP Entity Beans for MySQL. There are a number of databases supported, but unfortunately not MySQL yet.

You can still use other types of EJBs though: Session Beans, Message Driven Beans, and BMP Entity Beans.
Manhar Puri
Ranch Hand

Joined: Aug 23, 2005
Posts: 41
I have followed the steps provided in the first article

but I get the following error: iwas0126e problems encountered while trying to establish connection reason java.util.linkedhashmap.

I am using wsad 5.1.2, mysql 4.1 and jdbc driver connectorJ 3.1

Ny help

Asha Nair

Joined: Sep 09, 2005
Posts: 1
Try using Connector/J 3.0 at I had the same problem, but it worked for me when I did this. Hope this helps.
Stan Molina

Joined: Sep 28, 2005
Posts: 1
a question

is it works with PostgreSQL too?

I agree. Here's the link:
subject: Setting up MySQL dataSource in WSAD 5.1.1
It's not a secret anymore!