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:
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.html The 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