File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
Author

Setting up MySQL dataSource in WSAD 5.1.1

M Streit
Greenhorn

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>
<res-ref-name>jdbc/cdcatalog</res-ref-name>
<res-type>java.lang.Object</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
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.
Thanks
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
Greenhorn

Joined: Mar 22, 2004
Posts: 16
Here are two articles:
http://www.webspherepower.com/issues/issue200310/00001111001.html
http://www.webspherepower.com/issues/issue200403/00001236001.html
nexen graphics
Greenhorn

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
author
Ranch Hand

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

Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Bob Hendry
Greenhorn

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
Greenhorn

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.

cheers
Sushil
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2864
    
  11

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
http://www.webspherepower.com/issues/issue200310/00001111001.html

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

Manhar.
Asha Nair
Greenhorn

Joined: Sep 09, 2005
Posts: 1
Hi,
Try using Connector/J 3.0 at http://www.mysql.com/downloads/api-jdbc-stable.html. I had the same problem, but it worked for me when I did this. Hope this helps.
-Asha
Stan Molina
Greenhorn

Joined: Sep 28, 2005
Posts: 1
a question

is it works with PostgreSQL too?

thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting up MySQL dataSource in WSAD 5.1.1