But when I run the application, I get the following exception:
Caused by: java.lang.IllegalArgumentException: cloudSqlInstance property not set. Please specify this property in the JDBC URL or the connection Properties with value in form "project:region:instance"
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:135)
at com.google.cloud.sql.core.CoreSocketFactory.connect(CoreSocketFactory.java:170)
at com.google.cloud.sql.postgres.SocketFactory.createSocket(SocketFactory.java:72)
at org.postgresql.core.PGStream.(PGStream.java:60)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:144)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.(PgConnection.java:194)
at org.postgresql.Driver.makeConnection(Driver.java:450)
at org.postgresql.Driver.access$100(Driver.java:60)
at org.postgresql.Driver$ConnectThread.run(Driver.java:360)
... 1 common frames omitted
What could be going wrong here?
Environment
HikariCP version: 3.3.1
JDK version : 1.8
Database : Google Cloud SQL Postgres
I wish to connect to Google Cloud SQL using JDBC SocketFactory with HikariCP in a Spring 4 application.
The dependencies in pom.xml are:
The applicationContext.xml contains:
But when I run the application, I get the following exception:
What could be going wrong here?
Environment