3
과 함께 GAE/J 및 Google Cloud SQL을 사용할 때 예외가 발생했습니다.예외가 발생한 후 복수 프로젝트
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:33)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:350)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2416)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2450)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2235)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:818)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
Caused by: java.net.SocketException: Unable to open connection to the instance: project-A:dba
at com.mysql.jdbc.GoogleCloudSqlSocket.<init>(GoogleCloudSqlSocket.java:48)
at com.mysql.jdbc.GoogleCloudSqlSocketFactory.connect(GoogleCloudSqlSocketFactory.java:81)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:300)
... 44 more
Caused by: java.io.FileNotFoundException: /cloudsql/project-A:dba(No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:247)
at java.io.RandomAccessFile.<init>(RandomAccessFile...(length 8379)
나는 두 개의 GAE/J 프로젝트를 가지고 있으며 둘 다 동일한 Google 클라우드 SQL 인스턴스를 참조합니다. 예)
- 프로젝트 A (GAE/J)를 사용하여 프로젝트 A : DBA (cloudsql)
- 프로젝트 B (GAE/J)를 사용하여 프로젝트 A : DBA (cloudsql)
프로젝트 B에서 예외가 발생했습니다.
db connection setting is following.
////(in project-B's java file)//////
String url = "jdbc:google:mysql://"+ "project-B" + ":db/db1";
Connection con = DriverManager.getConnection(url, properties);
////
이것은 버그입니까? 또는 어떤 실수?