[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Closing a result set you left open!, MySQL

MarcusDidiusFalco do-not-reply at jboss.com
Sat Sep 29 10:56:31 EDT 2007


Hi BGMF,

1. Download a JDBC driver from the MySQL site. 
http://dev.mysql.com/downloads/connector/j/5.0.html
and put it into the lib or deploy directory of your server configuration.
2. Copy <JBoss_Home>\docs\examples\jca\mysql-ds.xml to your deploy directory and adjust it. Basically you simply have to adjust the connection url, driver-class, user-name and password.
If user-name or password are wrong you might get a funny exception about the wrong Hibernate dialect which can be confusing.
3. The jndi-name of your datasource must be referenced in your persistence.xml file like java:/
Basically all the code to make this work (except for the problem I have) is listed in my example.

Hope that helps, otherwise what exactly is your problem?

Greetings,

Hans

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089967#4089967

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089967



More information about the jboss-user mailing list