users@glassfish.java.net

Re: Cannot use JDBC Realm with MySQL Database

From: <glassfish_at_javadesktop.org>
Date: Sat, 03 Nov 2007 12:37:58 PST

I´ve solved it!!!

Indeed, there was a configuration problem with the Connection Pool.

The reason why I didn´t find the error was because I was testing the database directly and not using the JNDI resource (jdbc/xxx) configured in the Admin Console and used by the JDBC Realm.

You should, if you want to avoid my mistake, pay attention to the "Additional Properties" for your "Connection Pool" (Admin Console).

There is a property named "Url" that has, for MySQL, the initial parameter "jdbc:mysql://:3306/". But that is not sufficient. You have to add the name of your database to this parameter, for example "jdbc:mysql://:3306/my_db".

I´ve not paid attention to this parameter because there is another parameter "DatabaseName" where you have to add your database. It is not sufficient using only "DatabaseName".

So all the parameters you have to provide in AdminConsole are (for MySQL):

User
Password
ServerName
DatabaseName
Url/URL

Thanks for your help!
[Message sent by forum member 'zebhed' (zebhed)]

http://forums.java.net/jive/thread.jspa?messageID=243678