Re: [google-appengine] Re: PHP Fatal error: Uncaught exception 'google\appengine\runtime\ArgumentError' with message 'An error occurred parsing (locally or remotely) the arguments to taskqueue.BulkAd

2016-01-28 Thread Filip Pacurar
IT's 123_108_2016. Every time I deploy the app, the error dissapears and 
appears after a few hours.



Mars Lan 
Friday, January 29, 2016 2:49 AMvia Postbox 


Can you try var_dump($nr) to check its content?

On Wednesday, January 27, 2016 at 11:50:21 PM UTC-8, Iulian Pacurar wrote:
--
You received this message because you are subscribed to a topic in the 
Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/google-appengine/XtM20RwuNe4/unsubscribe.
To unsubscribe from this group and all its topics, 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/e9d42069-cd9a-4cb4-a7d8-e867c091141c%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.
Iulian Pacurar 
Thursday, January 28, 2016 9:50 AMvia Postbox 



Hello guys, Looking through my app logs, I saw an awkward error 
regarding tasks:


PHP Fatal error: Uncaught exception 
'google\appengine\runtime\ArgumentError' with message 'An error 
occurred parsing (locally or remotely) the arguments to 
taskqueue.BulkAdd().' in 
/base/data/home/runtimes/php/sdk/google/appengine/runtime/RealApiProxy.php:74
Stack trace: #0 
/base/data/home/runtimes/php/sdk/google/appengine/runtime/ApiProxy.php(40): 
google\appengine\runtime\RealApiProxy->makeSyncCall('taskqueue', 
'BulkAdd', Object(google\appengine\TaskQueueBulkAddRequest), 
Object(google\appengine\TaskQueueBulkAddResponse), NULL) #1 
/base/data/home/runtimes/php/sdk/google/appengine/api/taskqueue/PushQueue.php(187): 
google\appengine\runtime\ApiProxy::makeSyncCall('taskqueue', 
'BulkAdd', Object(google\appengine\TaskQueueBulkAddRequest), 
Object(google\appengine\TaskQueueBulkAddResponse)) #2 
/base/data/home/runtimes/php/sdk/google/appengine/api/taskqueue/PushTask.php(292): 
google\appengine\api\taskqueue\PushQueue->addTasks(Array) #3 
/base/data/home/apps/X/7.390253092521509413/default/application/controllers/user/folder 
in 
/base/data/home/runtimes/php/sdk/google/appengine/runtime/RealApiProxy.php 
on line 74


Do you have any idea what is wrong here? Here is my code:

$nr = str_replace('/','-',$this->input->post('number'));
$queue = new PushQueue();
$task = new PushTask('/queue/refreshFolder', ['folder' => $nr]);
$queue->addTasks([$task]);
--
You received this message because you are subscribed to a topic in the 
Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/google-appengine/XtM20RwuNe4/unsubscribe.
To unsubscribe from this group and all its topics, 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/3cb72e23-3bf9-4227-bd32-8aa372173f55%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
Sent from Postbox 



--
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/56AB08FF.5010309%40filipac.net.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Java & Python Modules in Same App -- How?

2016-01-28 Thread PK
Hi Andrei,

I have not done it but my understanding is that it is possible. You would need 
multiple modules. The python modules would use yaml files. The Java modules xml 
files. The default module would have the one dispatch.yaml file that will route 
to the appropriate modules. Modules share the same state in stateful services 
like the datastore, memcache etc. 

An example would be useful, I agree. 

--Panos

> On Jan 28, 2016, at 8:59 PM, Andrei Matveev  wrote:
> 
> Hello,
> 
> I'd like to experiment w/ mixed language modules in App Engine. Currently 
> I've got several Python based modules up & running already. I'd like to add a 
> Java module for kicking off Dataflow jobs (I understand that in order to do 
> this I might need to venture beyond the GAE sandbox and delve into the 
> Managed VM terrain...). 
> 
> I couldn't find any examples or guides for building/managing Java & Python 
> mixed module applications. Can anyone point me in the right direction? Can 
> Python's YAML based configs be made to play nice w/ Java's appengine-web.xml 
> configs?
> 
> Thank you in advance for taking a look!
> 
> -Andrei
> -- 
> 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/ae05cf06-a95f-4e91-8ea9-fd614dc071a8%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/11564BAE-7BF3-43D1-9913-E7B508FC50A9%40gae123.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Java & Python Modules in Same App -- How?

