[jboss-user] [Installation, Configuration & DEPLOYMENT] - problem with datasource + mysql + jboss
rhinosystemsinc
do-not-reply at jboss.com
Wed Jan 28 15:47:00 EST 2009
Hi,
I've configured two datasources in /server/default/deploy, as shown below, and one goes to oracle, and the other goes to mysql.
Problem is this... I can connect to mysql via a java test program, but it won't connect from jboss. Funny thing is that it is using a username that I've taken out of the datasource definitions all together... (It is one of my usernames, but just not in the ds config files).. Please help... Thanks!
Env:
MySQL: Server version: 5.0.32-Debian_7etch8-log
Connector: mysql-connector-java-5.1.7-bin.jar
jboss-4.2.2.GA
Debian/Unix
Error:
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
| at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:171)
| ... 158 more
| Caused by: java.sql.SQLException: Access denied for user 'gs'@'localhost' (using password: YES)
| at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
| at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
| at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
| at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
| at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:911)
| at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3953)
| at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1276)
| at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2198)
| ... 162 more
|
::::::::::::::
GSModel-ds.xml
::::::::::::::
<?xml version="1.0" encoding="UTF-8"?>
| <datasources>
| <local-tx-datasource>
| <jndi-name>GSModelDS</jndi-name>
| <connection-url>jdbc:oracle:thin:@localhost:1521:xe</connection-url>
| <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
| <user-name>gsora</user-name>
| <password>xxxxx</password>
| </local-tx-datasource>
| </datasources>
|
::::::::::::::
GSMySQL-ds.xml
::::::::::::::
<?xml version="1.0" encoding="UTF-8"?>
| <datasources>
| <local-tx-datasource>
| <jndi-name>GSMySQLModelDS</jndi-name>
| <!--<connection-url>jdbc:mysql://localhost:3306/gsTemp</connection-url> -->
| <connection-url>jdbc:mysql://localhost/gstemp1</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>gs2</user-name>
| <password>xxxxx</password>
| <connection-property name="autoReconnect">true</connection-property>
| <!-- Typemapping for JBoss 4.0 -->
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| </local-tx-datasource>
|
| </datasources>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205388#4205388
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205388
More information about the jboss-user
mailing list