[google-appengine] Blobstore issues?

2010-08-12 Thread Cesar Alaniz
I see this when I run my blobstore handler in google's app
engine...Anybody have any idea what it means?

Traceback (most recent call last):
  File "distlib/tipfy/application.py", line 249, in __call__
response = handler.dispatch(method, **self.rule_args)
  File "distlib/tipfy/application.py", line 71, in dispatch
response = method(*args, **kwargs)
  File "distlib/tipfy/ext/auth/__init__.py", line 510, in decorated
return func(*args, **kwargs)
  File "/base/data/home/apps/alanisoft/4.34409620337532/apps/blog/
handlers.py", line 42, in get
return render_response('blog/post.html', post=post,
app_id=get_config('apps.facebook', 'app_id'),
upload_url=blobstore.create_upload_url(url_for('blog/upload')))
  File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/blobstore/blobstore.py", line 192, in create_upload_url
_make_sync_call('blobstore', 'CreateUploadURL', request, response)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/apiproxy_stub_map.py", line 78, in MakeSyncCall
return apiproxy.MakeSyncCall(service, call, request, response)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/apiproxy_stub_map.py", line 276, in MakeSyncCall
rpc.MakeCall(service, call, request, response)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/apiproxy_rpc.py", line 108, in MakeCall
self._MakeCallImpl()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/
runtime/apiproxy.py", line 124, in _MakeCallImpl
assert isinstance(self.request, ProtocolBuffer.ProtocolMessage)
AssertionError

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: ConcurrentModificationException with no datastore operation and only two task to be enqueue in a single transaction

2011-04-15 Thread Anze Cesar
I'm seeing a lot of ConcurrentModificationExceptions today too. The most
recent is a servlet that just serves a static file, which makes little sense
to me.

On Fri, Apr 15, 2011 at 3:39 PM, Matija  wrote:

> OMG... Seventh time again but eighth time everything is fine. This happened
> in 3 out of 8 times. What can I do to avoid it ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>



-- 
lp,
Anže

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Instances

2011-05-03 Thread Anze Cesar
We have a similar problem. I've disabled the app, so all instances were
turned off and upon enabling it again, there were instantly 8 instances
running. We're also seeing weird behavior as it seems that not all instances
have the same state (which really puzzles me, since the app is stateless). I
thought it's a problem with cache (consequent reads yielded different
results), but the problem remains without cache.

We're running Play 1.1 framework.

On Tue, May 3, 2011 at 3:59 PM, Eduardo Perrino
wrote:

> Hi!!
>
> We have problems with the instance feature of appengine. Today we have
> got 16 instances,  and we've detected that many of them when receive a
> request, it has to start the application again. So our application
> consumes a lot of cpu because our startup process is a little heavy.
>
> To solve this situation we've enabled always on feature, and the
> problem becomes bigger, because always on instances has to start the
> application too.
>
> We don't understand this behavior and we need help to solve this.
> Otherwise we'll have to stop using appengine as a valid JAVA
> development platform because stop and start in every moment the
> application is unacceptable into this enviroment.
>
>
> Eduardo
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
lp,
Anže

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Instances

2011-05-04 Thread Anze Cesar
No we're not storing anything in local memory.
One thing that's happening constantly is we delete all entities of a given
type for a user, clear the list from cache and it seems fine, but when the
user refreshes, the entities are back, often for a couple of refreshes and
then they're gone again. Often they appear and disappear between two
consequent refreshes.

This all started last week, without any changes to the code base.

On Wed, May 4, 2011 at 4:36 PM, Robert Kluin  wrote:

> Hi Anze,
>  Are you changing / caching things in 'local' memory or something?
> It is stateless in that requests may go to any instance, not the same
> one each time.
>
>
>
> Robert
>
>
>
>
>
> On Wed, May 4, 2011 at 02:16, Anze Cesar  wrote:
> > We have a similar problem. I've disabled the app, so all instances were
> > turned off and upon enabling it again, there were instantly 8 instances
> > running. We're also seeing weird behavior as it seems that not all
> instances
> > have the same state (which really puzzles me, since the app is
> stateless). I
> > thought it's a problem with cache (consequent reads yielded different
> > results), but the problem remains without cache.
> >
> > We're running Play 1.1 framework.
> >
> > On Tue, May 3, 2011 at 3:59 PM, Eduardo Perrino <
> eduardo.perr...@gmail.com>
> > wrote:
> >>
> >> Hi!!
> >>
> >> We have problems with the instance feature of appengine. Today we have
> >> got 16 instances,  and we've detected that many of them when receive a
> >> request, it has to start the application again. So our application
> >> consumes a lot of cpu because our startup process is a little heavy.
> >>
> >> To solve this situation we've enabled always on feature, and the
> >> problem becomes bigger, because always on instances has to start the
> >> application too.
> >>
> >> We don't understand this behavior and we need help to solve this.
> >> Otherwise we'll have to stop using appengine as a valid JAVA
> >> development platform because stop and start in every moment the
> >> application is unacceptable into this enviroment.
> >>
> >>
> >> Eduardo
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Google App Engine" group.
> >> To post to this group, send email to google-appengine@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> google-appengine+unsubscr...@googlegroups.com.
> >> For more options, visit this group at
> >> http://groups.google.com/group/google-appengine?hl=en.
> >>
> >
> >
> >
> > --
> > lp,
> > Anže
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To post to this group, send email to google-appengine@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/google-appengine?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
lp,
Anže

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Instances

2011-05-04 Thread Anze Cesar
Master/slave

On Wed, May 4, 2011 at 4:44 PM, Robert Kluin  wrote:

> High-replication datastore?
>
>
>
>
>
>
> On Wed, May 4, 2011 at 10:43, Anze Cesar  wrote:
> > No we're not storing anything in local memory.
> > One thing that's happening constantly is we delete all entities of a
> given
> > type for a user, clear the list from cache and it seems fine, but when
> the
> > user refreshes, the entities are back, often for a couple of refreshes
> and
> > then they're gone again. Often they appear and disappear between two
> > consequent refreshes.
> >
> > This all started last week, without any changes to the code base.
> >
> > On Wed, May 4, 2011 at 4:36 PM, Robert Kluin 
> wrote:
> >>
> >> Hi Anze,
> >>  Are you changing / caching things in 'local' memory or something?
> >> It is stateless in that requests may go to any instance, not the same
> >> one each time.
> >>
> >>
> >>
> >> Robert
> >>
> >>
> >>
> >>
> >>
> >> On Wed, May 4, 2011 at 02:16, Anze Cesar  wrote:
> >> > We have a similar problem. I've disabled the app, so all instances
> were
> >> > turned off and upon enabling it again, there were instantly 8
> instances
> >> > running. We're also seeing weird behavior as it seems that not all
> >> > instances
> >> > have the same state (which really puzzles me, since the app is
> >> > stateless). I
> >> > thought it's a problem with cache (consequent reads yielded different
> >> > results), but the problem remains without cache.
> >> >
> >> > We're running Play 1.1 framework.
> >> >
> >> > On Tue, May 3, 2011 at 3:59 PM, Eduardo Perrino
> >> > 
> >> > wrote:
> >> >>
> >> >> Hi!!
> >> >>
> >> >> We have problems with the instance feature of appengine. Today we
> have
> >> >> got 16 instances,  and we've detected that many of them when receive
> a
> >> >> request, it has to start the application again. So our application
> >> >> consumes a lot of cpu because our startup process is a little heavy.
> >> >>
> >> >> To solve this situation we've enabled always on feature, and the
> >> >> problem becomes bigger, because always on instances has to start the
> >> >> application too.
> >> >>
> >> >> We don't understand this behavior and we need help to solve this.
> >> >> Otherwise we'll have to stop using appengine as a valid JAVA
> >> >> development platform because stop and start in every moment the
> >> >> application is unacceptable into this enviroment.
> >> >>
> >> >>
> >> >> Eduardo
> >> >>
> >> >> --
> >> >> You received this message because you are subscribed to the Google
> >> >> Groups
> >> >> "Google App Engine" group.
> >> >> To post to this group, send email to
> google-appengine@googlegroups.com.
> >> >> To unsubscribe from this group, send email to
> >> >> google-appengine+unsubscr...@googlegroups.com.
> >> >> For more options, visit this group at
> >> >> http://groups.google.com/group/google-appengine?hl=en.
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > lp,
> >> > Anže
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups
> >> > "Google App Engine" group.
> >> > To post to this group, send email to
> google-appengine@googlegroups.com.
> >> > To unsubscribe from this group, send email to
> >> > google-appengine+unsubscr...@googlegroups.com.
> >> > For more options, visit this group at
> >> > http://groups.google.com/group/google-appengine?hl=en.
> >> >
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Google App Engine" group.
> >> To post to this group, send email to google-appengine@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> google-appengine+unsubscr...@googlegroups.com.
> >> For more options, visit this group at
> >> http://groups.google.com/group/google-appengine?hl=en.
> >>
> >
> >
> >
> > --
> > lp,
> > Anže
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To post to this group, send email to google-appengine@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/google-appengine?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
lp,
Anže

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Migration from gae datastore java API to MySQL

