I am trying to deploy my Jersey project from eclipse on openshift and I am getting this error in the tail files Caused by: java.net.NoRouteToHostException: No route to hos
Your MySQL is not listening on TCP/IP and hence your attempt to connect is failing. You sort of answered your question when you said:
I checked whether some of the port 8080, 3306 are being used from my local mashine but they are just being used from eclipse.
In other words, MySQL is not listening on localhost. To confirm this another way, try connecting to MySQL from the command prompt:
mysql -u adminNMccsBr -h 127.10.230.440 -p YOUR_DB_NAME
I expect this to fail. The solution to your problem is to configure MySQL to listen on localhost. In the /etc/my.cnf
config file, under the [mysqld] line, add the following:
bind-address = 127.10.230.440
This is not a Java problem, it's a MySQL problem.