Tuesday, July 24, 2012

Re: Tomcat to Google SQL Cloud - NOT_AUTHORIZED

Hi Benoit,
Looks like you made a typo in your tomcat config.
The instance name should be xclindemodb:stph instead of xclindemo:stph.

On Tue, Jul 24, 2012 at 1:27 PM, Benoit Marchal <b.marchal88@gmail.com> wrote:
Dear Group,
 
Did somebody tried to access Google Cloud SQL successfully from a tomcat context?
 
I have authorized successfully Google Cloud SQL on the server: sh google_sql.sh xclindemodb:stph  
 
From command tool I can query my database.
 
I try to to define in Tomcat the following datasource:

<Resource name="jdbc/1" auth="Container"

type="javax.sql.DataSource"

username="root" password=""

driverClassName="com.google.cloud.sql.Driver"

url="jdbc:google:rdbms://xclindemo:stph/mysql"

maxActive="80" />

</Context>

The only difference with a successful local database is the driver, url and username/password.   (removing completly username/password does not help)

I am nevertheless getting exception:

(boss::NOT_AUTHORIZED: Not authorized to access instance: xclindemo:stph)

 

Please help?

 

Thanks,

 

Benoit


No comments:

Post a Comment