I tried to do what you suggested, but I got this error:
C:\google_sql_tool>google_sql.cmd <instance> <database>
Please authorize Google SQL Service for your Google Account at:
Enter Authorization Code: <token_returned_by_url_above>
Exiting; Unable to open connection.
Unable to fetch OAuth2 tokens.
Guys,
Any other suggestion?
Thanks
Fábio Peruchi
On Mon, Dec 3, 2012 at 1:07 PM, Gustavo Concon <gustavoc@ciandt.com> wrote:
Hi,I think that happens because when you execute by command line, the credentials are cached at the JVM of the JAVA_HOME environment. So, Websphere runs on its own JVM (%WAS_HOME%/java).Try to change the JAVA_HOME to point to WAS JVM, runs the google_sql.sh then try again.
Em segunda-feira, 3 de dezembro de 2012 10h07min38s UTC-2, Robson Brock escreveu:Hi all,We have a problem when try to connect a CloudSQL database from IBM Websphere 7.If we try to connect own application by command-line or JUnit on Eclipse Juno, the return is OK (no problem).However, when we try to connect from IBM Websphere 7, running on my local machine, we receive this error:java.sql.SQLException: Unable to load OAuth2 refresh or access token. Please run the google_sql command line tool once to setup cached credentials. See: http://code.google.com/apis/sql/docs/commandline.htmlThe code used is:DriverManager.registerDriver(new com.google.cloud.sql.Driver());
Connection c = DriverManager
.getConnection("jdbc:google:rdbms://<my_instance>/<my_database>");
Thanks.
No comments:
Post a Comment