Not able to connect to Cloud SQL using Java SocketFactory Library

25 views
Skip to first unread message

Tushar kesarwani

unread,
Jul 12, 2017, 8:59:15 AM7/12/17
to Google Cloud SQL discuss
Hi, 

I am not able to connect to Cloud SQL using SocketFactory. I have followed the github and did everything as explained. 

The error i am getting says - 
ClassNotFoundException: com.google.cloud.sql.mysql.SocketFactory SocketFactory.class

I have posted my code and question over here - 

I would be glad if anyone can help me on this :( 

Thanks in advance 

Vadim Berezniker

unread,
Jul 12, 2017, 1:39:39 PM7/12/17
to Google Cloud SQL discuss
This error indicates that the library is not in your classpath. This usually indicates a problem with the way your application is packaged/deployed.
Make sure that when you run your application, all of its dependencies are present in the classpath.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/c7be224d-45e3-46dc-8ccb-6a2fdff3ef91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

George (Cloud Platform Support)

unread,
Jul 12, 2017, 3:31:42 PM7/12/17
to Google Cloud SQL discuss
Hi Tushar, 

More detail is needed to properly start an investigation in this issue. What github did you follow? 

What is the output of the gcloud info command? 

How do you authenticate your app to the cloud? 

It maybe worthwhile readin the Java subchapter of the "Connecting to Cloud SQL from External Applications" documentation page

Any other information you find relevant is welcome as well. 


Reply all
Reply to author
Forward
0 new messages