2016-01-28 Thread Andrei Matveev
Hello,

I'd like to experiment w/ mixed language modules in App Engine. Currently 
I've got several Python based modules up & running already. I'd like to add 
a Java module for kicking off Dataflow jobs (I understand that in order to 
do this I might need to venture beyond the GAE sandbox and delve into the 
Managed VM terrain...). 

I couldn't find any examples or guides for building/managing Java & Python 
mixed module applications. Can anyone point me in the right direction? Can 
Python's YAML based configs be made to play nice w/ Java's 
appengine-web.xml configs?

Thank you in advance for taking a look!

-Andrei

-- 
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/ae05cf06-a95f-4e91-8ea9-fd614dc071a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Production Issue not responded on the issue tracker

2016-01-28 Thread Aswath Satrasala
Hi,
We had a latency issue for a request serving from a fresh instance.  It was
suggested to create a issue in the tracker for better resolution.
A production issue on the appengine issue tracker was created  It was
answered and followed up by the appengine team during the initial period of
the issue.
But there is no response from the appengine team on the issue lately for
one month. I have been following up on the issue tracker every week lately,
but still no response.

FYI, the issue is
https://code.google.com/p/googleappengine/issues/detail?id=12564

Can someone help on this for getting the attention and resolution.

-Aswath

-- 
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/CAKFF5G6E4Muz%3Ds6Lt4AVqL-9fn2vx1_u6WbwDC_K2o3LOQE9yg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: PHP Fatal error: Uncaught exception 'google\appengine\runtime\ArgumentError' with message 'An error occurred parsing (locally or remotely) the arguments to taskqueue.BulkAdd().

2016-01-28 Thread Mars Lan
Can you try var_dump($nr) to check its content?

On Wednesday, January 27, 2016 at 11:50:21 PM UTC-8, Iulian Pacurar wrote:
>
>
> Hello guys, Looking through my app logs, I saw an awkward error regarding 
> tasks:
>
> PHP Fatal error: Uncaught exception 
> 'google\appengine\runtime\ArgumentError' with message 'An error occurred 
> parsing (locally or remotely) the arguments to taskqueue.BulkAdd().' in 
> /base/data/home/runtimes/php/sdk/google/appengine/runtime/RealApiProxy.php:74
> Stack trace: #0 
> /base/data/home/runtimes/php/sdk/google/appengine/runtime/ApiProxy.php(40): 
> google\appengine\runtime\RealApiProxy->makeSyncCall('taskqueue', 'BulkAdd', 
> Object(google\appengine\TaskQueueBulkAddRequest), 
> Object(google\appengine\TaskQueueBulkAddResponse), NULL) #1 
> /base/data/home/runtimes/php/sdk/google/appengine/api/taskqueue/PushQueue.php(187):
>  
> google\appengine\runtime\ApiProxy::makeSyncCall('taskqueue', 'BulkAdd', 
> Object(google\appengine\TaskQueueBulkAddRequest), 
> Object(google\appengine\TaskQueueBulkAddResponse)) #2 
> /base/data/home/runtimes/php/sdk/google/appengine/api/taskqueue/PushTask.php(292):
>  
> google\appengine\api\taskqueue\PushQueue->addTasks(Array) #3 
> /base/data/home/apps/X/7.390253092521509413/default/application/controllers/user/folder
>  
> in 
> /base/data/home/runtimes/php/sdk/google/appengine/runtime/RealApiProxy.php 
> on line 74
>
> Do you have any idea what is wrong here? Here is my code:
>
> $nr = str_replace('/','-',$this->input->post('number'));
> $queue = new PushQueue();
> $task = new PushTask('/queue/refreshFolder', ['folder' => $nr]);
> $queue->addTasks([$task]);
>
>

