Monday, April 30, 2012

Re: com.google.appengine.repackaged.com.google.protobuf.GeneratedMessage is a restricted

Hi,

I just tried again, and can't reproduce this.  I launched Eclipse with the Google Plugin for Eclipse 1.6.4.

Created a new webapp, modified the servlet class as follows, and no exeption.

package webtest;

import java.io.IOException;
import java.io.PrintWriter;
import java.sql.DriverManager;
import java.sql.SQLException;

import javax.servlet.ServletException;
import javax.servlet.http.*;

import com.google.appengine.api.rdbms.AppEngineDriver;

@SuppressWarnings("serial")
public class WebTestServlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException {
resp.setContentType("text/plain");
try {
PrintWriter out = resp.getWriter();
DriverManager.registerDriver(new AppEngineDriver());
out.println("Hello World");
} catch (IOException e) {
throw new ServletException(e);
} catch (SQLException e) {
throw new ServletException(e);
}
}
}


You should start with the simplest example w/o adding any additional libraries, etc and see where things stop working for you.

Rob

On Sat, Apr 28, 2012 at 10:28 AM, NASIR <nasir031@gmail.com> wrote:
Is there anyone who will answer this exception....?
where have been google cloud sql developers gone....?

On Apr 22, 4:47 pm, NASIR <nasir...@gmail.com> wrote:
> I'm getting this message whenever I try to connect google cloud sql.
> I'm using local development server with jdk version 1.6.4.
>
> HTTP ERROR 500
>
> Problem accessing /uni_cloud. Reason:
>
> com.google.appengine.repackaged.com.google.protobuf.GeneratedMessage
> is a restricted class. Please see the Google  App Engine developer's
> guide for more details.
> Caused by:
>
> java.lang.NoClassDefFoundError:
> com.google.appengine.repackaged.com.google.protobuf.GeneratedMessage
> is a restricted class. Please see the Google  App Engine developer's
> guide for more details.
>         at
> com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime .java:
> 51)
>         at
> com.google.appengine.repackaged.com.google.protobuf.GeneratedMessage.<clini t>(GeneratedMessage.java:
> 38)
>         at
> com.google.cloud.sql.jdbc.internal.AbstractSqlClient.createConnectRequest(A bstractSqlClient.java:
> 222)
>         at
> com.google.cloud.sql.jdbc.internal.SqlProtoClient.openConnection(SqlProtoCl ient.java:
> 57)
>         at com.google.cloud.sql.jdbc.Driver.connect(Driver.java:66)
>         at com.google.cloud.sql.jdbc.Driver.connect(Driver.java:26)
>         at java.sql.DriverManager.getConnection(Unknown Source)
>         at java.sql.DriverManager.getConnection(Unknown Source)
>         at org.uni_cloud.Uni_cloudServlet.service(Uni_cloudServlet.java:37)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> 511)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1166)
>         at
> com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(He aderVerificationFilter.java:
> 35)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi lter.java:
> 60)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans actionCleanupFilter.java:
> 43)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile Filter.java:
> 122)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.google.appengine.tools.development.BackendServersFilter.doFilter(Backen dServersFilter.java:
> 97)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
> 388)
>         at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
> 216)
>         at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
> 182)
>         at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
> 765)
>         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> 418)
>         at
> com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(Dev AppEngineWebAppContext.java:
> 78)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 152)
>         at com.google.appengine.tools.development.JettyContainerService
> $ApiProxyHandler.handle(JettyContainerService.java:369)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 152)
>         at org.mortbay.jetty.Server.handle(Server.java:326)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 542)
>         at org.mortbay.jetty.HttpConnection
> $RequestHandler.headerComplete(HttpConnection.java:923)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>         at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
> 409)
>         at org.mortbay.thread.QueuedThreadPool
> $PoolThread.run(QueuedThreadPool.java:582)
> Powered by Jetty://
>
> HERE IS CODE THAT I'm RUNNING
>
> package org.uni_cloud;
>
> import java.io.IOException;
> import java.io.PrintWriter;
>
> import javax.servlet.http.*;
> import com.google.appengine.api.rdbms.AppEngineDriver;
>
> import java.sql.*;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
>
> @SuppressWarnings("serial")
> public class Uni_cloudServlet extends HttpServlet {
>         @Override
>         public void doGet(HttpServletRequest req, HttpServletResponse resp)
>                         throws IOException {
>                 this.service(req, resp);
>         }
>
>         @Override
>         public void doPost(HttpServletRequest req, HttpServletResponse resp)
>                         throws IOException {
>                 this.service(req, resp);
>         }
>
>         public void service(HttpServletRequest req, HttpServletResponse resp)
> throws IOException {
>
>                 PrintWriter out = resp.getWriter();
>                 Connection c =null;
>                 resp.setContentType("text/html; charset=utf-8");
>
>                 try{
>                         DriverManager.registerDriver(new AppEngineDriver());
>                         c = DriverManager.getConnection("jdbc:google:rdbms://uni-
> cloud:unicloud/uni_cloud_db");
>
>                         String query = "insert into user (username, type)values (?, ?)";
>                         PreparedStatement stmt = c.prepareStatement(query);
>                         stmt.setString(1, "044-bscs-08");
>                         stmt.setString(2, "student");
>
>                         int success = 2;
>                         success = stmt.executeUpdate();
>                         if(success == 1) {
>                                 out.println("<html><head></head><body>Success...</body></html>");
>                         } else if (success == 0) {
>                                 out.println("<html><head></head><body>Failure!</body></html>");
>                         }
>
>                 }catch(Exception exp){
>
>                 }
>         }
>
> }
>
> ==========================
> web.xml
> ==========================
> <?xml version="1.0" encoding="utf-8"?>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
>         <servlet>
>                 <servlet-name>Uni_cloud</servlet-name>
>                 <servlet-class>org.uni_cloud.Uni_cloudServlet</servlet-class>
>         </servlet>
>         <servlet-mapping>
>                 <servlet-name>Uni_cloud</servlet-name>
>                 <url-pattern>/uni_cloud</url-pattern>
>         </servlet-mapping>
>         <welcome-file-list>
>                 <welcome-file>index.html</welcome-file>
>         </welcome-file-list>
> </web-app>
>
> please help me out...

Re: Benchmark Google Cloud SQL with Hammerora (any posibilities)

Hello Anata.

This is just small performance test result written on web magazine.

http://codezine.jp/article/detail/6499  (Start at page5)

But this is written by Japanese, if you have some questions,
my be I can answer on English. 

Regards.

Katsuyuki Seino.


On Mon, Apr 30, 2012 at 12:01 PM, anata juma <anata.fansclub@gmail.com> wrote:
Hello, respectic Team.

Google Cloud SQL is Amazing.
In our country "Indonesia". We don't need any high technology for IT.
But in fact, for some expert IT Development. High Technology can save
money and time, efficiency, stable and another good reasons.

So based on that argument. I'am (anata jue) take this oppurtunity to
save our country, and brings High Technology like Google Environtment
to touch us, many-many young developer.

Honestly, this is my tesis on collage, so this is very important,  i
need any data benchmark how googleDB works and response times. my
Tools is Hammerora.
in my mind, the Question is
1. There is any posibilities to calculate GoogleDB response time?
2. How and what is admin level access?
3. what tools was use?

in hammerora, we need so many authentication data like used id,
password and sql server database.
So, i don't know the password and SQLDB which use to benchmark.
4. it's posibilities to only benchmark SQL DB which relation on my
google Account and how about authentication?

in the end. Any data report from this research will be post to google
developer team and will be stamp with my legal University. I think,
there is an answer which contains important key word like password and
another. so I'm very appreciate who  reply my post and give a good
feedback..

Sincerely
Anata Jue, young developer
anata.fansclub@gmail.com (for private message for key word which i
need)
soory for my english

Sunday, April 29, 2012

Benchmark Google Cloud SQL with Hammerora (any posibilities)

Hello, respectic Team.

Google Cloud SQL is Amazing.
In our country "Indonesia". We don't need any high technology for IT.
But in fact, for some expert IT Development. High Technology can save
money and time, efficiency, stable and another good reasons.

So based on that argument. I'am (anata jue) take this oppurtunity to
save our country, and brings High Technology like Google Environtment
to touch us, many-many young developer.

Honestly, this is my tesis on collage, so this is very important, i
need any data benchmark how googleDB works and response times. my
Tools is Hammerora.
in my mind, the Question is
1. There is any posibilities to calculate GoogleDB response time?
2. How and what is admin level access?
3. what tools was use?

in hammerora, we need so many authentication data like used id,
password and sql server database.
So, i don't know the password and SQLDB which use to benchmark.
4. it's posibilities to only benchmark SQL DB which relation on my
google Account and how about authentication?

in the end. Any data report from this research will be post to google
developer team and will be stamp with my legal University. I think,
there is an answer which contains important key word like password and
another. so I'm very appreciate who reply my post and give a good
feedback..

Sincerely
Anata Jue, young developer
anata.fansclub@gmail.com (for private message for key word which i
need)
soory for my english

Re: Google Apps Script JDBC Service and Google Cloud SQL

It would be really a GREAT idea to point out any code samples of such a sql wrapper servlet. If any...  Not to mention placing something like that in tutorials section.

On Tuesday, November 29, 2011 6:29:10 PM UTC+4, Saurabh Gupta wrote:
Integrating Cloud SQL with Apps Script is being considered. In the meantime, you can write an App Engine service as a wrapper that exposes Cloud SQL data to your Scripts.

-saurabh

Re: The rdbms API is not available because the MySQLdb library could not be loaded.

OK - so now getting that Errno 13 (file not accessible) on the egg but unlike Tom above mine is not working. My complete error log follows - not sure what's happening at this point.

Also, although adding import MySQLdb to dev_appserver.py causes GAE to not launch my app INSTEAD adding import MySQLdb to webapp2.py does help me at least where MySQLdb can be found and seemingly loaded to some extent.

Still the following problems persist and my page not loadeth :-)

