hi
i am using
jboss 4.2 and mysql (version 5.1) in windows vista. I was successfully connecting to db using the
jdbc:mysql://localhost:3306/devpfmdb. how ever suddenly the server fails to connect throwing the below exception. I am not sure why this happend all of the sudden. i reinstalled my mysql but did not make any difference. I used sql explorer as a UI to the database which also failed to connect. I tried changing url connection in the sql explored to jdbc:mysql://127.0.0.1:3306/devpfmdb and it worked but changing that in jboss db did work. Any help would be appreciated.
Last packet sent to the server was 0 ms ago.); - nested throwable: (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: connect
STACKTRACE:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
my datasource
- <local-tx-datasource>
<jndi-name>devpfmdb</jndi-name>
<use-java-context>true</use-java-context>
<connection-url>jdbc:mysql://localhost:3306/devpfmdb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>admin</user-name>
<password>admin</password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
- <metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>