-- 
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/e9d42069-cd9a-4cb4-a7d8-e867c091141c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Cloud Trace API on AppEngine - latency and other questions

2016-01-28 Thread Alexander Bertram
Hi there,
I've started to look at using the new CloudTrace API to add information on 
CloudSQL requests to traces on AppEngine requests, which we desperately 
need, but I encountered two challenges:

First, even batching all the traces for a request together in a single API 
call adds about 100 ms latency to the request (that's the /urlfetch.Fetch 
bar below), which I don't think I can stomach in production. Is there 
anyway to piggy back custom trace data onto AppEngine's existing reporting 
mechanism, which seems to run independently of requests? 

Second, is there any way to detect which requests AppEngine has sampled for 
tracing so that we only spend the time to report traces for those that are 
sampled for RPC traces?

Thanks,
Alex




-- 
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/0968a1ca-db6d-440d-983f-dc5182097aa3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: How can i set an order for .jar files in WEB-INF/lib

2016-01-28 Thread 'Ludovic Champenois' via Google App Engine

On 1/28/16 12:36 AM, Manuel Werder wrote:

yeah it was:
com.google.apphosting.api.ApiProxy$FeatureNotEnabledException: The 
Socket API will be enabled for this application once billing has been 
enabled in the admin console.
but as i said it was already enabled. so i deployed it to another 
project where billing already is enabled also.

And it works there. Seems to be a bug with my project or something?
Thanks for your help though,


This might help?
https://cloud.google.com/appengine/docs/java/runtime?hl=en#Java_Class_loader_JAR_ordering
Ludo

Manuel
Am Freitag, 22. Januar 2016 22:39:53 UTC+1 schrieb Nick (Cloud 
Platform Support):


Hey Manuel,

Is that an error output from your application, in the logs? Or a
pop-up in-browser? If the former, could you try to post any logs
or stack traces relevant?

On Friday, January 22, 2016 at 1:38:55 AM UTC-5, Manuel Werder wrote:

Hey Nick
In mymqttclient.jar is just a class with the specific function
i wanted to Change. In eclipse i can set the order in which
the Project will load my .jar's for Java Projects. That means
first it will load my .jar with the edited function and
therefore will ignore the original jar's function. I hope you
understand what i mean. But when i want to do it with a web
application i dont know how to do this.
But nevermind i think what you said is the cleaner way how to
do it. So I tried it and it seems to work. But now it says:
"The Socket API will be enabled for this application once
billing has been
enabled in the admin console."
so I added the project to my billing account, but it still
says I have to enable billing...


Am Donnerstag, 21. Januar 2016 23:45:47 UTC+1 schrieb Nick
(Cloud Platform Support):

... to clarify, I guess in addition to answering my above
post, I'm looking for a clarification on what you mean by
ordering the .jars at all.

--
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/b067416b-aa14-4010-9b6d-48e151a96fa3%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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/56AA885A.2000800%40google.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Reading existing entity from DB

2016-01-28 Thread Louise Elmose Hedegaard
Ok, thank you for your input!

-Louise

Den onsdag den 27. januar 2016 kl. 12.39.54 UTC+1 skrev Louise Elmose 
Hedegaard:
>
>
> Hi,
>
> I have an issue with too many entities being created in my GAE datastore. 
>
> I have an unique id on an entity (which is not the key in this case), and 
> there should thus only be one entity in the datastore per unique id.
> When an entity is updated or created by the user, I check whether the 
> entity already exists in the DB, and only create a new entity, if there is 
> not already an existing entity with a matching id. If there is an existing 
> entity, I update the parameters of the entity.
> This logic should ensure that there is only one entry/entity per unique 
> id, but somehow several entities with the same id are created in the DB - I 
> do not understand how/why!
>
> When I look at this page 
> https://cloud.google.com/appengine/docs/java/datastore/entities#Java_Updating_an_entity
>  
> is says "You can use a transaction 
>  to 
> test whether an entity with a given key exists before creating one.".
>
> Do I really need to use transactions to validate whether there is an 
> existing entity with a given id, or does that only apply when you use the 
> key as primary key??
>
> Thanks,
> -Louise
>

