1

I have been trying to find an answer to my question but couldnt.

Now, my java web application runs perfectly on my local Tomcat server (6). It connects to a remote mysql database on db4free.net.

When uploading my web application on eatj.com (running Tomcat server 6 too) , it gives this exception: java.net.ConnectException: Connection refused.

Note that it runs fine when commenting the part connecting to the mysql database.

I want to know what could differ between my Tomcat server and the remote Tomcat server that would lead to this error?

Thanks in advance.

ADDITIONAL UPDATE:

Root Cause:
Caused by: java.security.AccessControlException: 
access denied (java.net.SocketPermission db4free.net resolve)
palacsint
  • 28,416
  • 10
  • 82
  • 109
Doaa A.
  • 129
  • 1
  • 2
  • 11

2 Answers2

2

I want to know what could differ between my Tomcat server and the remote Tomcat server that would lead to this error?

It is unlikely to be a difference in the Tomcat servers themselves. If there was an issue with Tomcat, it would manifest as a different exception.

The more likely cause is some kind of firewall issue; e.g. the firewall at eatj.com blocking outbound connections on the MySQL JDBC port.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
  • Thanks for the reply. The thing is, I used to access this exact database with an older version of my application on eatj. Any hint?? – Doaa A. Oct 29 '11 at 05:17
  • Hints: 1) check that you haven't accidentally changed the JDBC URL / port. 2) ask if the hosting companies have changed their firewalls wrt the MySQL ports. – Stephen C Oct 29 '11 at 07:06
  • Thanks! Will try to contact them again. – Doaa A. Oct 29 '11 at 20:22
  • I have added some additional info. What does that exception mean? – Doaa A. Oct 29 '11 at 21:22
1

SOLVED!

I have contacted them. They said since the root cause is " java.security.AccessControlException" then I have to upgrade to a paid account.

Doaa A.
  • 129
  • 1
  • 2
  • 11