WARNING  2012-04-29 14:53:58,036 py_zipimport.py:139] Can't open zipfile /Library/Python/2.7/site-packages/python_gflags-2.0-py2.7.egg: IOError: [Errno 13] file not accessible: '/Library/Python/2.7/site-packages/python_gflags-2.0-py2.7.egg'

WARNING  2012-04-29 14:53:58,036 py_zipimport.py:139] Can't open zipfile /Library/Python/2.7/site-packages/oauth2-1.5.211-py2.7.egg: IOError: [Errno 13] file not accessible: '/Library/Python/2.7/site-packages/oauth2-1.5.211-py2.7.egg'

ERROR    2012-04-29 14:53:58,037 wsgi.py:189] 

Traceback (most recent call last):

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 187, in Handle

    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 225, in _LoadHandler

    handler = __import__(path[0])

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 676, in Decorate

    return func(self, *args, **kwargs)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 1858, in load_module

    return self.FindAndLoadModule(submodule, fullname, search_path)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 676, in Decorate

    return func(self, *args, **kwargs)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 1722, in FindAndLoadModule

    description)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 676, in Decorate

    return func(self, *args, **kwargs)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 1665, in LoadModuleRestricted

    description)

  File "/Users/zobkiw/wikboz/admin.py", line 4, in <module>

    import webapp2

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 676, in Decorate

    return func(self, *args, **kwargs)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 1858, in load_module

    return self.FindAndLoadModule(submodule, fullname, search_path)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 676, in Decorate

    return func(self, *args, **kwargs)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 1722, in FindAndLoadModule

    description)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 676, in Decorate

    return func(self, *args, **kwargs)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 1665, in LoadModuleRestricted

    description)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2/webapp2.py", line 13, in <module>

    import MySQLdb

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 676, in Decorate

    return func(self, *args, **kwargs)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 1858, in load_module

    return self.FindAndLoadModule(submodule, fullname, search_path)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 676, in Decorate

    return func(self, *args, **kwargs)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 1722, in FindAndLoadModule

    description)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 676, in Decorate

    return func(self, *args, **kwargs)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 1647, in LoadModuleRestricted

    return source_file.load_module(submodule_fullname)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/dist/py_zipimport.py", line 246, in load_module

    submodname, is_package, fullpath, source = self._get_source(fullmodname)

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/dist/py_zipimport.py", line 207, in _get_source

    source = self.zipfile.read(relpath.replace(os.sep, '/'))

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 867, in read

    return self.open(name, "r", pwd).read()

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 882, in open

    zef_file = open(self.filename, 'rb')

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 592, in __init__

    raise IOError(errno.EACCES, 'file not accessible', filename)

IOError: [Errno 13] file not accessible: '/Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg'

INFO     2012-04-29 14:53:58,047 dev_appserver.py:2891] "GET /admin/ HTTP/1.1" 500 -


Re: The rdbms API is not available because the MySQLdb library could not be loaded.

These steps at least got me to the point where python could import MySQLdb from the command line:

http://decoding.wordpress.com/2012/01/23/how-to-setup-django-and-mysql-python-on-mac-os-x-lion/

GAE still is having trouble and adding the import statement to dev_appserver.py still doesn't work but I'm one step closer than I was a few minutes ago...

Saturday, April 28, 2012

Re: The rdbms API is not available because the MySQLdb library could not be loaded.

I have found solution. Please read this article https://developers.google.com/cloud-sql/docs/django#development-settings  Just add two configurations: first for local devserver with local mysql server, and second - for google cloud used on GAE server.

Re: com.google.appengine.repackaged.com.google.protobuf.GeneratedMessage is a restricted

Is there anyone who will answer this exception....?
where have been google cloud sql developers gone....?

On Apr 22, 4:47 pm, NASIR <nasir...@gmail.com> wrote:
> I'm getting this message whenever I try to connect google cloud sql.
> I'm using local development server with jdk version 1.6.4.
>
> HTTP ERROR 500
>
> Problem accessing /uni_cloud. Reason:
>
> com.google.appengine.repackaged.com.google.protobuf.GeneratedMessage
> is a restricted class. Please see the Google  App Engine developer's
> guide for more details.
> Caused by:
>
> java.lang.NoClassDefFoundError:
> com.google.appengine.repackaged.com.google.protobuf.GeneratedMessage
> is a restricted class. Please see the Google  App Engine developer's
> guide for more details.
>         at
> com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime .java:
> 51)
>         at
> com.google.appengine.repackaged.com.google.protobuf.GeneratedMessage.<clini t>(GeneratedMessage.java:
> 38)
>         at
> com.google.cloud.sql.jdbc.internal.AbstractSqlClient.createConnectRequest(A bstractSqlClient.java:
> 222)
>         at
> com.google.cloud.sql.jdbc.internal.SqlProtoClient.openConnection(SqlProtoCl ient.java:
> 57)
>         at com.google.cloud.sql.jdbc.Driver.connect(Driver.java:66)
>         at com.google.cloud.sql.jdbc.Driver.connect(Driver.java:26)
>         at java.sql.DriverManager.getConnection(Unknown Source)
>         at java.sql.DriverManager.getConnection(Unknown Source)
>         at org.uni_cloud.Uni_cloudServlet.service(Uni_cloudServlet.java:37)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> 511)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1166)
>         at
> com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(He aderVerificationFilter.java:
> 35)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi lter.java:
> 60)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans actionCleanupFilter.java:
> 43)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile Filter.java:
> 122)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.google.appengine.tools.development.BackendServersFilter.doFilter(Backen dServersFilter.java:
> 97)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
> 388)
>         at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
> 216)
>         at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
> 182)
>         at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
> 765)
>         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> 418)
>         at
> com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(Dev AppEngineWebAppContext.java:
> 78)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 152)
>         at com.google.appengine.tools.development.JettyContainerService
> $ApiProxyHandler.handle(JettyContainerService.java:369)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 152)
>         at org.mortbay.jetty.Server.handle(Server.java:326)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 542)
>         at org.mortbay.jetty.HttpConnection
> $RequestHandler.headerComplete(HttpConnection.java:923)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>         at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
> 409)
>         at org.mortbay.thread.QueuedThreadPool
> $PoolThread.run(QueuedThreadPool.java:582)
> Powered by Jetty://
>
> HERE IS CODE THAT I'm RUNNING
>
> package org.uni_cloud;
>
> import java.io.IOException;
> import java.io.PrintWriter;
>
> import javax.servlet.http.*;
> import com.google.appengine.api.rdbms.AppEngineDriver;
>
> import java.sql.*;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
>
> @SuppressWarnings("serial")
> public class Uni_cloudServlet extends HttpServlet {
>         @Override
>         public void doGet(HttpServletRequest req, HttpServletResponse resp)
>                         throws IOException {
>                 this.service(req, resp);
>         }
>
>         @Override
>         public void doPost(HttpServletRequest req, HttpServletResponse resp)
>                         throws IOException {
>                 this.service(req, resp);
>         }
>
>         public void service(HttpServletRequest req, HttpServletResponse resp)
> throws IOException {
>
>                 PrintWriter out = resp.getWriter();
>                 Connection c =null;
>                 resp.setContentType("text/html; charset=utf-8");
>
>                 try{
>                         DriverManager.registerDriver(new AppEngineDriver());
>                         c = DriverManager.getConnection("jdbc:google:rdbms://uni-
> cloud:unicloud/uni_cloud_db");
>
>                         String query = "insert into user (username, type)values (?, ?)";
>                         PreparedStatement stmt = c.prepareStatement(query);
>                         stmt.setString(1, "044-bscs-08");
>                         stmt.setString(2, "student");
>
>                         int success = 2;
>                         success = stmt.executeUpdate();
>                         if(success == 1) {
>                                 out.println("<html><head></head><body>Success...</body></html>");
>                         } else if (success == 0) {
>                                 out.println("<html><head></head><body>Failure!</body></html>");
>                         }
>
>                 }catch(Exception exp){
>
>                 }
>         }
>
> }
>
> ==========================
> web.xml
> ==========================
> <?xml version="1.0" encoding="utf-8"?>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
>         <servlet>
>                 <servlet-name>Uni_cloud</servlet-name>
>                 <servlet-class>org.uni_cloud.Uni_cloudServlet</servlet-class>
>         </servlet>
>         <servlet-mapping>
>                 <servlet-name>Uni_cloud</servlet-name>
>                 <url-pattern>/uni_cloud</url-pattern>
>         </servlet-mapping>
>         <welcome-file-list>
>                 <welcome-file>index.html</welcome-file>
>         </welcome-file-list>
> </web-app>
>
> please help me out...

Re: The rdbms API is not available because the MySQLdb library could not be loaded.

Also using GAE 1.6.5.14.

Downloaded mysql-python, built, installed.

Added to PYTHONPATH. 

Adding import MySQLdb to dev_appserver causes GAE to not be able to run at all with errors like:

  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/dev_appserver.py", line 25, in <module>

    import MySQLdb

  File "build/bdist.macosx-10.7-intel/egg/MySQLdb/__init__.py", line 19, in <module>

  File "build/bdist.macosx-10.7-intel/egg/_mysql.py", line 7, in <module>


Still trying to find the right trick...

Re: The rdbms API is not available because the MySQLdb library could not be loaded.

I have the same issue with latest version of GAE SDK 1.6.5

I have connected with options "gaesdk --mysql_user=root project_dir" and all right, but I connected to remote database, not on local database!

How to fix it? I need connect to local database, if I specify option mysql_user. Thanks!

Friday, April 27, 2012

Re: Failed to load databases.

Thanks, done!

Re: Failed to load databases.

I've disable grants on the instance, and I can see it's able to accept connections.
My guess is still that you've somehow deleted the users.

You should be able to connect and check for that as well as delete the instance now.


jm.



On Fri, Apr 27, 2012 at 6:33 AM, Johannes Braunias <johannes.braunias@gmail.com> wrote:
Hi, thanks.
I have dropped only one database (tiger), not all of them.

I cannot delete the instance anylonger.
I have created a new one.

Can anyone delete the old instance for me?

Thanks 
Johannes

Re: Failed to load databases.

Hi, thanks.
I have dropped only one database (tiger), not all of them.

I cannot delete the instance anylonger.
I have created a new one.

Can anyone delete the old instance for me?

Thanks 
Johannes

Re: google cloud sql entity limit

On Fri, Apr 27, 2012 at 6:03 AM, Mansik Kim <sirano979@gmail.com> wrote:
I have been trying to upload some image into  google cloud sql.

I stored it in BLOB, LONGBLOB but they all have limit up to 1kbyte.


Cloud SQL allows you to store up to 16MB in a single row.

I think you want MEDIUMBLOB:
 
Ken

Thursday, April 26, 2012

google cloud sql entity limit

I have been trying to upload some image into  google cloud sql.

I stored it in BLOB, LONGBLOB but they all have limit up to 1kbyte.

Is it common result?

How can i store some big data?

Wednesday, April 25, 2012

Re: OS X alternatives to SQuirreL?

I also could use a php version without rewriting my apps. +1

On Wed, Apr 25, 2012 at 7:56 PM, Joe Zobkiw <zobkiw@gmail.com> wrote:
> Thanks Rob. Here's hoping for future non-jdbc support even if it's a
> Google-specific phpMyAdmin. That would suffice fine I think for alot of
> users and be nice addition, IMO.
>
> Thanks!
>
> <joe>
>
> On Wednesday, April 25, 2012 12:08:47 AM UTC-4, rcleveng wrote:
>>
>> Hi Joe,
>>
>> Currently JDBC access is all that's offered externally, so for now you'll
>> need to use SQuirrel or some other jdbc based java application.
>>
>> Thanks,
>>
>> Rob
>>
>>
>> On Tue, Apr 24, 2012 at 7:45 PM, Joe Zobkiw <zobkiw@gmail.com> wrote:
>>>
>>> Hello,
>>>
>>> Just got SQuirreL running under OS X - setup was easy enough following
>>> the directions here https://developers.google.com/cloud-sql/docs/admin_tools
>>> - but I would prefer a native application if possible.
>>>
>>> I tried working with MySQLWorkbench (not much better than SQuirreL) and
>>> the Mac OSX native Sequel Pro to no avail. Has anyone gotten a native Mac
>>> client to run with Google Cloud SQL?
>>>
>>> Thanks in advance.
>>>
>>
>



--
Bill Chapman <BillChapman@alum.emory.edu> 662-546-0010
http://chapfam.blogspot.com/

Radical Faith:  Trusting for an outcome that is possible only with
supernatural intervention.

Re: OS X alternatives to SQuirreL?

Thanks Rob. Here's hoping for future non-jdbc support even if it's a Google-specific phpMyAdmin. That would suffice fine I think for alot of users and be nice addition, IMO.

Thanks!

<joe>

On Wednesday, April 25, 2012 12:08:47 AM UTC-4, rcleveng wrote:
Hi Joe,

Currently JDBC access is all that's offered externally, so for now you'll need to use SQuirrel or some other jdbc based java application.

Thanks,

Rob


On Tue, Apr 24, 2012 at 7:45 PM, Joe Zobkiw <zobkiw@gmail.com> wrote:
Hello,

Just got SQuirreL running under OS X - setup was easy enough following the directions here https://developers.google.com/cloud-sql/docs/admin_tools - but I would prefer a native application if possible.

I tried working with MySQLWorkbench (not much better than SQuirreL) and the Mac OSX native Sequel Pro to no avail. Has anyone gotten a native Mac client to run with Google Cloud SQL?

Thanks in advance.


SQLAlchemy with Cloud SQL

Is anyone using SQLAlchemy ORM with Cloud SQL?  Any tricks?

Thanks,
Jeff

Tuesday, April 24, 2012

Re: OS X alternatives to SQuirreL?

Hi Joe,

Currently JDBC access is all that's offered externally, so for now you'll need to use SQuirrel or some other jdbc based java application.

Thanks,

Rob


On Tue, Apr 24, 2012 at 7:45 PM, Joe Zobkiw <zobkiw@gmail.com> wrote:
Hello,

Just got SQuirreL running under OS X - setup was easy enough following the directions here https://developers.google.com/cloud-sql/docs/admin_tools - but I would prefer a native application if possible.

I tried working with MySQLWorkbench (not much better than SQuirreL) and the Mac OSX native Sequel Pro to no avail. Has anyone gotten a native Mac client to run with Google Cloud SQL?

Thanks in advance.


OS X alternatives to SQuirreL?

Hello,

Just got SQuirreL running under OS X - setup was easy enough following the directions here https://developers.google.com/cloud-sql/docs/admin_tools - but I would prefer a native application if possible.

I tried working with MySQLWorkbench (not much better than SQuirreL) and the Mac OSX native Sequel Pro to no avail. Has anyone gotten a native Mac client to run with Google Cloud SQL?

Thanks in advance.

Re: Running Data Nucleus JDO 3.0.x with Google Cloud SQL

Thanks to this Thread, I am successfully using DataNucleus JDO with
Google Cloud.

I am having one problem:

If I try to use SQL directly for a query:
Query query = pm.newQuery("javax.jdo.query.SQL", querySQL);

DataNucleus tries to spawn a Thread to execute the query.

Caused by: java.security.AccessControlException: access denied
(java.lang.RuntimePermission modifyThreadGroup)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:
323)
at
java.security.AccessController.checkPermission(AccessController.java:
546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:
532)
at com.google.appengine.tools.development.DevAppServerFactory
$CustomSecurityManager.checkPermission(DevAppServerFactory.java:252)
at com.google.appengine.tools.development.DevAppServerFactory
$CustomSecurityManager.checkAccess(DevAppServerFactory.java:277)
at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:299)
at java.lang.Thread.init(Thread.java:332)
at java.lang.Thread.<init>(Thread.java:391)
at org.datanucleus.store.query.Query.performExecuteTask(Query.java:
1669)
at
org.datanucleus.store.rdbms.query.SQLQuery.performExecute(SQLQuery.java:
259)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1489)
at
org.datanucleus.store.query.AbstractSQLQuery.executeWithArray(AbstractSQLQuery.java:
287)
at org.datanucleus.store.query.Query.execute(Query.java:1344)
at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:221)


This is not a problem with the default JDOQL queries.

Anyone have a solution for this? I have one query that I need to use
mysql SQL with that won't work with JDOQL.


On Mar 26, 9:50 am, Feliks Khantsis <doom...@gmail.com> wrote:
> Yes, you must download datanucleus access platform 1.1.5 rdbms, and add the
> datanucleus-rdbms-1.1.5.jar to your classpath
>
>
>
>
>
>
>
> On Friday, March 2, 2012 4:51:03 PM UTC+2, Christoph wrote:
>
> > Dear Study,
>
> > thank you for posting your jdoconfig.xml. However I run into the problem
> > that the code doesn't run on Google App Engine. It creates the following
> > error message:
>
> > Caused by: javax.jdo.JDOFatalUserException: No available StoreManager found for the datastore URL key "jdbc". Please make sure you have all relevant plugins in the CLASSPATH (e.g datanucleus-rdbms?, datanucleus-db4o?), and consider setting the persistence property "datanucleus.storeManagerType" to the type of store you are using e.g rdbms, db4o
> > NestedThrowables:
> > org.datanucleus.exceptions.NucleusUserException: No available StoreManager found for the datastore URL key "jdbc". Please make sure you have all relevant plugins in the CLASSPATH (e.g datanucleus-rdbms?, datanucleus-db4o?), and consider setting the persistence property "datanucleus.storeManagerType" to the type of store you are using e.g rdbms, db4o
>
> > However directly accessing the database via JDBC and SQL works!
>
> > So it seems that something for datanucleus is missing within the app
> > engine libraries. I added no special libraries and used version 1.6.3.
>
> > Thank you very much for your help in advance.
>
> > Christoph
>
> > Am Mittwoch, 26. Oktober 2011 18:27:02 UTC+2 schrieb Study:
>
> >> You can try my jdoconfig.xml
>
> >> it works with built-in GAE JDO without using newer version JDO
>
> >> <?xml version="1.0" encoding="utf-8"?>
> >> <jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
> >>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>    xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/
> >> jdoconfig">
>
> >>    <persistence-manager-factory name="transactions-optional">
> >>        <property name="javax.jdo.PersistenceManagerFactoryClass"
> >>            value="org.datanucleus.jdo.JDOPersistenceManagerFactory"/>
> >>        <property name="javax.jdo.option.ConnectionDriverName"
> >> value="com.google.appengine.api.rdbms.AppEngineDriver"/>
> >>        <property name="javax.jdo.option.ConnectionURL"
> >> value="jdbc:google:rdbms://instance_name/database_name"/>
> >>        <property name="javax.jdo.option.NontransactionalRead"
> >> value="true"/>
> >>        <property name="javax.jdo.option.NontransactionalWrite"
> >> value="true"/>
> >>        <property name="javax.jdo.option.RetainValues" value="true"/>
>
> >>        <property name="datanucleus.metadata.validate" value="false"/>
> >>        <property name="datanucleus.autoCreateSchema" value="true"/>
> >>        <property name="datanucleus.validateTables" value="false"/>
> >>        <property name="datanucleus.validateConstraints" value="false"/
>
> >>        <property name="datanucleus.appengine.autoCreateDatastoreTxns"
> >> value="true"/>
> >>    </persistence-manager-factory>
> >> </jdoconfig>
>
> >> On Oct 24, 5:11 am, J N <jngcl...@gmail.com> wrote:
> >> > Hi
> >> > I am trying to figure out how to run Data Nucleus with Google Cloud
> >> > SQL. I am running into trouble due to class conflicts with the built
> >> > in app-engine JDO (which also uses data nucleus for persistence to the
> >> > google data store.
>
> >> > Has anyone of you tried this. I am hoping that there is a way to make
> >> > this work. If you have worked on this  I will appreciate it very much
> >> > if you share your experience. A working example would obviously be the
> >> > best thing :-) Thanks in advance.
>
> >> > Regards
>
> > Am Mittwoch, 26. Oktober 2011 18:27:02 UTC+2 schrieb Study:
>
> >> You can try my jdoconfig.xml
>
> >> it works with built-in GAE JDO without using newer version JDO
>
> >> <?xml version="1.0" encoding="utf-8"?>
> >> <jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
> >>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>    xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/
> >> jdoconfig">
>
> >>    <persistence-manager-factory name="transactions-optional">
> >>        <property name="javax.jdo.PersistenceManagerFactoryClass"
> >>            value="org.datanucleus.jdo.JDOPersistenceManagerFactory"/>
> >>        <property name="javax.jdo.option.ConnectionDriverName"
> >> value="com.google.appengine.api.rdbms.AppEngineDriver"/>
> >>        <property name="javax.jdo.option.ConnectionURL"
> >> value="jdbc:google:rdbms://instance_name/database_name"/>
> >>        <property name="javax.jdo.option.NontransactionalRead"
> >> value="true"/>
> >>        <property name="javax.jdo.option.NontransactionalWrite"
> >> value="true"/>
> >>        <property name="javax.jdo.option.RetainValues" value="true"/>
>
> >>        <property name="datanucleus.metadata.validate" value="false"/>
> >>        <property name="datanucleus.autoCreateSchema" value="true"/>
> >>        <property name="datanucleus.validateTables" value="false"/>
> >>        <property name="datanucleus.validateConstraints" value="false"/
>
> >>        <property name="datanucleus.appengine.autoCreateDatastoreTxns"
> >> value="true"/>
> >>    </persistence-manager-factory>
> >> </jdoconfig>
>
> >> On Oct 24, 5:11 am, J N <jngcl...@gmail.com> wrote:
> >> > Hi
> >> > I am trying to figure out how to run Data Nucleus with Google Cloud
> >> > SQL. I am running into trouble due to class conflicts with the built
> >> > in app-engine JDO (which also uses data nucleus for persistence to the
> >> > google data store.
>
> >> > Has anyone of you tried this. I am hoping that there is a way to make
> >> > this work. If you have worked on this  I will appreciate it very much
> >> > if you share your experience. A working example would obviously be the
> >> > best thing :-) Thanks in advance.
>
> >> > Regards
>
> > Am Mittwoch, 26. Oktober 2011 18:27:02 UTC+2 schrieb Study:
>
> >> You can try my jdoconfig.xml
>
> >> it works with built-in GAE JDO without using newer version JDO
>
> >> <?xml version="1.0" encoding="utf-8"?>
> >> <jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
> >>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>    xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/
> >> jdoconfig">
>
> >>    <persistence-manager-factory name="transactions-optional">
> >>        <property name="javax.jdo.PersistenceManagerFactoryClass"
> >>            value="org.datanucleus.jdo.JDOPersistenceManagerFactory"/>
> >>        <property name="javax.jdo.option.ConnectionDriverName"
> >> value="com.google.appengine.api.rdbms.AppEngineDriver"/>
> >>        <property name="javax.jdo.option.ConnectionURL"
> >> value="jdbc:google:rdbms://instance_name/database_name"/>
> >>        <property name="javax.jdo.option.NontransactionalRead"
> >> value="true"/>
> >>        <property name="javax.jdo.option.NontransactionalWrite"
> >> value="true"/>
> >>        <property name="javax.jdo.option.RetainValues" value="true"/>
>
> >>        <property name="datanucleus.metadata.validate" value="false"/>
> >>        <property name="datanucleus.autoCreateSchema" value="true"/>
> >>        <property name="datanucleus.validateTables" value="false"/>
> >>        <property name="datanucleus.validateConstraints" value="false"/
>
> >>        <property name="datanucleus.appengine.autoCreateDatastoreTxns"
> >> value="true"/>
> >>    </persistence-manager-factory>
> >> </jdoconfig>
>
> >> On Oct 24, 5:11 am, J N <jngcl...@gmail.com> wrote:
> >> > Hi
> >> > I am trying to figure out how to run Data Nucleus with Google Cloud
> >> > SQL. I am running into trouble due to class conflicts with the built
> >> > in app-engine JDO (which also uses data nucleus for persistence to the
> >> > google data store.
>
> >> > Has anyone of you tried this. I am hoping that there is a way to make
> >> > this work. If you have worked on this  I will appreciate it very much
> >> > if you share your experience. A working example would obviously be the
> >> > best thing :-) Thanks in advance.
>
> >> > Regards

Re: Integrate Google sites with Cloud SQL

Hi Max

this is not yet possible, but I've passed this onto the Google Sites team

j

On Tue, Apr 24, 2012 at 2:25 AM, Max Eggeling <maxeggeling@gmail.com> wrote:
I would be happy with either option. Do you have a solution for us?


On 17 April 2012 01:41, Shao Hong Peh <shaohong86@gmail.com> wrote:
Am I right to say you guys are looking for directly "communication" with the database itself rather than going through another layer?


On Sunday, 25 December 2011 21:41:27 UTC+8, Nikhil wrote:
Hi,

Is there a widget app/something like where I can integrate my google site to show up the data (using cloud sql) from the cloudsql instance and display it on the google site page? (Primarily, it will be used only for displaying the filtered records/views from the database instance tables onto formatted html table/records. I know integrate this with google spreadsheet, but that would be something really different from what I want. 

If not, if it warrants a seperate code / project, I would be interested in collaborating one.

Thanks.




--
Joe Faith | Product Manager | Google Cloud

Re: Setting project level access for users not in a Google Apps domain.

Hi Jeff.

It's not possible to add accounts from outside of your domain.

Thanks,

Rob


On Tue, Apr 10, 2012 at 10:45 AM, Jeff Morgan <jeff@lacodatech.com> wrote:
I have a Google CloudSQL project created using my Google Apps account. To grant permission to addition Google accounts I am restricted to only accounts in my Google Apps domain (using the API Console - Team interface.) Is it possible to set project level access to users outside my gapps domain?
Thanks,
Jeff

Re: Integrate Google sites with Cloud SQL

I would be happy with either option. Do you have a solution for us?

On 17 April 2012 01:41, Shao Hong Peh <shaohong86@gmail.com> wrote:
Am I right to say you guys are looking for directly "communication" with the database itself rather than going through another layer?


On Sunday, 25 December 2011 21:41:27 UTC+8, Nikhil wrote:
Hi,

Is there a widget app/something like where I can integrate my google site to show up the data (using cloud sql) from the cloudsql instance and display it on the google site page? (Primarily, it will be used only for displaying the filtered records/views from the database instance tables onto formatted html table/records. I know integrate this with google spreadsheet, but that would be something really different from what I want. 

If not, if it warrants a seperate code / project, I would be interested in collaborating one.

Thanks.

Sunday, April 22, 2012

Re: Abridged summary of google-cloud-sql-discuss@googlegroups.com - 3 Messages in 3 Topics

I'm getting this message whenever I try to connect google cloud sql. 
I'm using local development server with jdk version 1.6.4. 
HTTP ERROR 500 
Problem accessing /uni_cloud. Reason:
com.google.appengine.repackaged.com.google.protobuf.GeneratedMessage
is a restricted class. Please see the Google  App Engine developer's
guide for more details.
Caused by: 
java.lang.NoClassDefFoundError:
com.google.appengine.repackaged.com.google.protobuf.GeneratedMessage
is a restricted class. Please see the Google  App Engine developer's
guide for more details.
        at
com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime .java:
51)
        at
com.google.appengine.repackaged.com.google.protobuf.GeneratedMessage.<clini t>(GeneratedMessage.java:
38)
        at
com.google.cloud.sql.jdbc.internal.AbstractSqlClient.createConnectRequest(A bstractSqlClient.java:
222)
        at
com.google.cloud.sql.jdbc.internal.SqlProtoClient.openConnection(SqlProtoCl ient.java:
57)
        at com.google.cloud.sql.jdbc.Driver.connect(Driver.java:66)
        at com.google.cloud.sql.jdbc.Driver.connect(Driver.java:26)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at org.uni_cloud.Uni_cloudServlet.service(Uni_cloudServlet.java:37)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
        at
com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(He aderVerificationFilter.java:
35)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi lter.java:
60)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans actionCleanupFilter.java:
43)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile Filter.java:
122)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.google.appengine.tools.development.BackendServersFilter.doFilter(Backen dServersFilter.java:
97)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
        at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
        at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
        at
com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(Dev AppEngineWebAppContext.java:
78)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
        at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:369)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
        at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:923)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
409)
        at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:582)
Powered by Jetty:// 
HERE IS CODE THAT I'm RUNNING 
package org.uni_cloud; 
import java.io.IOException;
import java.io.PrintWriter; 
import javax.servlet.http.*;
import com.google.appengine.api.rdbms.AppEngineDriver; 
import java.sql.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; 
@SuppressWarnings("serial")
public class Uni_cloudServlet extends HttpServlet {
        @Override
        public void doGet(HttpServletRequest req, HttpServletResponse resp)
                        throws IOException {
                this.service(req, resp);
        } 
        @Override
        public void doPost(HttpServletRequest req, HttpServletResponse resp)
                        throws IOException {
                this.service(req, resp);
        } 
        public void service(HttpServletRequest req, HttpServletResponse resp)
throws IOException { 
                PrintWriter out = resp.getWriter();
                Connection c =null;
                resp.setContentType("text/html; charset=utf-8"); 
                try{
                        DriverManager.registerDriver(new AppEngineDriver());
                        c = DriverManager.getConnection("jdbc:google:rdbms://uni-
cloud:unicloud/uni_cloud_db"); 
                        String query = "insert into user (username, type)values (?, ?)";
                        PreparedStatement stmt = c.prepareStatement(query);
                        stmt.setString(1, "044-bscs-08");
                        stmt.setString(2, "student"); 
                        int success = 2;
                        success = stmt.executeUpdate();
                        if(success == 1) {
                                out.println("<html><head></head><body>Success...</body></html>");
                        } else if (success == 0) {
                                out.println("<html><head></head><body>Failure!</body></html>");
                        } 
                }catch(Exception exp){ 
                }
        } 
}

========================== 
web.xml 
========================== 
<?xml version="1.0" encoding="utf-8"?> 
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
xmlns="http://java.sun.com/xml/ns/javaee
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> 
        <servlet> 
                <servlet-name>Uni_cloud</servlet-name> 
                <servlet-class>org.uni_cloud.Uni_cloudServlet</servlet-class> 
        </servlet> 
        <servlet-mapping> 
                <servlet-name>Uni_cloud</servlet-name> 
                <url-pattern>/uni_cloud</url-pattern> 
        </servlet-mapping> 
        <welcome-file-list> 
                <welcome-file>index.html</welcome-file> 
        </welcome-file-list> 
</web-app> 
please help me out... 

Re: Failed to load databases.


From what I see on our side, you have somehow gotten into a state where your client permissions are no longer valid.

Another option is that you may have dropped the mysql database, or deleted the user table contents?


jm.


FEDERATED TABLE ENGINE

Why not supporting FEDERATED STORAGE ENGINE in Google Cloud SQL?

com.google.appengine.repackaged.com.google.protobuf.GeneratedMessage is a restricted class

I'm getting this message whenever I try to connect google cloud sql.
I'm using local development server with jdk version 1.6.4.
HTTP ERROR 500
Problem accessing /uni_cloud. Reason:
com.google.appengine.repackaged.com.google.protobuf.GeneratedMessage
is a restricted class. Please see the Google  App Engine developer's
guide for more details.
Caused by:
java.lang.NoClassDefFoundError:
com.google.appengine.repackaged.com.google.protobuf.GeneratedMessage
is a restricted class. Please see the Google  App Engine developer's
guide for more details.
        at
com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime .java:
51)
        at
com.google.appengine.repackaged.com.google.protobuf.GeneratedMessage.<clini t>(GeneratedMessage.java:
38)
        at
com.google.cloud.sql.jdbc.internal.AbstractSqlClient.createConnectRequest(A bstractSqlClient.java:
222)
        at
com.google.cloud.sql.jdbc.internal.SqlProtoClient.openConnection(SqlProtoCl ient.java:
57)
        at com.google.cloud.sql.jdbc.Driver.connect(Driver.java:66)
        at com.google.cloud.sql.jdbc.Driver.connect(Driver.java:26)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at org.uni_cloud.Uni_cloudServlet.service(Uni_cloudServlet.java:37)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
        at
com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(He aderVerificationFilter.java:
35)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi lter.java:
60)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans actionCleanupFilter.java:
43)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile Filter.java:
122)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.google.appengine.tools.development.BackendServersFilter.doFilter(Backen dServersFilter.java:
97)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
        at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
        at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
        at
com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(Dev AppEngineWebAppContext.java:
78)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
        at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:369)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
        at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:923)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
409)
        at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:582)
Powered by Jetty://


HERE IS CODE THAT I'm RUNNING 
package org.uni_cloud; 
import java.io.IOException;
import java.io.PrintWriter; 

import javax.servlet.http.*;
import com.google.appengine.api.rdbms.AppEngineDriver; 

