This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JBoss/WildFly and the fly likes mysql url connection issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "mysql url connection issues" Watch "mysql url connection issues" New topic

mysql url connection issues

kaarthik asokkumar

Joined: Jan 21, 2005
Posts: 29
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:// 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:
MESSAGE: Connection refused: connect
STACKTRACE: Connection refused: connect
at Method)
at Source)
at Source)
at Source)
at Source)

my datasource

- <local-tx-datasource>
- <metadata>

SCJP 1.4, SCWCD 1.4,SCBCD 1.3.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Restart both servers (JBoss and MySQL). Does it work?

If so, then there are some resource leaks in your code. Fix your JDBC code accordingly.
If not, then some firewall (either by hardware or software) has kicked in. Configure its settings to allow the network connection.
wood burning stoves
subject: mysql url connection issues