[jboss-user] [Datasource Configuration] - Connection problem to mySQL database

sebastien ferrand do-not-reply at jboss.com
Thu Mar 25 05:38:49 EDT 2010

sebastien ferrand [http://community.jboss.org/people/microbe] created the discussion

"Connection problem to mySQL database"

To view the discussion, visit: http://community.jboss.org/message/533898#533898

Hi everyone,

Like you all, i'm using JBoss and i'm trying to connect it to a database, which is mySQL.

So I'm using JDBC to set a connection, like I did with a local application, but it doesn't work, even if i've done all requiered configurations.

The problem come from the connection, which is established by this line :

         con = DriverManager.getConnection("databaseName", "user", "password");

==> con is null when i run the portlet

Because I succed in getting a connection with a local app, I think the problem come from the configuration of JBoss because this time, It's J2EE.

So here are exact steps I followed :

- Putting mysql-connector-java-5.1.12-bin.jar in /home/myName/Bureau/jboss-portal-2.7.2/server/default/lib
- Moving mysql-ds.xml from I don't remember where to /home/myName/Bureau/jboss-portal-2.7.2/server/default/deploy
- Overwritted mysql-ds.xml with :

<?xml version="1.0" encoding="UTF-8"?





That's all i've done, maybe should I say that I use the plugin JBoss tools in eclipse.

Thank you for your future help.


Reply to this message by going to Community

Start a new discussion in Datasource Configuration at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100325/d5f4600d/attachment.html 

More information about the jboss-user mailing list