• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting up MySQL dataSource in WSAD 5.1.1

 
M Streit
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
nexen graphics
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The second article describes configuring your data source. Is there something else you're looking for?

Kyle
 
Bob Hendry
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2993
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a question

is it works with PostgreSQL too?

thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic