Google Cloud SQL unofficial blog --- Google Cloud SQL is a fully-managed database service that makes it easy to set-up, maintain, manage and administer your relational MySQL databases
Friday, March 30, 2012
Re: php support
SQuirreL connected but no tables appearing
Re: Incorrect SELECT results in GAE/SQL cloud JDBC?
Re: php support
Re: php support
Wednesday, March 28, 2012
Re: Cloud SQL and Netbeans; Limited Preview
--
Joe Faith | Product Manager | Google Cloud
Re: Hibernate Application: class not found?
unable to deploy app - 404
Tuesday, March 27, 2012
Cloud SQL and Netbeans; Limited Preview
guides for making a cloud SQL enabled project in eclipse, but how d i
make such a project in netbeans?
i have google plugin and sdk installed and seemingly working in
Netbeans 7.1.1
also, i need to know till when is the limited preview available.
Re: Hibernate Application: class not found?
As I realized there is two options to solve this issue. First one is you have to remove annotation form your domain classes and change it to Hibernate mapping file, Second option is Google App engine team should add javax.naming.NamingException class in to their white list.
My suggestion is Google App Engine team should add that "javax.naming.NamingException" class in to their white list. Otherwise we can't get full advantage of Google Cloud SQL and App Engine.
Regards,
Chandana
http://cnapagoda.blogspot.com
Re: Hibernate Application: class not found?
Monday, March 26, 2012
Re: Export database
Cloud SQL only uses Cloud Storage for storing exports, so there shouldn't be any surprises.
Joe Faith | Google Cloud Product Manager
Sent from my phone, so please excuse my brevity.
Re: Hibernate Application: class not found?
Thanks!
Rob
Re: Running Data Nucleus JDO 3.0.x with Google Cloud SQL
Re: Hibernate Application: class not found?
Re: Hibernate Application: class not found?
java.lang.SecurityException: Unable to get members for class org.hibernate.impl.SessionFactoryImpl
Sunday, March 25, 2012
performance
I have problem with performance of specific select on Cloud. Same
select on same database on local took about .5 sec. I had only one
successful run with time about 88 sec when I did it against Cloud. All
other attempts fail.
instance: appsres:appsres
problematic command:
SELECT COUNT(distinct ao_id), templates.*
FROM application_templates, templates, aobjects
WHERE appt_app_id=1 AND t_id=appt_t_id AND ao_ot_id=t_ot_id
GROUP BY t_id, t_code, t_name, t_desc, t_ot_id, t_ta_id, t_user_id
ORDER BY t_name
successful commnad (.5 sec):
SELECT COUNT(distinct ao_id), templates.*
FROM templates, aobjects
WHERE ao_ot_id=t_ot_id
GROUP BY t_id, t_code, t_name, t_desc, t_ot_id, t_ta_id, t_user_id
ORDER BY t_name
table application_templates has only 5 rows.
Saturday, March 24, 2012
Export database
I have been playing around with Google Cloud SQL. What I want to do is export the database but it seems the only way to do this via the GsUtil tool or the web console is through the use of buckets in Google Cloud Storage ..... and to use these I need to have billing enabled on my account. This is something I am not comfortable in doing because it is not clear whether you can set limits on the cloud storage billing which could lead to surprise bills (I have posted a thread over there to see if I can clear up that issue).
The only other thing I can think of is to write some script in my Google App Engine app that prints out SQL insert statements - then I download this. It seems a bit overkill but from playing with the command line - it does not seem possible. And GsUtil has the same problem as the console - I need billing activated for Google Cloud Storage.
Any ideas? Suggestions?
Cheers,
Carl.
Friday, March 23, 2012
Re:Wordpress + AppEngine = PressEngine
Just inform you that we are setting up WordPress running on AppEngine
using Cloud SQL database.
See http://press
Hope this help.
Wordpress + AppEngine = PressEngine
Just inform you that we are setting up WordPress running on AppEngine
using Cloud SQL database.
See http://pressengine.appspot.com/
Hope this help.
Has anybody successful used JPA/DataNucleus with Clould SQL?
Re: Hibernate Application: class not found?
I have already developed hibernate based application, But main defense between that and your code is, you have used org.springframework.
Hosted application code: http://code.google.com/p/cloudsql/source/browse/trunk/CloudSQLSample2/
In CloudSQLSample2 I have used org.springframework.orm.hibernate3.LocalSessionFactoryBean instead of org.springframework.
JPA problem:
There is some issue with Hibernate JPA support, because it used JPA 2.0 specification. But Google App Engine only support JPA1.0 specification.
http://stackoverflow.com/questions/7833538/jpahibernate-google-cloud-sql/
Regards,
Chandana
http://cnapagoda.blogspot.com
Re: Hibernate Application: class not found?
"trewnewmedia".
As you can read in this article http://cloud.dzone.com/articles/spring-hibernate-google
AppEngine doesn't seem to get JPA2 annotations working!!! I can't say
why!
So I will probably convert my hibernate project with old-style
*.hbm.xml mapping files...
Why does AppEngine deny the usage of classes like
EJB3DTDEntityResolver?
Re: Hibernate Application: class not found?
Did you upload a new application and it stopped working, or did it stop working with no changes to your app?
Do you see any other errors in the logs?
Hibernate Application: class not found?
error:
Injection of resource dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'mySessionFactory' defined in ServletContext
resource [/WEB-INF/spring/root-context.xml]: Invocation of init method
failed; nested exception is java.lang.NoClassDefFoundError: org/
hibernate/cfg/EJB3DTDEntityResolver at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:
287)
On my local machine, it works. My classpath is ok.
Here's my configuration (Spring):
<bean id="myDataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName"
value="com.google.appengine.api.rdbms.AppEngineDriver" />
<property name="url" value="jdbc:google:rdbms://secret:secret/
secret" />
</bean>
<bean id="mySessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="myDataSource" />
<property name="annotatedClasses">
<list>
<value>it.trew.prove.model.beans.Scadenza</value>
<value>it.trew.prove.model.beans.Fornitore</value>
<value>it.trew.prove.model.beans.Societa</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</
prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">create</prop>
<!-- <prop key="hibernate.hbm2ddl.import_files">/setup.sql</prop>
-->
</props>
</property>
</bean>
<tx:annotation-driven transaction-manager="transactionManager" />
<bean id="transactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="mySessionFactory" />
</bean>
Please help!
Wednesday, March 21, 2012
Google service accounts
There have been some changes to the Google APIs Console to support
service accounts, which make it easier to support server-to-server
interactions. As a result, you will see an extra entry in the 'Team'
tab for those projects that have Cloud SQL enabled, of the form
'xyz@developer.gserviceaccount.com'. This account is used by Google to
manage your Cloud SQL instance, but has no effect on your project.
(For example, it does not matter if you alter the permissions on this
account.)
For more about service accounts see:
http://googledevelopers.blogspot.com/2012/03/service-accounts-have-arrived.html
thanks
J
--
Joe Faith | Product Manager | Google Cloud
Re: Spring Autowiring + Hibernate = Security Exception
I tried upgrading some versions and use Hibernate4 but I still got an
only-GAE error: http://stackoverflow.com/questions/9827886/appengine-cant-find-org-hibernate-cfg-ejb3dtdentityresolver
Re: Spring Autowiring + Hibernate = Security Exception
And so? What's the solution?
Tuesday, March 20, 2012
Re: Spring Autowiring + Hibernate = Security Exception
My web app makes use of Google Cloud SQL.
It works perfectly locally, using mvn gae:run (mave gae plugin) on
local mysql db.
Here's some of my xml spring context config:
<bean id="mySessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="myDataSource" />
<property name="annotatedClasses">
<list>
<value>it.trew.prove.model.beans.Scadenza</value>
<value>it.trew.prove.model.beans.Fornitore</value>
<value>it.trew.prove.model.beans.Societa</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</
prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">create</prop>
</props>
</property>
</bean>
And here's my generic DAO.java:
@Component
public class Dao {
@Resource(name = "mySessionFactory")
private SessionFactory sessionFactory;
@SuppressWarnings("unchecked")
public <T> T save(final T o){
return (T) sessionFactory.getCurrentSession().save(o);
}
public void delete(final Object object){
sessionFactory.getCurrentSession().delete(object);
}
@SuppressWarnings("unchecked")
public <T> T get(final Class<T> type, final Long id){
return (T) sessionFactory.getCurrentSession().get(type, id);
}
@SuppressWarnings("unchecked")
public <T> T merge(final T o) {
return (T) sessionFactory.getCurrentSession().merge(o);
}
public <T> void saveOrUpdate(final T o){
sessionFactory.getCurrentSession().saveOrUpdate(o);
}
@SuppressWarnings("unchecked")
public <T> List<T> getAll(final Class<T> type) {
final Session session = sessionFactory.getCurrentSession();
final Criteria crit = session.createCriteria(type);
return crit.list();
}
}
And one of my services:
@Service
@Transactional
public class ScadenzaService {
private Dao scadenzaDao;
private SocietaService societaService;
public void salvaScadenza(Scadenza scadenza) {
scadenza.setDataInserimento(new Date());
scadenza.setSocieta(societaService.getSocietaCorrente());
scadenzaDao.save(scadenza);
}
public List<Scadenza> tutteLeScadenze() {
return scadenzaDao.getAll(Scadenza.class);
}
@Autowired
public void setScadenzaDao(Dao scadenzaDao) {
this.scadenzaDao = scadenzaDao;
}
@Autowired
public void setSocietaService(SocietaService societaService) {
this.societaService = societaService;
}
}
The error 500 on Appengine is:
Failed startup of context
com.google.apphosting.utils.jetty.RuntimeAppEngineWebAppContext@1079ff{/,/
base/data/home/apps/s~trewnewmedia/1.357617962256387950}
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'scadenziarioController': Injection of
autowired dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not
autowire method: public void
it.trew.prove.web.controllers.ScadenziarioController.setScadenzaService(it.trew.prove.services.ScadenzaService);
nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'scadenzaService': Injection of autowired
dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not
autowire method: public void
it.trew.prove.services.ScadenzaService.setSocietaService(it.trew.prove.services.SocietaService);
nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'societaService': Injection of autowired
dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not
autowire method: public void
it.trew.prove.services.SocietaService.setSocietaDao(it.trew.prove.model.dao.Dao);
nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'dao': Injection of resource dependencies
failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'mySessionFactory': Post-processing of the
FactoryBean's object failed; nested exception is
java.lang.SecurityException: Unable to get members for class
org.hibernate.impl.SessionFactoryImpl
What do you think? Why in local works and not in GAE?
Spring Autowiring + Hibernate = Security Exception
It works perfectly locally, using mvn gae:run (mave gae plugin) on
local mysql db.
Here's some of my xml spring context config:
<bean id="mySessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="myDataSource" />
<property name="annotatedClasses">
<list>
<value>it.trew.prove.model.beans.Scadenza</value>
<value>it.trew.prove.model.beans.Fornitore</value>
<value>it.trew.prove.model.beans.Societa</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</
prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">create</prop>
</props>
</property>
</bean>
And here's my generic DAO.java:
@Component
public class Dao {
@Resource(name = "mySessionFactory")
private SessionFactory sessionFactory;
@SuppressWarnings("unchecked")
public <T> T save(final T o){
return (T) sessionFactory.getCurrentSession().save(o);
}
public void delete(final Object object){
sessionFactory.getCurrentSession().delete(object);
}
@SuppressWarnings("unchecked")
public <T> T get(final Class<T> type, final Long id){
return (T) sessionFactory.getCurrentSession().get(type, id);
}
@SuppressWarnings("unchecked")
public <T> T merge(final T o) {
return (T) sessionFactory.getCurrentSession().merge(o);
}
public <T> void saveOrUpdate(final T o){
sessionFactory.getCurrentSession().saveOrUpdate(o);
}
@SuppressWarnings("unchecked")
public <T> List<T> getAll(final Class<T> type) {
final Session session = sessionFactory.getCurrentSession();
final Criteria crit = session.createCriteria(type);
return crit.list();
}
}
And one of my services:
@Service
@Transactional
public class ScadenzaService {
private Dao scadenzaDao;
private SocietaService societaService;
public void salvaScadenza(Scadenza scadenza) {
scadenza.setDataInserimento(new Date());
scadenza.setSocieta(societaService.getSocietaCorrente());
scadenzaDao.save(scadenza);
}
public List<Scadenza> tutteLeScadenze() {
return scadenzaDao.getAll(Scadenza.class);
}
@Autowired
public void setScadenzaDao(Dao scadenzaDao) {
this.scadenzaDao = scadenzaDao;
}
@Autowired
public void setSocietaService(SocietaService societaService) {
this.societaService = societaService;
}
}
The error 500 on Appengine is:
Failed startup of context
com.google.apphosting.utils.jetty.RuntimeAppEngineWebAppContext@1079ff{/,/
base/data/home/apps/s~trewnewmedia/1.357617962256387950}
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'scadenziarioController': Injection of
autowired dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not
autowire method: public void
it.trew.prove.web.controllers.ScadenziarioController.setScadenzaService(it.trew.prove.services.ScadenzaService);
nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'scadenzaService': Injection of autowired
dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not
autowire method: public void
it.trew.prove.services.ScadenzaService.setSocietaService(it.trew.prove.services.SocietaService);
nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'societaService': Injection of autowired
dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not
autowire method: public void
it.trew.prove.services.SocietaService.setSocietaDao(it.trew.prove.model.dao.Dao);
nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'dao': Injection of resource dependencies
failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'mySessionFactory': Post-processing of the
FactoryBean's object failed; nested exception is
java.lang.SecurityException: Unable to get members for class
org.hibernate.impl.SessionFactoryImpl
What do you think? Why in local works and not in GAE?
Re: Django 1.3 problem
On Monday, March 19, 2012 12:35:59 PM UTC-5, Matt Cooper wrote:
Hi Joe
1.3 seems to be running fine now on 2.7 or am I missing something? If it's all been added then thanks for that!Matt
google apps script <-> google cloud sql
first of all i try to get/put some data from google spreadsheet into
google cloud sql.
For that i found some useful link (i use the first example for my
question):
https://developers.google.com/apps-script/jdbc_overview
for the jdbc connection i use:
var conn = Jdbc.getConnection("jdbc:google:rdbms://Instance/
name_database","root", "root");
If i run the script i get this error message:
TypeError: Cannot call method "setAutoCommit" of null.
Can anyone help me with that? Do i have some additional settings in
https://code.google.com/apis/console
Thx for your help
Problems using Ibatis
This is an exception when Ibatis is trying to set a value for a java
bean property.
java.lang.IllegalArgumentException: object is not an instance of
declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:
104)
at com.ibatis.common.beans.MethodInvoker.invoke(MethodInvoker.java:
17)
at
com.ibatis.sqlmap.engine.accessplan.PropertyAccessPlan.setProperties(PropertyAccessPlan.java:
46)
is the GAE runtime engine not allowing the action?
Sunday, March 18, 2012
Re: HRD applications with cloud storage
Re: HRD applications with cloud storage
We recommend using HRD apps because that type of app will be colocated with Cloud SQL. Master slave apps are served from a different set of datacenters where cloud sql does not have presence. It will work but it will be slow.
Ken
HRD applications with cloud storage
Saturday, March 17, 2012
Re: The rdbms API is not available because the MySQLdb library could not be loaded.
Re: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
Re: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
Re: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
Friday, March 16, 2012
Unit testing Google Cloud SQL with deployed app
I'm currently testing methods that interact with the MySQL database
locally using GAEUnit (python27 runtime). However, if I deploy the app
to App Engine and try to run the tests on the cloud, GAEUnit cannot
use the rdbms service (error below). Normal interaction with the
deployed app works fine, i.e., the deployed app can talk to the Google
Cloud SQL instance.
Any ideas on how I can get access to the Google Cloud SQL instance via
GAEUnit within a deployed app?
Thanks!
Leo
Traceback (most recent call last):
File "test/test_models.py", line 144, in test_get_company_names
models.reset_test_database()
File "/base/data/home/apps/s~hd-analytics/1-0-dev.357531219904467056/models.py",
line 408, in reset_test_database
conn = rdbms.connect(instance=_INSTANCE_NAME, database=_TEST_DB)
File "/base/python27_runtime/python27_lib/versions/1/google/appengine/api/rdbms.py",
line 69, in connect
password=password)
File "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
line 480, in __init__
self.OpenConnection()
File "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
line 503, in OpenConnection
response = self.MakeRequest('OpenConnection', request)
File "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
line 606, in MakeRequest
response = self.MakeRequestImpl(stub_method, request)
File "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms_apiproxy.py",
line 66, in MakeRequestImpl
apiproxy_stub_map.MakeSyncCall('rdbms', stub_method, request, response)
File "/base/python27_runtime/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py",
line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "/base/python27_runtime/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py",
line 301, in MakeSyncCall
assert stub, 'No api proxy found for service "%s"' % service
AssertionError: No api proxy found for service "rdbms"
--
Leonardo Trabuco, Postdoctoral fellow (Russell group)
CellNetworks, University of Heidelberg, Germany
http://www.russelllab.org/people/leo/
Wednesday, March 14, 2012
Cloud SQL HRD issues?
Re: Using DictCursors
Tuesday, March 13, 2012
Re: Using DictCursors
Re: Using DictCursors
Re: Using DictCursors
Re: Using DictCursors
Hi,I am using sdk 1.6.3 on python 2.7I checked the file rdbms.py and saw the implementation of use_dict_cursor. howeverwhen i try to use it I get an exceptionUsage:conn = rdbms.connect(...)
cursor = conn.cursor(use_dict_cursor=True)Exception:cursor() got an unexpected keyword argument 'use_dict_cursor'I guess its not usable yet.
Regards
Re: Google Apps Script JDBC Service and Google Cloud SQL
Its been a long time since this post was commented. This is a very important missing feature. Any word on its status?
Monday, March 12, 2012
Re: Google Apps Script JDBC Service and Google Cloud SQL
On Wednesday, December 21, 2011 11:49:14 AM UTC-5, geoggle wrote:
Just watching http://www.google.com/events/io/2011/sessions/enterprise- workflow-with-apps-script.html and during the Q/A, Evin Levey comments on the fact that trusted testers on Hosted SQL can use Apps Script to access a database. "He'll hook them up!"
So that was in May 2011. I'm guessing Hosted SQL was the name used for Cloud SQL before it was released officially in November.
Is there a timeframe for 2012 when we might see this?
Geoff
Re: Write Consistency & Geographical Replication
Sunday, March 11, 2012
Re: Is the data stable?
Joe Faith | Google Cloud Product Manager
Sent from my phone, so please excuse my brevity.
Re: Is the data stable?
Re: Using DictCursors
Re: Write Consistency & Geographical Replication
Saturday, March 10, 2012
Re: Is the data stable?
All your data will be replicated in multiple locations, and we won't make any changes to the service - even during limited preview - that would put your data at risk.
For what its worth, many internal systems here at Google run on Cloud SQL.
Hope this helps.
Joe Faith | Google Cloud Product Manager
Sent from my phone, so please excuse my brevity.
Re: Is the data stable?
All your data will be replicated in multiple locations, and we won't make any changes to the service - even during limited preview - that would put your data at risk.
For what its worth, many of our internal systems here at Google run on Cloud SQL.
Hope this helps.
Joe Faith | Google Cloud Product Manager
Sent from my phone, so please excuse my brevity.
Friday, March 9, 2012
Is the data stable?
Re: Write Consistency & Geographical Replication
Write Consistency & Geographical Replication
How are you able to perform "multiply geographically replicated"; is
this done using MMM replication?
Thursday, March 8, 2012
Re: Free quota and Minimum Monthly
Joe Faith | Product Manager | Google Cloud
Free quota and Minimum Monthly
developing using cloud-sql and app-engine ?
Will there be a min monthly charge like we have 10 USD for App
Engine ?
We need these answers before investing our time in this. Pleeeez
How to call a backends job from cron job in java
<?xml version="1.0" encoding="UTF-8"?>
<backends>
<backend name="cmdline1">
<options>
<dynamic>true</dynamic>
<public>true</public>
</options>
</backend>
</backends>
This back end job calls a servlet using the <url-pattern>/_ah/start</url-pattern> from the web.xml.
and i called this back end job from a cron.xml
<?xml version="1.0" encoding="UTF-8"?>
<cronentries>
<cron>
<url>/test</url>
<schedule>every 1 minutes</schedule>
<target>cmdline1</target>
</cron>
</cronentries>.
But i tapped the servlet using req.getRequestURI(), the servlet is always call using the url /test and not call from backend job except in the case of initial application run. Is this way is correct ? Or how can i call backend job from cron.xml?
Re: App Engine crone jobs not working on cloud sql database in java
<cron>
<url>/test</url>
<schedule>every 2 hours</schedule>
<target>version-1</target>
</cron>
and changed the default version of application to 1 also.
Wednesday, March 7, 2012
Re: Classcast Exception using GAE/J+Spring+JPA+MySQL
java.lang.ClassCastException: org.datanucleus.store.rdbms.RDBMSManager
cannot be cast to org.datanucleus.store.appengine.DatastoreManager
at
org.datanucleus.store.appengine.jpa.DatastoreEntityManager.<init>(DatastoreEntityManager.java:
38)
at
org.datanucleus.store.appengine.jpa.DatastoreEntityManagerFactory.newEntityManager(DatastoreEntityManagerFactory.java:
102)
at
org.datanucleus.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:
407)
Re: Android connect Google Cloud Sql
Re: Additional admins
What is the project id, and email address you're adding? Feel free to reply privately.
Tuesday, March 6, 2012
Android connect Google Cloud Sql
I'm trying to connect google cloud sql from my android, but failed due
to acck of information on this. Appreciate if anyone can help me
provides link or documentations on "How to connect Google cloud sql
from Android".Just like fetching data from Google cloud sql. Please
help. Thanks
Re: Insert Into User
Following your tip I could manage to produce the same result as the
old SQL.
Here is the code updated:
CREATE USER 'testuser'@'localhost';
SET PASSWORD FOR 'testuser'@'localhost' = PASSWORD('123');
GRANT ALL ON testdb.* TO 'testuser'@'localhost';
Thank you!
PS: Is it possible to mark this thread as solved?
Additional admins
I do with AppEngine, but I can't seem to find how to do it in the
GUI. I'd love to have it show up in their admin console.
Thanks
Re: Insert Into User
Insert Into table from SQuirreL without SQL (phpmyadmin style)
Maybe some SQuirreL plug-in...
Thank you.
Insert Into User
I have an old MySQL code (3.23.41) to insert users into a database:
INSERT INTO user
VALUES('localhost','test',PASSWORD('123'),'N','N','N','N','N','N','N','N','N','N','N','N','N','N');
INSERT INTO db
VALUES('localhost','test','test','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
I have received the following error:
Error 1136:
Column count doesn't match value count at row 1
I already discover that this occurs by an increase number of columns
in later releases.
I´ve found on a forum the following answer to the issue:
insert into user
(Host,User,Password,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Reload_priv,Shutdown_priv,Process_priv,File_priv,Grant_priv,References_priv,Index_priv,Alter_priv,Show_db_priv,Super_priv,Create_tmp_table_pri,Lock_tables_priv,Execute_priv,Repl_slave_priv,Repl_client_priv,Create_view_priv,Show_view_priv,Create_routine_priv,Alter_routine_priv,Create_user_priv
) values
('your_host','your_username',password('your_password'),'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
But it is not what I need, as I intent to give no rights on mysql
enviroment and full rights on database.
Before I start to change the 'Y' to 'N' I´m trying to see if someone
can point me into the right direction, or maybe a new way to do this.
Thank you!
Saturday, March 3, 2012
Re: Connection Pool
On Tuesday, November 1, 2011 11:44:30 AM UTC-7, javabuddy wrote:
How to establish Connection Pool in GAE using AppEngineDriver in Cloud
SQL or native datastore??
Thanks
Re: The rdbms API is not available because the MySQLdb library could not be loaded.
Re: Connection Pool
private Connection connection;
public void init(ServletConfig c) throws ServletException {
//Open the connection here
}
public void destroy() {
//Close the connection here
}
public void doGet (HttpServletRequest req, HttpServletResponse res) throws ServletException {
//Use the connection here
Statement stmt = connection.createStatement();
}
On Friday, March 2, 2012 10:37:05 PM UTC+5:30, Joe Faith wrote:
Database connections in a cloud hosted environment should be managed differently to those on a conventional server. In particular, be aware that your database instance may be taken offline while not in use, and any pooled connections would be closed. We recommend that a new connection is created to service each HTTP request, and re-used for the duration of that request (since the time to create a new connection is similar to that required to test the liveness of an existing connection).
J
Good question ! I'm in need of the answer as well...
Le mardi 1 novembre 2011 19:44:30 UTC+1, javabuddy a écrit :
How to establish Connection Pool in GAE using AppEngineDriver in Cloud
SQL or native datastore??
Thanks
--
Joe Faith | Product Manager | Google Cloud
Friday, March 2, 2012
Re: Connection Pool
Good question ! I'm in need of the answer as well...
Le mardi 1 novembre 2011 19:44:30 UTC+1, javabuddy a écrit :
How to establish Connection Pool in GAE using AppEngineDriver in Cloud
SQL or native datastore??
Thanks
Joe Faith | Product Manager | Google Cloud
Re: Mysql Performance
Hello!
I have a simple table called "tbl_languages"
tl_id smallint unsigned not null primary_key auto_increment
tl_key varchar(45) not null UNIQUE
tl_short_key varchar(5) not null UNIQUE
tl_description text
tl_supported boolean not null default false
INSERT INTO tbl_languages (tl_key, tl_short_key, tl_supported)
VALUES ('german', 'de', true);
In the Google Api Console I get a 3-4ms for "SELECT * FROM tbl_languages" but in the GAE I get 80-100ms.
Is the connection between my GAE App and the Mysql Database so slow?
Thanks for help!
Re: Running Data Nucleus JDO 3.0.x with Google Cloud SQL
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
Re: Connection Pool
Le mardi 1 novembre 2011 19:44:30 UTC+1, javabuddy a écrit :
How to establish Connection Pool in GAE using AppEngineDriver in Cloud
SQL or native datastore??
Thanks
Thursday, March 1, 2012
Mysql Performance
I have a simple table called "tbl_languages"
tl_id smallint unsigned not null primary_key auto_increment
tl_key varchar(45) not null UNIQUE
tl_short_key varchar(5) not null UNIQUE
tl_description text
tl_supported boolean not null default false
INSERT INTO tbl_languages (tl_key, tl_short_key, tl_supported)
VALUES ('german', 'de', true);
In the Google Api Console I get a 3-4ms for "SELECT * FROM tbl_languages" but in the GAE I get 80-100ms.
Is the connection between my GAE App and the Mysql Database so slow?
Thanks for help!
Re: Classcast Exception using GAE/J+Spring+JPA+MySQL
Re: DatabaseMetaData on version 5.5
Re: App Engine crone jobs not working on cloud sql database in java
One thing I noted, is you don't want to do the DriverManager.registerDriver inside of the doGet since that will leak new driver instances are they are added to the drivermanager each time you handle a request. Please do that in a static initializer only once.
Thanks,
Rob
Re: App Engine crone jobs not working on cloud sql database in java
You need to specify your actual full instance name in the connection string, not "testdb".