-- 
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/aa9bfa26-6bb2-4369-b58c-d19b2d17adfc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Reading existing entity from DB

2016-01-28 Thread Nick
I think you've been given some good pointers in the right direction, I'll just 
add that you need to read and understand the eventual consistency, 
transactional and cross entity group (XG) transaction docs for the datastore.

My guess is based on your question you haven't wrapped your head around it, and 
as a result your data models and subsequently data are going to get broken. 
Fixing them after go live will be hard, so you need to get a lot closer now.

Once you've got the basic concepts down, it should become clearer how to model 
this, and why this is happening.

-- 
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/61e6a8a7-3aaa-4cc2-b077-3c58632a271f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: Socket Quote Reached

2016-01-28 Thread Shaun
Thank you!

On Thu, Jan 28, 2016 at 9:39 AM, Zeehad (Cloud Platform Support) <
abdull...@google.com> wrote:

> Such requests involve detailed information gathering and investigation.
> Which is why it's not ideal for a thread like this and requires support.
>
> I see you've submitted a quota increase request with support. They will
> gather necessary information and process your request.
>
> Cheers!
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google App Engine" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-appengine/6PluwlLhZ_M/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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/f640401c-99e3-474a-baba-3165f285af56%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Shaun
sh...@invoicesherpa.com
http://www.invoicesherpa.com
503-708-1210 (direct line)

-- 
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/CAJFNk%2BYWyWFzawhucHQGTdP5yy07tk6O%2B1SofUx%2Bmn6HFvpW-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Socket Quote Reached

2016-01-28 Thread Zeehad (Cloud Platform Support)
Such requests involve detailed information gathering and investigation. 
Which is why it's not ideal for a thread like this and requires support.

I see you've submitted a quota increase request with support. They will 
gather necessary information and process your request.

Cheers!

-- 
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/f640401c-99e3-474a-baba-3165f285af56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: Reading existing entity from DB

2016-01-28 Thread Karl MacMillan

> On Jan 28, 2016, at 7:22 AM, Louise Elmose Hedegaard  
> wrote:
> 
> Hi guys,
> 
> Thank you for your answers.
> I do not think I have explained my problem properly though when I read your 
> answers.
> 
> I have a table "order" where I save different information about an order. The 
> unique id of the order comes from an external system, and I want to save this 
> unique id for the order.
> When an order is updated in the external system, I want to update the GAE 
> datastore accordingly. 
> For this reason I first check whether the order that was updated in the 
> external system already exists in my datastore. If it already exists I update 
> it, if it does not already exist, I create the order in the datastore.
> My problem is that I use this:
> 
> datastore.prepare(query).asSingleEntity();
> 
> which fails, as there are more than one entity with the unique id.
> I do not understand how several entities can be created with the same unique 
> id, when my logic says:
> 

In order for this to work as you expect you need strong consistency, which 
typically means a) have your entities be a part of the same entity group and b) 
do the query inside of a transaction.

As others have pointed out it’s much, much easier to simply use the id as they 
key and fetch by key. Though you still need to do the logic below inside of a 
transaction.

Karl

