Hi with jboss 4.2 I have problems connecting with mysql when deploying my application (it
worked well on another server, but I cant find the difference).
From the commandline on the same server I can connect to mysql without
problems
mysql -u bbcJbossUser -p -h localhost bbcJboss
my mysql-ds.xml
<?xml version="1.0" encoding="UTF-8"?>
| <datasources>
| <local-tx-datasource>
| <jndi-name>MySqlDS</jndi-name>
| <connection-url>jdbc:mysql://localhost:3306/bbcJboss</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>bbcJbossUser</user-name>
| <password>GEHEIM</password>
|
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| </local-tx-datasource>
| </datasources>
I get the following output on the console:
| ...
| 10:53:37,435 INFO [EntityBinder] Bind entity com.babuco.session.Session on table
Session
| 10:53:37,524 INFO [ConnectionProviderFactory] Initializing connection provider:
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
| 10:53:37,528 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
| 10:53:37,531 WARN [JBossManagedConnectionPool] Throwable while attempting to get a
new connection: null
| org.jboss.resource.JBossResourceException: Could not create connection; - nested
throwable: (com.mysql.jdbc.CommunicationsException: Communications link failure due to
underlying exception:
|
| ** BEGIN NESTED EXCEPTION **
|
| java.net.ConnectException
| MESSAGE: Connection refused
|
| STACKTRACE:
|
| java.net.ConnectException: Connection refused
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
| at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
| at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
| at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
| at java.net.Socket.connect(Socket.java:519)
| at java.net.Socket.connect(Socket.java:469)
| at java.net.Socket.<init>(Socket.java:366)
| at java.net.Socket.<init>(Socket.java:208)
| ...
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048668#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...