2013-02-13 Thread Cesar Ruiz
I was wondering if it is possible to migrate from gae datastore (Java API) 
to MySQL... is there exist an bulkdownloader as for python.

What is the best approach for doing this maybe using JPA?.

please I need some help as it has been 5 days already looking for something 
before getting my hands dirty with code.

Thank you very much in advanced.

Regards.

A desperate man.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] Re: Problems installing jdk8 in flex

2017-02-07 Thread Cesar Oyarzun
Hey Vinay I did try your comand but it doesn't work for me I'm getting this 
error 

E: The value 'jessie-backports' is invalid for APT::Default-Release as such 
a release is not available in the sources

On Monday, February 6, 2017 at 11:06:45 PM UTC-5, Vinay Chitlangia wrote:
>
> Thanks Adam.
> In case anybody is facing a similar issue. This is the command that worked.
> apt-get -y -q --no-install-recommends install -t jessie-backports openjdk-
> 8-jdk && \
>
> On Saturday, February 4, 2017 at 3:05:38 AM UTC+5:30, Adam (Cloud Platform 
> Support) wrote:
>>
>> It looks like openjdk-8-jre was updated in jessie-backports but 
>> openjdk-8-jdk-headless wasn't updated in the same repository (by the Debian 
>> maintainers). Two things you can try are:
>>
>> 1) Use the version from the 'stable' distribution in your Dockerfile:
>> apt-get -y -q --no-install-recommends install -t stable openjdk-8-jdk && 
>> \
>>
>>
>> 2) Manually install the needed dependency before openjdk-8-jdk:
>> apt-get -y -q --no-install-recommends install openjdk-8-jdk-headless=
>> 8u121-b13-1~bpo8+1 && \
>>
>> The second step would only work if that version existed in a repository, 
>> and you had that repo in your /etc/apt/sources.list (eg. 'testing' or 
>> 'unstable'), so further messing about with that may be necessary.
>>
>> On Friday, February 3, 2017 at 11:54:05 AM UTC-5, Vinay Chitlangia wrote:
>>>
>>> I am facing some problem when trying to install openjdk-8 in the flex 
>>> environment.
>>>
>>> Our setup is to use jetty9-compat runtime with openjdk-8 (We install jdk 
>>> to do dynamic compilation). The setup was working fine till about 2-3 days 
>>> back.
>>>
>>> Now when I try to install I get the following error:
>>>
>>>
>>> The following packages have unmet dependencies:
>>>
>>>  openjdk-8-jdk : Depends: openjdk-8-jre (= 8u121-b13-1~bpo8+1) but 
>>> 8u111-b14-2~bpo8+1 is to be installed
>>>
>>>  Depends: openjdk-8-jdk-headless (= 8u121-b13-1~bpo8+1) 
>>> but it is not going to be installed
>>>
>>>
>>>
>>> Our dockerfile is:
>>>
>>> FROM gcr.io/google_appengine/jetty9-compat
>>>
>>> RUN apt-get -q update && \
>>>
>>> apt-get -y -q --no-install-recommends install openjdk-8-jdk && \
>>>
>>> apt-get clean && \
>>>
>>> rm /var/lib/apt/lists/*_*
>>>
>>> ADD . /app
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/6a306e57-bd13-40b4-872e-238a4c38bec5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] I can't get data from Datastore in App Engine but can add and delete

2018-01-16 Thread Cesar SC
Does someone know what's wrong with this code?
Thanks

const express = require('express');
const bodyParser = require('body-parser');
const engine = require('ejs-mate');
const Datastore = require('@google-cloud/datastore');

var app = express();

app.set('trust proxy', true);
app.use(express.static(__dirname + '/public'));
app.engine('ejs', engine);
app.set('view engine', 'ejs');

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));

const datastore = Datastore();

app.get('/', (req, res)=>{
res.render('home');
});

app.get('/adduser', (req, res)=>{
res.render('adduser');
});
//WORKS
app.post('/adduserpost', (req, res) => {

const user = {
timestamp: new Date,
name: req.body.name_field,
girl: req.body.girl_field,
car: req.body.car_field
}

datastore.save({
key: datastore.key('usersTable'),
data: user
}).then(() => {
res.redirect('/');
}).catch((err) => {
res.redirect('/');
});

});

app.get('/getuser', (req, res) => {
res.render('getuser');
});
//DOESN'T WORK
app.post('/getuserpost', (req, res) => {
const query = datastore.createQuery('usersTable').filter('girl', req.body.
girl_field).order('timestamp', { descending: true }).limit(10);
datastore.runQuery(query).then((results) => {
const entities = results[0];
res.json(entities[0]);
});
});
//WORKS
app.get('/getuserget', (req, res) => {
const query = datastore.createQuery('usersTable').order('timestamp', { 
descending: true }).limit(10);
datastore.runQuery(query).then((results) => {
const entities = results[0];
res.json(entities[0]);
});
});

app.get('/deleteuser', (req, res) => {
res.render('deleteuser');
});
//WORKS
app.post('/deleteuserpost', (req, res) => {
const query = datastore.createQuery('usersTable').filter('car', req.body.
car_field);
datastore.runQuery(query).then((results) => {
const entities = results[0];
datastore.delete(entities[0][datastore.KEY], (err) => {
if (!err) {
res.redirect('/');
}
});
});
});

const PORT = process.env.PORT || 8080;
app.listen(PORT, (err) => {
if(err){
console.log(err);
}else{
console.log("Running...");
}
});

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/3d578dee-674f-4c81-a96a-8cb595cdfba5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] I can't get data from Datastore in App Engine but can add and delete

2018-01-16 Thread Cesar SC

const express = require('express');
const bodyParser = require('body-parser');
const engine = require('ejs-mate');
const Datastore = require('@google-cloud/datastore');

var app = express();

app.set('trust proxy', true);
app.use(express.static(__dirname + '/public'));
app.engine('ejs', engine);
app.set('view engine', 'ejs');

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));

const datastore = Datastore();

app.get('/', (req, res)=>{
res.render('home');
});

app.get('/adduser', (req, res)=>{
res.render('adduser');
});
//WORKS
app.post('/adduserpost', (req, res) => {

const user = {
timestamp: new Date,
name: req.body.name_field,
girl: req.body.girl_field,
car: req.body.car_field
}

datastore.save({
key: datastore.key('usersTable'),
data: user
}).then(() => {
res.redirect('/');
}).catch((err) => {
res.redirect('/');
});

});

app.get('/getuser', (req, res) => {
res.render('getuser');
});
//DOESN'T WORK
app.post('/getuserpost', (req, res) => {
const query = datastore.createQuery('usersTable').filter('girl', req.body.
girl_field).order('timestamp', { descending: true }).limit(10);
datastore.runQuery(query).then((results) => {
const entities = results[0];
res.json(entities[0]);
});
});
//WORKS
app.get('/getuserget', (req, res) => {
const query = datastore.createQuery('usersTable').order('timestamp', { 
descending: true }).limit(10);
datastore.runQuery(query).then((results) => {
const entities = results[0];
res.json(entities[0]);
});
});

app.get('/deleteuser', (req, res) => {
res.render('deleteuser');
});
//WORKS
app.post('/deleteuserpost', (req, res) => {
const query = datastore.createQuery('usersTable').filter('car', req.body.
car_field);
datastore.runQuery(query).then((results) => {
const entities = results[0];
datastore.delete(entities[0][datastore.KEY], (err) => {
if (!err) {
res.redirect('/');
}
});
});
});

const PORT = process.env.PORT || 8080;
app.listen(PORT, (err) => {
if(err){
console.log(err);
}else{
console.log("Running...");
}
});

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/8cf5f4d3-2708-4f61-be47-780f83673173%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: I can't get data from Datastore in App Engine but can add and delete

2018-01-16 Thread Cesar SC


This doesn't work neither

//DOESN'T WORK
app.post('/getuserpost', (req, res) => {
const query = datastore.createQuery('usersTable').filter('girl', req.body.
girl_field).order('timestamp', { descending: true }).limit(10);
datastore.runQuery(query).then((results) => {
const entities = results[0];
datastore.get(entities[0][datastore.KEY], (err, entity)=>{
if(!err){
res.json(entity);
}
});
});
});

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/c8e368bd-b98a-4945-b654-cc8d75ee014e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: I can't get data from Datastore in App Engine but can add and delete

2018-01-16 Thread Cesar SC


Tags for Node JS would be great for this group. I have forgotten to write 
Node JS in the title

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/95496d22-2c30-435b-9a22-391ad4722c8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: I can't get data from Datastore in App Engine but can add and delete

2018-01-16 Thread Cesar SC


Thanks for the answer Jordan. 
There are entities and I have done indexes after your answer but keeps 
without running.
I'll wait to see if the new indexes loads

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/3acc5464-0d67-4f77-8e01-d47e0f31ef40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: I can't get data from Datastore in App Engine but can add and delete

2018-01-17 Thread Cesar SC
THIS CODE WORKS!

//WORKS
app.post('/getuserpost', (req, res) => {
const query = datastore.createQuery('usersData').filter('girl', req.body.
girl_field);
datastore.runQuery(query).then((results) => {
const entities = results[0];
datastore.get(entities[0][datastore.KEY], (err, entity) => {
if (!err) {
res.send(entity);
}
});
});
});

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/820e6667-0499-4e44-912f-2742041a9278%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Error while trying to log in to google accounts

2011-08-17 Thread Cesar Gonzalez-Tellez
When I try to log in to google accounts to check or modify my GAP app at:
http://appengine.google.com/_ah/login?continue=http://appengine.google.com/
I get this error:
Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please 
reportyour problem and mention 
this error message and the query that caused it.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/MYpA5skvRJwJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Help a Noob create an endpoints project in eclipse

2016-03-19 Thread Cesar Alvarado Peragallo

Hi Jim

Here a great article to start 
http://rominirani.com/2014/01/10/google-cloud-endpoints-tutorial-part-1/

PS : I build EndPoint with Golang instead Java ..

On Friday, March 18, 2016 at 4:07:00 PM UTC-5, Jim Craft wrote:
>
> I am very new to the world of GAE (and similar).  I have worked through 
> the examples provided under the Documentation links whereby we generate the 
> projects with Maven.  That's all fine and dandy until Maven won't make the 
> project (that will be another thread perhaps).  I am using the Google 
> Plugin for Eclipse Luna (4.4) and I have read the associated documentation. 
>  However, I can't find a tutorial/how-to that shows me how to create an 
> endpoint backend project without first creating an Android application 
> project.  I would like to just create the endpoint backend project in 
> Eclipse then worry about the Web/Android/iOS app.  Any help/pointers/etc. 
> would be appreciated!
>
> Cheers!
>
> Jim
> PS: I'm reasonably comfortable with Eclipse and Java SE but this realm is 
> all very new to me.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/e9b54466-5e73-46d7-89bb-d87f1d678255%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Configuring Cloud SQL and JPA with Eclipse

2014-10-08 Thread Cesar Alvarado P.

These log is local o remote ?

On Saturday, October 4, 2014 1:53:14 PM UTC-5, Nick wrote:
>
>
> However I continue to get this error:
>
> Exception [EclipseLink-4021] (Eclipse Persistence Services - 
> 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
>> Exception Description: Unable to acquire a connection from driver [null], 
>> user [null] and URL [null].  Verify that you have set the expected driver 
>> class and URL.  Check your login, persistence.xml or sessions.xml resource.  
>> The jdbc.driver property should be set to a class that is compatible with 
>> your database platform
>>
>>
> Any insight on this problem would be great as I would like to get back to 
> developing my app.
>
> Below is the relevant code:
>
>
>
> *persistence.xml*
>
>> > xmlns="http://java.sun.com/xml/ns/persistence";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
>> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"; 
>> version="1.0">
>> 
>> org.eclipse.persistence.jpa.PersistenceProvider
>> 
>> 
>> 
>> 
>>
>>  *appengine-web.xml*
>
> * > xmlns="http://appengine.google.com/ns/1.0 
>> "> redacted 
>> 1 true 
>> true  
>>   
>>  > />   > name="java.util.logging.config.file" value="WEB-INF/logging.properties"/> 
>> > value="jdbc:mysql://127.0.0.1:3306/TestDB?user=root 
>> "/> > value="jdbc:google:mysql://redacted:main/TestDB?user=root"/> 
>>  *
>
>
> *project structure*
>
>
>  
>
>
> 
>
>
>
>
> 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] I need some tips

2011-04-09 Thread Júlio Cesar Bueno Cotta
Hello there,
I am new on App Engine and need some help and I am sorry if I am asking 
silly things.
I read some tutorial in the App Engine site, but I still have some 
questions, I also had try to threads over the group, but none what I found 
help me and of course I had search on Google.
Let me try explain..
I want do create a simple webservice to return a fortune.I think...When I 
send the project to App Engine the application need to populate the DB of 
fortunes.
I am following the link 
to
 
get data to the data base. I think I can write a query to add data to, 
right? But where call the method to populate?
I would like to know if is there  some class that I can extend and override 
methods that is call from my application when it is being installed on App 
Engine?
Something like:
Class Inst extend Install{

  @Override
  public void onInstall(){
//populate DB

  }

  @Override
  public void OnRemove(){
// Remove DB
  }
}

I also would like to know if the webservice can be public, I mean..the 
client application don't need to login on a Google Account.
Thanks in advance and sorry for my poor English, I am from Brasil.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] I need some tips

2011-04-09 Thread Júlio Cesar Bueno Cotta
2011/4/9 Brandon Wirtz 

> Are you going to use Python or Java?
>
> Java

>
>
> Start with hello world.
>
>
>
I did before post here.

> Then consider using the Data Store Viewer to add content to a database.
>
>
>
I search about it on Google and didnot find a reference, may you give me
one?


> Then try displaying the contents of the datastore entity you created.
>
>
>
>
>
> Based on your descript GAE is WAY MORE than you need.  I’d pick a free PHP
> hosting provider.
>
> I know App Engine is much more than I need now , but I want to learn about
App Engine and that seens to be a good start..I will handle data and store
it and have a web service. That is just one small project to me, but I have
big ones in my mind. :-D
Thanks!

>
>
> -Brandon
>
>
>
>
>
>
>
> *From:* google-appengine@googlegroups.com [mailto:
> google-appengine@googlegroups.com] *On Behalf Of *Júlio Cesar Bueno Cotta
> *Sent:* Saturday, April 09, 2011 6:15 PM
> *To:* google-appengine@googlegroups.com
> *Subject:* [google-appengine] I need some tips
>
>
>
> Hello there,
> I am new on App Engine and need some help and I am sorry if I am asking
> silly things.
> I read some tutorial in the App Engine site, but I still have some
> questions, I also had try to threads over the group, but none what I found
> help me and of course I had search on Google.
> Let me try explain..
> I want do create a simple webservice to return a fortune.I think...When I
> send the project to App Engine the application need to populate the DB of
> fortunes.
> I am following the link
> <http://code.google.com/intl/pt-BR/appengine/docs/java/datastore/dataclasses.html>to
> get data to the data base. I think I can write a query to add data to,
> right? But where call the method to populate?
> I would like to know if is there  some class that I can extend and override
> methods that is call from my application when it is being installed on App
> Engine?
> Something like:
> Class Inst extend Install{
>
>   @Override
>   public void onInstall(){
> //populate DB
>
>   }
>
>   @Override
>   public void OnRemove(){
> // Remove DB
>   }
> }
>
> I also would like to know if the webservice can be public, I mean..the
> client application don't need to login on a Google Account.
> Thanks in advance and sorry for my poor English, I am from Brasil.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>



-- 
Júlio Cesar Bueno Cotta
Bacharel em Ciência da Computação pela UFV
Mestrando em Ciência da Computação pela UFABC

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] I need some tips

2011-04-11 Thread Júlio Cesar Bueno Cotta
Hi Robert, I got put the service on with all my fortunes.
I just did that

String query = "select from " + FortunesDAO.class.getName();
fortunes = (List) pm.newQuery(query).execute();
if fortunes.size() == 0
add to DB
else
"Live is good!"
:-D

That is not the best pratice requesting all the fortunes each time the app
run, so with the DB OK, I just remove the verification. :D

I still dont made a client to access the service, but you can access here
http://fortunesweb.appspot.com/fortunesweb?id=1
:-D

Just one thing more..what will happen if someone give me a DOS atack? Google
just turn the service off when my quota become full?
Can someone give me a tip about a way to avoid a massive access to the
service? Add a key?
Thanks for the help!

2011/4/10 Robert Kluin 

> Hi Júlio,
>  As I understand, you are trying to run an initial data import when
> you first deploy your application.  I would suggest you write an
> 'admin page' to load the data.  Then you can login and load the data
> after deploying your app.  Alternatively you could use the bulkloader
> tool (I believe it is in the Python section of the docs) to load data
> into your app.
>
>
>
> Robert
>
>
>
>
>
>
> 2011/4/9 Júlio Cesar Bueno Cotta :
> > Hello there,
> > I am new on App Engine and need some help and I am sorry if I am asking
> > silly things.
> > I read some tutorial in the App Engine site, but I still have some
> > questions, I also had try to threads over the group, but none what I
> found
> > help me and of course I had search on Google.
> > Let me try explain..
> > I want do create a simple webservice to return a fortune.I think...When I
> > send the project to App Engine the application need to populate the DB of
> > fortunes.
> > I am following the link to get data to the data base. I think I can write
> a
> > query to add data to, right? But where call the method to populate?
> > I would like to know if is there  some class that I can extend and
> override
> > methods that is call from my application when it is being installed on
> App
> > Engine?
> > Something like:
> > Class Inst extend Install{
> >
> >   @Override
> >   public void onInstall(){
> > //populate DB
> >
> >   }
> >
> >   @Override
> >   public void OnRemove(){
> > // Remove DB
> >   }
> > }
> >
> > I also would like to know if the webservice can be public, I mean..the
> > client application don't need to login on a Google Account.
> > Thanks in advance and sorry for my poor English, I am from Brasil.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To post to this group, send email to google-appengine@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/google-appengine?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
Júlio Cesar Bueno Cotta
Bacharel em Ciência da Computação pela UFV
Mestrando em Ciência da Computação pela UFABC

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] I need some tips

2011-04-12 Thread Júlio Cesar Bueno Cotta
Em 11 de abril de 2011 18:32, Ronoaldo José de Lana Pereira <
rpere...@beneficiofacil.com.br> escreveu:

> Hi Julio,

 Hello  Ronoaldo!

> I guess I know you from Brazil, but I'll write in English. Here is what we
> do for a production Java app:



> Yes! We know each other. :-D
> 1) Using flex Json, I added some data fixtures in Json to an app resource
> foder, and created a small servlet that I called SetupServlet. This servlet
> does your trick on checking resultset sizes and populates the database if
> required, and is only called by an app administrator. Very usefull! You can
> combine this with Robert suggestion for an upload-based setup servlet, that
> load the file from Blobstore, for example.
>
> I had just a file with 300k  of size, so I add it to the project and read
to a ArrayList called fortunes and sent MakePerssistAll(fortunes). With just
that my data base is ok now. I know that tricks is not the best pratice, but
is the hurry to end this, I did in this way. I think my next exercise will
be to do a admin area using my Google Account. That kind of stuff it's
useful to many kind of applications! :-D

2) To import a really large dataset, like migrating it from one server to
> another, the python remote_api is a great (but slow) tool, because you can
> do some computation to translate a legacy app database to your new
> app-engine optimized version, all on the fly and without the requirement of
> a new build-deploy clicle. But make sure to call db.allocate_id_rage() or
> similar before putting the app alive. I forgot it, and this will cause a lot
> of problems ;). As Robert suggested, bulkloader does most of the job for
> you, and you just need to write some yaml files to map you models fields and
> you can import form a csv file. This is a nice aproach since you can change
> your data remotely, but it will consume your bandwidth quota too.
>
> I will stude about that! Thanks for sharing it!


> Regarding your concern about a DOS atack, all requests will be served and
> loged. I tryed on my live app (yes, I'm a bit crazy) and the ammount of
> instances growth from 10~14 to 72 in a few seconds to serve +1000
> simultaneous requests. I also found that my logic was not optimized and that
> helped me a bit! Anyway, that is just all what AppEngine is about: scale as
> you need to support a big access when your app is featured on Yahoo home
> page! What you can do to avoid abuse is monitor your top 10 access and
> optionally blacklist what you fell like a DOS. You can do an appcfg.sh
> upload_blacklist just to make your app blacklist an ip address imedieatly,
> but know what is a DOS, currently, is up to you. You may whant to avoid
> abuse with some tokens, anyway.
>
> Ok. Understood!

> Hope it helps!
>
> Best Regards,
>
> --
> Ronoaldo Pereira
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>



-- 
Júlio Cesar Bueno Cotta
Bacharel em Ciência da Computação pela UFV
Mestrando em Ciência da Computação pela UFABC

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.