> Entity entity = getEntity(uniqueId);
> if (entity == null){
>   createEntity();
> }else{
>   updateEntity();
> }
> 
> It is as if the getEntity check does not detect that there already is an 
> entity with the unique id.
> It does seem that this is caused by a timing/concurrency issue - the external 
> system sends two updates approximately at the same time, but shouldn't the 
> datastore be able to handle this?
> 
> My first attempt of getEntity was:
> 
> Query query = new Query(OrderDBFields.ORDER_TABLE_NAME).setFilter(new 
> Query.FilterPredicate(OrderDBFields.ID, Query.FilterOperator.EQUAL, id));
> return datastore.prepare(query).asSingleEntity();
> 
> My second (confused attempt) is:
> 
> 
> Transaction txn = datastore.beginTransaction();
> Key orderKey = KeyFactory.createKey(OrderDBFields.ORDER_TABLE_NAME, 
> id);
> Entity orderEntity = null;
> try {
> orderEntity = datastore.get(orderKey);
> } catch (EntityNotFoundException e) {
> orderEntity = null;
> }
> txn.commit();
> return orderEntity;
> 
> Any input is appreciated,
> Thanks
> -Louise
> 
> Den onsdag den 27. januar 2016 kl. 12.39.54 UTC+1 skrev Louise Elmose 
> Hedegaard:
> 
> Hi,
> 
> I have an issue with too many entities being created in my GAE datastore. 
> 
> I have an unique id on an entity (which is not the key in this case), and 
> there should thus only be one entity in the datastore per unique id.
> When an entity is updated or created by the user, I check whether the entity 
> already exists in the DB, and only create a new entity, if there is not 
> already an existing entity with a matching id. If there is an existing 
> entity, I update the parameters of the entity.
> This logic should ensure that there is only one entry/entity per unique id, 
> but somehow several entities with the same id are created in the DB - I do 
> not understand how/why!
> 
> When I look at this page 
> https://cloud.google.com/appengine/docs/java/datastore/entities#Java_Updating_an_entity
>  
> 
>  is says "You can use a transaction 
>  to test 
> whether an entity with a given key exists before creating one.".
> 
> Do I really need to use transactions to validate whether there is an existing 
> entity with a given id, or does that only apply when you use the key as 
> primary key??
> 
> Thanks,
> -Louise
> 
> -- 
> 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/c774c62a-98d8-467d-b97a-c5e817644cc5%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscri

[google-appengine] Re: Appengine to MySQL Database hosted in Compute Engine

2016-01-28 Thread Kartik Domadiya
We are also facing the same issue though we have billing enabled in our 
app. 
Any clues ?

On Friday, January 22, 2016 at 10:16:18 PM UTC+5:30, Handerson Contreras 
wrote:
>
> Hello
>
> Somebody knows if is it possible connect an application from Appengine to 
> a mysql database hosted in compute engine?
>
> I'm trying to do this with python and i have this error "Can't create 
> TCP/IP socket (-1)"
>
> I'm using SqlAlchemy ORM which use the next configuration:
>
>  create_engine('mysql+mysqldb://root@ip/database')
>
> and locally works but when i deploy the application to appengine doesn't 
> work.
>
> Thanks
>

-- 
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/389b7a88-b795-4261-b7b0-57f80987dfdd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Reading existing entity from DB

2016-01-28 Thread Louise Elmose Hedegaard
Hi guys,

Thank you for your answers.
I do not think I have explained my problem properly though when I read your 
answers.

I have a table "order" where I save different information about an order. 
The unique id of the order comes from an external system, and I want to 
save this unique id for the order.
When an order is updated in the external system, I want to update the GAE 
datastore accordingly. 
For this reason I first check whether the order that was updated in the 
external system already exists in my datastore. If it already exists I 
update it, if it does not already exist, I create the order in the 
datastore.
My problem is that I use this:

datastore.prepare(query).asSingleEntity();

which fails, as there are more than one entity with the unique id.
I do not understand how several entities can be created with the same 
unique id, when my logic says:

Entity entity = getEntity(uniqueId);
if (entity == null){
  createEntity();
}else{
  updateEntity();
}

It is as if the getEntity check does not detect that there already is an 
entity with the unique id.
It does seem that this is caused by a timing/concurrency issue - the 
external system sends two updates approximately at the same time, but 
shouldn't the datastore be able to handle this?

My first attempt of getEntity was:

Query query = new Query(OrderDBFields.ORDER_TABLE_NAME).setFilter(new 
Query.FilterPredicate(OrderDBFields.ID, Query.FilterOperator.EQUAL, id));
return datastore.prepare(query).asSingleEntity();