import java.sql.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; 

@SuppressWarnings("serial")
public class Uni_cloudServlet extends HttpServlet {
        @Override
        public void doGet(HttpServletRequest req, HttpServletResponse resp)
                        throws IOException {
                this.service(req, resp);
        } 

        @Override
        public void doPost(HttpServletRequest req, HttpServletResponse resp)
                        throws IOException {
                this.service(req, resp);
        } 

        public void service(HttpServletRequest req, HttpServletResponse resp)
throws IOException {

                PrintWriter out = resp.getWriter();
                Connection c =null;
                resp.setContentType("text/html; charset=utf-8"); 

                try{
                        DriverManager.registerDriver(new AppEngineDriver());
                        c = DriverManager.getConnection("jdbc:google:rdbms://uni-
cloud:unicloud/uni_cloud_db"); 

                        String query = "insert into user (username, type)values (?, ?)";
                        PreparedStatement stmt = c.prepareStatement(query);
                        stmt.setString(1, "044-bscs-08");
                        stmt.setString(2, "student"); 

                        int success = 2;
                        success = stmt.executeUpdate();
                        if(success == 1) {
                                out.println("<html><head></head><body>Success...</body></html>");
                        } else if (success == 0) {
                                out.println("<html><head></head><body>Failure!</body></html>");
                        } 

                }catch(Exception exp){ 
                }
        } 

==========================
web.xml 
==========================
<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
        <servlet>
                <servlet-name>Uni_cloud</servlet-name>
                <servlet-class>org.uni_cloud.Uni_cloudServlet</servlet-class>
        </servlet>
        <servlet-mapping>
                <servlet-name>Uni_cloud</servlet-name>
                <url-pattern>/uni_cloud</url-pattern>
        </servlet-mapping>
        <welcome-file-list>
                <welcome-file>index.html</welcome-file>
        </welcome-file-list>
</web-app>
please help me out... 


--
Regards:

M.Nasir