I am trying to deploy my spring 3 + tomcat 6 + mysql 5.5 application on cloud foundry cloud. I am able to deploy application from Eclipse using STS plugin for cloudfoundry. Now issue i am getting is my application is not ablt to connect to database. I have configured a mysql service and started a tunnel. I have used tunnels username/password and URL to connect to database in application context file.
<Resource name="jdbc/myDB" auth="Container" type="javax.sql.DataSource"
maxActive="10" maxIdle="3" maxWait="10000"
username="xxx" password="xxx" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://127.0.0.1:10100/xxx?autoReconnect=true"/>
I am getting error.
Could not get JDBC Connection; nested exception is org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
Can someone please help me. Also let me know how to upload my local sql database dump on cloud foundry DB because i think once i will be able to connect this is going to be another problem