My second (confused attempt) is:


Transaction txn = datastore.beginTransaction();
Key orderKey = KeyFactory.createKey(OrderDBFields.ORDER_TABLE_NAME, 
id);
Entity orderEntity = null;
try {
orderEntity = datastore.get(orderKey);
} catch (EntityNotFoundException e) {
orderEntity = null;
}
txn.commit();
return orderEntity;

Any input is appreciated,
Thanks
-Louise

Den onsdag den 27. januar 2016 kl. 12.39.54 UTC+1 skrev Louise Elmose 
Hedegaard:
>
>
> Hi,
>
> I have an issue with too many entities being created in my GAE datastore. 
>
> I have an unique id on an entity (which is not the key in this case), and 
> there should thus only be one entity in the datastore per unique id.
> When an entity is updated or created by the user, I check whether the 
> entity already exists in the DB, and only create a new entity, if there is 
> not already an existing entity with a matching id. If there is an existing 
> entity, I update the parameters of the entity.
> This logic should ensure that there is only one entry/entity per unique 
> id, but somehow several entities with the same id are created in the DB - I 
> do not understand how/why!
>
> When I look at this page 
> https://cloud.google.com/appengine/docs/java/datastore/entities#Java_Updating_an_entity
>  
> is says "You can use a transaction 
>  to 
> test whether an entity with a given key exists before creating one.".
>
> Do I really need to use transactions to validate whether there is an 
> existing entity with a given id, or does that only apply when you use the 
> key as primary key??
>
> Thanks,
> -Louise
>

-- 
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/c774c62a-98d8-467d-b97a-c5e817644cc5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: MASM0001: Default configuration file [ jaxws-tubes-default.xml ] was not found - WEB Service

2016-01-28 Thread Jason Bourne
Hi, I also have the same error. I'm consuming a SOAP based web service (
 *http://www.webservicex.net/geoipservice.asmx?WSDL) *that gets the 
location of an IP Address. does google app engine supports SOAP web service?
here is a copy of my 
program: https://drive.google.com/open?id=0B2_2R8EyDVyJWlNOUU51MW4wa0k


Below is the error message i've got:

HTTP ERROR 500

Problem accessing /testapp. Reason:

MASM0001: Default configuration file [ jaxws-tubes-default.xml ] was not 
found

Caused by:

java.lang.IllegalStateException: MASM0001: Default configuration file [ 
jaxws-tubes-default.xml ] was not found
at 
com.sun.xml.internal.ws.assembler.MetroConfigLoader.init(MetroConfigLoader.java:127)
at 
com.sun.xml.internal.ws.assembler.MetroConfigLoader.(MetroConfigLoader.java:104)
at 
com.sun.xml.internal.ws.assembler.TubelineAssemblyController.getTubeCreators(TubelineAssemblyController.java:78)
at 
com.sun.xml.internal.ws.assembler.MetroTubelineAssembler.createClient(MetroTubelineAssembler.java:103)
at com.sun.xml.internal.ws.client.Stub.createPipeline(Stub.java:328)
at com.sun.xml.internal.ws.client.Stub.(Stub.java:295)
at com.sun.xml.internal.ws.client.Stub.(Stub.java:228)
at com.sun.xml.internal.ws.client.Stub.(Stub.java:243)
at com.sun.xml.internal.ws.client.sei.SEIStub.(SEIStub.java:84)
at 
com.sun.xml.internal.ws.client.WSServiceDelegate.getStubHandler(WSServiceDelegate.java:814)
at 
com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:803)
at 
com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:436)
at 
com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:404)
at 
com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:386)
at javax.xml.ws.Service.getPort(Service.java:119)
at 
net.webservicex.GeoIPService.getGeoIPServiceSoap(GeoIPService.java:72)
at com.test.TestAppServlet.doGet(TestAppServlet.java:18)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
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.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at 
com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:128)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at 
com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at 
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:63)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at 
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at 
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at 
com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectRequest(DevAppServerModulesFilter.java:366)
at 
com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectModuleRequest(DevAppServerModulesFilter.java:349)
at 
com.google.appengine.tools.development.DevAppServerModulesFilter.doFilter(DevAppServerModulesFilter.java:116)
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(DevAppEngineWebAppContext.java:98)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at 
com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:512)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.ja

[google-appengine] Re: Reading existing entity from DB

2016-01-28 Thread timh
Having a unique id that is only a property and not the key of the entity 
makes it hard.
Are you generating the ID - is it sequential, or just unique (ie an email 
address) if the later, you could reliably use a combination of transactions 
and a child entity with a key of the unique id, and the ancestors key).

You don't even have store any data.

This can be reliable as you are able to use get operations in a transaction.

Anything entity you fetch by a query (unless it's an ancestor query) will 
be liable to eventual consistancy issues.

T

On Wednesday, January 27, 2016 at 7:39:54 PM UTC+8, Louise Elmose Hedegaard 
wrote:
>
>
> Hi,
>
> I have an issue with too many entities being created in my GAE datastore. 
>
> I have an unique id on an entity (which is not the key in this case), and 
> there should thus only be one entity in the datastore per unique id.
> When an entity is updated or created by the user, I check whether the 
> entity already exists in the DB, and only create a new entity, if there is 
> not already an existing entity with a matching id. If there is an existing 
> entity, I update the parameters of the entity.
> This logic should ensure that there is only one entry/entity per unique 
> id, but somehow several entities with the same id are created in the DB - I 
> do not understand how/why!
>
> When I look at this page 
> https://cloud.google.com/appengine/docs/java/datastore/entities#Java_Updating_an_entity
>  
> is says "You can use a transaction 
>  to 
> test whether an entity with a given key exists before creating one.".
>
> Do I really need to use transactions to validate whether there is an 
> existing entity with a given id, or does that only apply when you use the 
> key as primary key??
>
> Thanks,
> -Louise
>

-- 
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/fc9c1861-f446-42fe-8fbb-bbd884ed5be1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: How can i set an order for .jar files in WEB-INF/lib

2016-01-28 Thread Manuel Werder
yeah it was: 
com.google.apphosting.api.ApiProxy$FeatureNotEnabledException: The Socket 
API will be enabled for this application once billing has been enabled in 
the admin console.

but as i said it was already enabled. so i deployed it to another project 
where billing already is enabled also. 
And it works there. Seems to be a bug with my project or something?
Thanks for your help though,
Manuel

Am Freitag, 22. Januar 2016 22:39:53 UTC+1 schrieb Nick (Cloud Platform 
Support):
>
> Hey Manuel,
>
> Is that an error output from your application, in the logs? Or a pop-up 
> in-browser? If the former, could you try to post any logs or stack traces 
> relevant?
>
> On Friday, January 22, 2016 at 1:38:55 AM UTC-5, Manuel Werder wrote:
>>
>> Hey Nick
>> In mymqttclient.jar is just a class with the specific function i wanted 
>> to Change. In eclipse  i can set the order in which the Project will load 
>> my .jar's for Java Projects. That means first it will load my .jar with the 
>> edited function and therefore will ignore the original jar's function. I 
>> hope you understand what i mean. But when i want to do it with a web 
>> application i dont know how to do this. 
>> But nevermind i think what you said is the cleaner way how to do it. So I 
>> tried it and it seems to work. But now it says:
>> "The Socket API will be enabled for this application once billing has 
>> been 
>> enabled in the admin console."
>> so I added the project to my billing account, but it still says I have to 
>> enable billing... 
>>
>>
>> Am Donnerstag, 21. Januar 2016 23:45:47 UTC+1 schrieb Nick (Cloud 
>> Platform Support):
>>>
>>> ... to clarify, I guess in addition to answering my above post, I'm 
>>> looking for a clarification on what you mean by ordering the .jars at all.
>>>
>>

-- 
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/b067416b-aa14-4010-9b6d-48e151a96fa3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.