[appengine-java] Re: Datastore access deadlock

2011-07-28 Thread Tom Phillips
To be defensive, you may want to try setting ~8 second timeouts for
queries (setTimeoutMillis()) and for general read/writes in, for jdo,
jdoconfig.xml (javax.jdo.option.DatastoreReadTimeoutMillis,
javax.jdo.option.DatastoreWriteTimeoutMillis). You can then retry a
couple times within the request keeping under the 30 second limit.

It often, but not always, succeeds on one of the retries and salvages
the request.

/Tom

On Jul 28, 5:11 pm, Eduardo Garcia Lopez  wrote:
> Hi,
>
> since last week I am experiencing a very serious problem in my application. 
> Probably since I deployed for the first time after the new SDK 1.5.2 was 
> released.
>
> The application is locking during 30 seconds (then it raises an timeout 
> Exception) just doing a single query. The query starts running normally 
> during a couple hours, then randomly starts locking, and after that almost 
> all queries like this lock. This is the query:
>
>         PersistenceManager pm = PMF.get().getPersistenceManager();
>         cmd = pm.getObjectById(Command.class, id);
>
> I have also tried changing to this query:
>                  PersistenceManager pm = PMF.get().getPersistenceManager();
>         query = pm.newQuery(Command.class, "id == idParameter");
>         query.declareParameters("Long idParameter");
>         query.setRange(0,1);
>         query.setUnique(true);
>         cmd = (Command) query.execute(id);
>
> in both cases, it hangs in last sentence.
>
> The persistence class is NOT marked as detachable.
>
> The received exception is this:
> com.google.apphosting.api.ApiProxy$ApiDeadlineExceededException: The API call 
> datastore_v3.RunQuery() took too long to respond and was cancelled
>
> Can somebody help me with this? Is somebody experiencing this error?

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



[appengine-java] Can my Google App receive Traffic from Single IP address

2011-07-28 Thread frooti

I want to host an SMS application on GAE and all my traffic will come
from a SMS GATEWAY with a single IP address.

My users send queries through SMS which will be routed to my app from
SMS GATEWAY(single IP address).
My app processes those queries and reply back through SMS (again
through SMS GATEWAY).
I can reply using URL FETCH(not a problem) but what i'm worried about
is if I receive some 500 dynamic requests/sec from single IP address ,
GAE might block them thinking them as Dos(denial of service) attack .

GAE either asks the user to enter a captcha at
https://www.google.com/accounts/DisplayUnlockCaptcha or redirects to
sorry.google.com and displays an error message itseems if it receives
unusual traffic from single IP . But my users access app only through
SMS.

Please look at the production issue filed below :

http://code.google.com/p/googleappengine/issues/detail?id=5239&q=dos&colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log

Has anyone hosted a similar app before ?

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



[appengine-java] Re: Mining logs for performance data

2011-07-28 Thread Nichole
Or the script that's used to upload your application now offers the
ability to
download logs too:

http://code.google.com/appengine/docs/java/tools/uploadinganapp.html

You'd have to download frequently or not depending upon your log
rate.

Or you could create a servletrequestlistener to gather the
stats you need and store them in the datastore or another datastore
using
the RemoteApiInstaller.

On Jul 28, 10:18 am, Stephen Johnson  wrote:
> I don't know if this will help you or not but you can read about a utility I
> wrote a while back that uses XMPP to send log info for real-time monitoring.
> These messages can be saved to files I believe by some of the chat clients
> out there or probably a custom chat client could be built to save the data
> to files in your own format. Maybe it will give you an idea of what you can
> do.
>
> It can be found atwww.professionalintellectualdevelopment.comand there's a
> link to the code at Google Project Hosting there as well.
>
> Stephen
> CortexConnect
> cortexconnect.appspot.com
>
>
>
>
>
>
>
> On Thu, Jul 28, 2011 at 9:40 AM, Kesava Neeli  wrote:
> > Anyone from GAE team has better suggestions for this? Normally we setup a
> > separate metrics logger in log4j which would log all metric events in a
> > separate log file. Then we generate reports out of it. On GAE, we cannot
> > define a logfile for a separate logger and don't have access to download any
> > log file..
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To view this discussion on the web visit
> >https://groups.google.com/d/msg/google-appengine-java/-/t63On0QqjvkJ.
>
> > To post to this group, send email to
> > google-appengine-java@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] Re: Channel Presence - HowTo ?

2011-07-28 Thread gk
Sébastien,

you can register a servlet to handle the URL paths; this is done it
the "WEB-INF/web.xml" file:


handle_connect
/_ah/channel/connected


handle_connect
org.example.MyConnectServlet



MyConnectServlet.java does then the job:

public class ErrorController extends HttpServlet
{
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse
resp) throws ServletException, IOException
{
//Handle request and write response
}
}

Hope this can help you.



On Jul 27, 12:00 pm, Sébastien Tromp 
wrote:
> Hello,
>
> In the Presence sectiono of the Channel documentation, it says:
>
> When you enable channel_presence, your application receives POSTs to the
>
> > following URL paths:
>
> >    - POSTs to /_ah/channel/connected/ signal that the client has connected
> >    to the channel and can receive messages.
>
> >    - POSTs to /_ah/channel/disconnected/ signal that the client has
> >    disconnected from the channel.
>
> Your application can register handlers to these paths in order to receive
>
> > notifications. You can use these notifications to track which clients are
> > currently connected.
>
> However, I am clueless as to how to do that. How can I register a handle to
> these paths?
> I am currently using GAE 1.5.1, GWT and Guice.
>
> Thanks for any hint,
> --
> Sébastien Tromp

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



Re: [appengine-java] Server error while doing a large loop

2011-07-28 Thread Stephen Johnson
A couple other things. Make sure you warm up your instance before doing your
test. If you try that loop as your initial hit to the server than the
instance has to start up which could also cause you to timeout. Also, run
the test a few times. With Java's JIT thresholds your going to get a speed
bump once it has run several times.

On Thu, Jul 28, 2011 at 4:30 PM, Stephen Johnson wrote:

> You'll probably want to look at and test backends where you can pick your
> processor speed to see what kind of performance you can get. I think the
> front-end instances are configured similar to B1's, but i can't remember if
> I saw that somewhere or am basing it on the fact that in the new pricing
> model on-demand hours are priced at $.08, so maybe it is similar to B2,
> maybe someone else knows. Also, it was mentioned a while back that a B8
> can't do any faster calculations on a single thread than a B4 so you'll
> probably see similar results if you test your computations on a B4 and B8.
> But once again, not completely sure about that assertion. The upside to a B8
> from a B4 is, from what I gathered, increased memory and if using Java then
> can have multiple requests running at same time on different threads, it's
> just that a single thread can't do better than B4.
>
>  B1 128MB 600MHz $0.08 B2 (default) 256MB 1.2GHz $0.16 B4 512MB 2.4GHz$0.32
> B8 1024MB 4.8GHz $0.64
>
>
> Stephen
> CortexConnect
> http://cortexconnect.appspot.com
>
> On Wed, Jul 27, 2011 at 5:00 PM, SudoKU  wrote:
>
>> I am a new comer to the Google App Engine. I was testing whether I can use
>> Google app engine for a real-time calculations of our geophysical model. The
>> idea is that scientists can calculate / run my model online and plot the
>> results rather than running natively on their computer.  I am testing the
>> free version of google app engine. To test the speed of computation, I wrote
>> the following loop in the Java servlet. I wanted to know how fast Google App
>> Engine can compute my codes.
>>
>>
>>
>> for (int i = 1 ; i < 10 ; i = i+1)
>>
>> {
>>
>> for (int j = 1 ; j < 10 ; j = j+1)
>>
>> {
>>
>>  for (int k = 1 ; k < 10 ; k = k+1)
>>
>> {
>>
>>  int h = i + j + k;
>>
>> }
>>
>>
>>
>> }
>>
>>
>>
>> }
>>
>>
>> While the local deployment in my laptop (I am using eclipse & google
>> plugin - localhost:) completed the calculation in 8 seconds, google app
>> reports error after a few seconds. If I remove the outer loop, Google App
>> engine complete the calculation in about 4-6 seconds.  While the actual
>> computational burden of my model can be less than that of the above codes, I
>> was a disappointed by the fact that Goggle App Engine runs slower than my
>> laptop. Is this because of the free version ?. Will the speed increase, if I
>> pay for App Engine use ?
>>
>>
>> Thanks
>>
>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/google-appengine-java/-/VpNTC_2FI3wJ.
>> To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>
>

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



Re: [appengine-java] Server error while doing a large loop

2011-07-28 Thread Stephen Johnson
You'll probably want to look at and test backends where you can pick your
processor speed to see what kind of performance you can get. I think the
front-end instances are configured similar to B1's, but i can't remember if
I saw that somewhere or am basing it on the fact that in the new pricing
model on-demand hours are priced at $.08, so maybe it is similar to B2,
maybe someone else knows. Also, it was mentioned a while back that a B8
can't do any faster calculations on a single thread than a B4 so you'll
probably see similar results if you test your computations on a B4 and B8.
But once again, not completely sure about that assertion. The upside to a B8
from a B4 is, from what I gathered, increased memory and if using Java then
can have multiple requests running at same time on different threads, it's
just that a single thread can't do better than B4.

B1128MB600MHz$0.08B2 (default)256MB1.2GHz$0.16B4512MB2.4GHz$0.32B81024MB
4.8GHz$0.64


Stephen
CortexConnect
http://cortexconnect.appspot.com

On Wed, Jul 27, 2011 at 5:00 PM, SudoKU  wrote:

> I am a new comer to the Google App Engine. I was testing whether I can use
> Google app engine for a real-time calculations of our geophysical model. The
> idea is that scientists can calculate / run my model online and plot the
> results rather than running natively on their computer.  I am testing the
> free version of google app engine. To test the speed of computation, I wrote
> the following loop in the Java servlet. I wanted to know how fast Google App
> Engine can compute my codes.
>
>
>
> for (int i = 1 ; i < 10 ; i = i+1)
>
> {
>
> for (int j = 1 ; j < 10 ; j = j+1)
>
> {
>
>  for (int k = 1 ; k < 10 ; k = k+1)
>
> {
>
>  int h = i + j + k;
>
> }
>
>
>
> }
>
>
>
> }
>
>
> While the local deployment in my laptop (I am using eclipse & google plugin
> - localhost:) completed the calculation in 8 seconds, google app reports
> error after a few seconds. If I remove the outer loop, Google App engine
> complete the calculation in about 4-6 seconds.  While the actual
> computational burden of my model can be less than that of the above codes, I
> was a disappointed by the fact that Goggle App Engine runs slower than my
> laptop. Is this because of the free version ?. Will the speed increase, if I
> pay for App Engine use ?
>
>
> Thanks
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/VpNTC_2FI3wJ.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

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



[appengine-java] Re: How to get the userID? The one could be actually be used with buzz API to get user profile?

2011-07-28 Thread Miguel
I am interested in this topic ..
>From my side I would like to integrate an existing GAE application
with Google Identity Toolkit .. And I want understand how to get this
"userId": which is the algorithm to get this information from an
OpenID account?

Thank you
Miguel

On Jul 25, 8:21 pm, wei yi  wrote:
> I see there is a getUserID() in GAE API. And the value returned is a
> 21-digit ID, however it is not the one used in Google user Profile. Is there
> anyway to get that one? Since for some new users, the gmail address does not
> work when applied API.

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



[appengine-java] Error: MemcacheServiceException: Memcache put: Error setting single item

2011-07-28 Thread Yoshihito Yamanaka
Hi,

I found MemcacheServiceException at 2011/07/28 10:57 AM(PDT).
What is this exception?
I didn't write 1MB over data.
And I could not found my class code line in stack trace.
google app engine bug?

In Addition, three thousand task queues retried after this exception
is happened.
Normally task queue retry after exception happen in task queue.
But many task queues were running.
Because of I received many error mail and mail quotas was over.

Please help us.
Thank you.

stack trace:
org.apache.jasper.runtime.JspFactoryImpl internalGetPageContext:
Exception initializing page context
com.google.appengine.api.memcache.MemcacheServiceException: Memcache
put: Error setting single item (_ahsxvOfW0bieFkW1N2vYQoYnA)
at
com.google.appengine.api.memcache.MemcacheServiceImpl.doPut(MemcacheServiceImpl.java:
427)
at
com.google.appengine.api.memcache.MemcacheServiceImpl.put(MemcacheServiceImpl.java:
443)
at
com.google.appengine.api.memcache.MemcacheServiceImpl.put(MemcacheServiceImpl.java:
470)
at
com.google.apphosting.runtime.jetty.MemcacheSessionStore.saveSession(MemcacheSessionStore.java:
39)
at
com.google.apphosting.runtime.jetty.SessionManager.createSession(SessionManager.java:
342)
at com.google.apphosting.runtime.jetty.SessionManager
$AppEngineSession.(SessionManager.java:125)
at
com.google.apphosting.runtime.jetty.SessionManager.newSession(SessionManager.java:
273)
at
com.google.apphosting.runtime.jetty.SessionManager.newSession(SessionManager.java:
43)
at
org.mortbay.jetty.servlet.AbstractSessionManager.newHttpSession(AbstractSessionManager.java:
413)
at org.mortbay.jetty.Request.getSession(Request.java:1242)
at org.mortbay.jetty.Request.getSession(Request.java:1214)
at
org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:
146)
at
org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:
124)
at
org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:
107)
at org.apache.jasper.runtime.JspFactoryImpl.access
$000(JspFactoryImpl.java:40)
at org.apache.jasper.runtime.JspFactoryImpl
$PrivilegedGetPageContext.run(JspFactoryImpl.java:149)
at
com.google.apphosting.runtime.security.shared.intercept.java.security.AccessController_.doPrivileged(AccessController_.java:
34)
at
org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:
61)
at org.apache.jsp.error._500_jsp._jspService(_500_jsp.java:44)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
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.handle(ServletHandler.java:
390)
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 org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
at org.mortbay.jetty.servlet.Dispatcher.error(Dispatcher.java:135)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap
$NullErrorHandler.mayHandleByErrorPage(AppVersionHandlerMap.java:403)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap
$NullErrorHandler.handle(AppVersionHandlerMap.java:335)
at org.mortbay.jetty.Response.sendError(Response.java:274)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
475)
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.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
249)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:923)
at
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
135)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
260)
at com.google.apphosting.base.Ru

[appengine-java] Server error while doing a large loop

2011-07-28 Thread SudoKU
I am a new comer to the Google App Engine. I was testing whether I can use 
Google app engine for a real-time calculations of our geophysical model. The 
idea is that scientists can calculate / run my model online and plot the 
results rather than running natively on their computer.  I am testing the 
free version of google app engine. To test the speed of computation, I wrote 
the following loop in the Java servlet. I wanted to know how fast Google App 
Engine can compute my codes.

 

for (int i = 1 ; i < 10 ; i = i+1)

{

for (int j = 1 ; j < 10 ; j = j+1)

{

 for (int k = 1 ; k < 10 ; k = k+1)

{

 int h = i + j + k;

}

 

}

 

}


While the local deployment in my laptop (I am using eclipse & google plugin 
- localhost:) completed the calculation in 8 seconds, google app reports 
error after a few seconds. If I remove the outer loop, Google App engine 
complete the calculation in about 4-6 seconds.  While the actual 
computational burden of my model can be less than that of the above codes, I 
was a disappointed by the fact that Goggle App Engine runs slower than my 
laptop. Is this because of the free version ?. Will the speed increase, if I 
pay for App Engine use ?


Thanks



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



[appengine-java] Using async-session-persistence

2011-07-28 Thread gk
I am experimenting with  to store https session data; at first it seems
to work fine with the "default" default queue settings; multithreading
is switched on for the application.

It appears that there is some kind of collision, as the tasks seem to
succeed when the rate of incoming requests is low.

When I open a browser window and reload 50 pages from the site at once
it seems to work fine and the queue is filled up with some tasks. Most
ot the tasks succeed.

The problem is that around 30% of the "async-session-persistence"
tasks fail repeatedly with HTTP status code 415 (Unsupported Media
Type) and there is no further indication of the cause in the queue or
in the server log.

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



[appengine-java] Unable to update app : failed in compling jsp

2011-07-28 Thread Gaurav
when i tired to deploy my application on GAE its shows me error failed
to complie jsp  pages .. what this error means i cann't understand
when i am running locally its runs fine . its only happening when i am
trying to deploy on
GAE/j
help me through this it is really getting me insane .
i am using eclipse on linux

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



[appengine-java] Problem with AppEngine & GWT

2011-07-28 Thread José Francisco
Hi , I have the following source code:
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Customer implements IsSerializable {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
@Persistent
private String name;
@Persistent
private Usuario admin;
...
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Userimplements IsSerializable {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent
private String name;
.

and I try to save as follows:

public boolean insertCustomer(Customer c, Usuer u) {
PersistenceManager pm =
PMF.getPmfInstancia().getPersistenceManager();
Transaction tx = pm.currentTransaction();
try {
tx.begin();
c.setAdmin(u);
pm.makePersistent(c);
tx.commit();


but when I retrieve data, the customer is saved but the associated
user not. Any idea?
Thanks.

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



[appengine-java] Re: sdk 1.5.2 removes exploding indexes!!!

2011-07-28 Thread Eduardo Garcia Lopez
I have been experiencing VERY serious problems (deadlocks) with datastore 
since the 1.5.2 version was released. Now I start realizing that the problem 
probably could be in the new "Advanced Query Planning".
Has somebody experienced this exception suddenly since last days?

com.google.apphosting.api.ApiProxy$ApiDeadlineExceededException: The API call 
datastore_v3.RunQuery() took too long to respond and was cancelled


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



[appengine-java] Re: Application statistics are currently unavailable.

2011-07-28 Thread Eduardo Garcia Lopez
I experienced the same some hours ago, now it seems to be working again.

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



Re: [appengine-java] Task queue locking up

2011-07-28 Thread Eduardo Garcia Lopez


Ikai, I have created a new topic explaining more in detail my problem.
Can you help me please, or address me to the right people who can help me on 
this?

This is the topic I sent:

"since last week I am experiencing a very serious problem in my application. 
Probably since I deployed for the first time after the new SDK 1.5.2 was 
released.

The application is locking during 30 seconds (then it raises an timeout 
Exception) just doing a single query. The query starts running normally during 
a couple hours, then randomly starts locking, and after that almost all queries 
like this lock. This is the query:

PersistenceManager pm = PMF.get().getPersistenceManager();
cmd = pm.getObjectById(Command.class, id);

I have also tried changing to this query:
 PersistenceManager pm = PMF.get().getPersistenceManager();
query = pm.newQuery(Command.class, "id == idParameter");
query.declareParameters("Long idParameter");
query.setRange(0,1);
query.setUnique(true);
cmd = (Command) query.execute(id);

in both cases, it hangs in last sentence.

The persistence class is NOT marked as detachable.

The received exception is this:
com.google.apphosting.api.ApiProxy$ApiDeadlineExceededException: The API call 
datastore_v3.RunQuery() took too long to respond and was cancelled

Can somebody help me with this? Is somebody experiencing this error?"

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



[appengine-java] Datastore access deadlock

2011-07-28 Thread Eduardo Garcia Lopez


Hi,

since last week I am experiencing a very serious problem in my application. 
Probably since I deployed for the first time after the new SDK 1.5.2 was 
released.

The application is locking during 30 seconds (then it raises an timeout 
Exception) just doing a single query. The query starts running normally during 
a couple hours, then randomly starts locking, and after that almost all queries 
like this lock. This is the query:

PersistenceManager pm = PMF.get().getPersistenceManager();
cmd = pm.getObjectById(Command.class, id);

I have also tried changing to this query:
 PersistenceManager pm = PMF.get().getPersistenceManager();
query = pm.newQuery(Command.class, "id == idParameter");
query.declareParameters("Long idParameter");
query.setRange(0,1);
query.setUnique(true);
cmd = (Command) query.execute(id);

in both cases, it hangs in last sentence.

The persistence class is NOT marked as detachable.

The received exception is this:
com.google.apphosting.api.ApiProxy$ApiDeadlineExceededException: The API call 
datastore_v3.RunQuery() took too long to respond and was cancelled

Can somebody help me with this? Is somebody experiencing this error?

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



[appengine-java] Re: Blobstore and upload question

2011-07-28 Thread Brandon Donnelson
What I do with files is upload, then I redirect the new blobkey to a 
servlet, which then does the things I need it to. I've used the mapper lib, 
but if I'm going to be processing anything, I'll stick it in a task which 
gives up to 10 minutes per task I'll poll a from GWT client and see when the 
task is done. You can read the file line by line easily. It works great. I 
have some examples where I do it. I decode base 64 on the fly from blobstore 
and has been working great. 

Some of my blob 
notes: http://code.google.com/p/gwt-examples/wiki/DemoGAEMultiFileBlobUpload

Which way did you choose to go?

Brandon Donnelson
http://gwt-examples.googlecode.com


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



Re: [appengine-java] Sending email in Java development environment

2011-07-28 Thread Bruce Davis
fyhao,

Thanks for the reply. But I'm still having trouble.

I went to http://localhost:/_ah/admin (I am using port ), and got a 
screen labelled 'no_app_id Development Console'.

I gives me the choices Datastore Viewer, Task Queues, XMPP, Inbound Mail, 
and Backends.
None of these show me any logs.

What am I missing?

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



[appengine-java] Application statistics are currently unavailable.

2011-07-28 Thread George Moschovitis
I get the error:

"Application statistics are currently unavailable."

in the control panel, and I can't see any statistics (including billing 
information).

any ideas?
-g.

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



Re: [appengine-java] Re: Blobstore and upload question

2011-07-28 Thread Stephen Johnson
If your data is never more than 32K in size then the datastore is definitely
the way to go. Way easier and simpler IMHO.

On Thu, Jul 28, 2011 at 10:30 AM, GeorgeS  wrote:

> Stephen, thanks for the information!
>
> I had started to put the text into a Datastore but somehow the Blobstore
> looked easier to deal with. I'll revisit the datastore idea. I don't have to
> worry about breaking the data up since these files are never more than 32K
> in size and that is an extreme case.
>
> I was figuring that POSTing from VB.Net was the way to upload the document
> but it helps to know I'm on the right track there.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/YsIiLkwiK0QJ.
>
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

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



Re: [appengine-java] Re: Blobstore and upload question

2011-07-28 Thread GeorgeS
Stephen, thanks for the information!

I had started to put the text into a Datastore but somehow the Blobstore 
looked easier to deal with. I'll revisit the datastore idea. I don't have to 
worry about breaking the data up since these files are never more than 32K 
in size and that is an extreme case.

I was figuring that POSTing from VB.Net was the way to upload the document 
but it helps to know I'm on the right track there.

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



Re: [appengine-java] Re: Mining logs for performance data

2011-07-28 Thread Stephen Johnson
I don't know if this will help you or not but you can read about a utility I
wrote a while back that uses XMPP to send log info for real-time monitoring.
These messages can be saved to files I believe by some of the chat clients
out there or probably a custom chat client could be built to save the data
to files in your own format. Maybe it will give you an idea of what you can
do.

It can be found at www.professionalintellectualdevelopment.com and there's a
link to the code at Google Project Hosting there as well.

Stephen
CortexConnect
cortexconnect.appspot.com

On Thu, Jul 28, 2011 at 9:40 AM, Kesava Neeli  wrote:

> Anyone from GAE team has better suggestions for this? Normally we setup a
> separate metrics logger in log4j which would log all metric events in a
> separate log file. Then we generate reports out of it. On GAE, we cannot
> define a logfile for a separate logger and don't have access to download any
> log file..
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/t63On0QqjvkJ.
>
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

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



Re: [appengine-java] Re: Blobstore and upload question

2011-07-28 Thread Stephen Johnson
There is a 1MB limit for entities in the datastore so if your data fits
within that limit than the datastore is a good option. My app stores all its
data in the datastore including videos, audio files, images, pdf's, etc. I
started it before the blobstore existed. So, if your data is greater than
the 1MB limit you'll need to break it up in to pieces which isn't as
difficult as it seems but depends on your comfort level. What I'd do is add
to the end of your key (which should be a string) a file segment number so
it would be something like "key:01","key:02". The reason you should pad it
with zeros is so that all of your file entries will be ordered by segment.
If you do "key:1","key:2",. and then you have "key:11", they will be
ordered "key:1","key:11","key:2", which may not bother you but when looking
in the DatastoreViewer, etc. it's nice to see them in order by segment
number. Then when it's time to retrieve the file, you do a range query like
key >= "key:" && key <= "key:~" this will get you the file segments. I use
the ~ (tilde) character as my upper limit character when doing these type of
operations but other characters can be used depending on your data set. My
approach is slightly more involved than this do to the large file sizes I
support and other criteria, but this approach should work for your case.

Okay, from the client perspective, VB.NET shouldn't be a problem, my upload
tool is written in C#. The easiest approach is to read in the text file and
put it's content as the POST data, you can add other parameters to the query
string part of the url if additional information is needed or format the
post to include the file and data together. I myself put the contents of the
file into XML format which i put as the POST data, so I can include all my
data including additional information about the file into the XML. Since
your file is text either approach should work fine. For binary data, you'd
need to base64 encode the data or something like that (which is what I do).

Okay, from the user perspective of uploading the file from a browser to your
app, you'll need to parse the file out of the multi-part format. Here is an
article on how to use an Apache/Jakarta library to do just that:
http://www.developershome.com/wap/wapUpload/wap_upload.asp?page=jsp  This
seems to be a pretty good write up on how to use it. I haven't used it since
there wasn't a nice article about it when I started using GAE and since the
whitelist doesn't allow some things to work, so I'm not sure if this works
or not. So basically I wrote my own parser to extract web browser based
uploads. I think this should work as long as you set the Size Threshold high
enough otherwise the document says it will try to write to disk. Maybe
someone else on this board has used this utility and can say whether or not
it works.

Well, I'm sure this is more info than you needed, but maybe it might help
someone else someday that is trying to figure this same stuff out.
Cheers,
Stephen
CortexConnect
cortexconnect.appspot.com


On Thu, Jul 28, 2011 at 6:55 AM, GeorgeS  wrote:

> Thanks for that link... I took a look but I don't think that model really
> applies to my case here. I'm wondering if just uploading the files and
> pushing them into the Datastore as a piece of text with the key being the
> user id and file type may be simpler?
>
> Anyone have any thoughts on the question about upload from VB.Net? Is this
> possible?
>
> TIA!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/Ib_tCtVAuLkJ.
>
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

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



[appengine-java] Re: Mining logs for performance data

2011-07-28 Thread Kesava Neeli
Anyone from GAE team has better suggestions for this? Normally we setup a 
separate metrics logger in log4j which would log all metric events in a 
separate log file. Then we generate reports out of it. On GAE, we cannot 
define a logfile for a separate logger and don't have access to download any 
log file.. 

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



[appengine-java] Re: Blobstore and upload question

2011-07-28 Thread GeorgeS
Thanks for that link... I took a look but I don't think that model really 
applies to my case here. I'm wondering if just uploading the files and 
pushing them into the Datastore as a piece of text with the key being the 
user id and file type may be simpler?

Anyone have any thoughts on the question about upload from VB.Net? Is this 
possible?

TIA!

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



[appengine-java] Re: Blobstore and upload question

2011-07-28 Thread Cyrille Vincey
Check out 
http://ikaisays.com/2010/08/11/using-the-app-engine-mapper-for-bulk-data-import/

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



Re: [appengine-java] Sending email in Java development environment

2011-07-28 Thread Khor Yong Hao
That's mean the log is resided in Admin Console.
If in local, you can access http://localhost:8080/_ah/admin

On Wed, Jul 27, 2011 at 5:19 AM, Bruce Davis  wrote:

> Thanks in advance for help with this newbie question.
>
> The documentation states:
>
> When an application running in the development server calls the Mail
> service to send an email message, the message is printed to the log. The
> Java development server does not send the email message.
>
> What log is this referring to? And how do I access it?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/uTSkkIGdxVEJ.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

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



Re: [appengine-java] Re: Memcache listener when data is evicted?

2011-07-28 Thread Sébastien Tromp
Given the current version of my game, the answer would be no. The only thing
I need for now is to know who has won at the end. This may change later on
though.
I have seen that Ehcache can be integrated in
GAE,
but as far as I know it doesn't provide any hook to plug a listener in
before the removal occurs.

Anyway, thanks for your answer :)
-- 
Sébastien Tromp

2011/7/26 J.Ganesan 

> I had this kind of  issue when I wanted to maintain an object cache. I
> had to settle down for something similar to what you do now.
> In your case, if you had a dedicated server would you update the
> database with every move. If the answer is yes, what you currently do
> is fine. Else, I do not think gae is a fit server-cum-persistence
> mechanism for your application.
>
> J.Ganesan
> www.DataStoreGwt.com
>
>
> On Jul 23, 2:17 pm, Sébastien Tromp  wrote:
> > Hello,
> >
> > I am building a multiplayer game whose play sessions are rather short
> > (around 5 mins). Everytime a player sends their move, it updates the game
> > state in the cache. Since the cache is unreliable, I then update the
> > datastore with the updated data.
> > My concern is there will likely be many useless datastore updates -
> meaning
> > two consecutive persistence calls while the data still is in the
> memcache.
> >
> > I was thus wondering whether you had any suggestion about this. I was
> > thinking of listeners that would be called when the data is about to be
> > evicted from the cache, who would be the one to do the actual
> persistence.
> > But from what I
> > read<
> http://code.google.com/appengine/docs/java/memcache/usingjcache.html#...>
> > this
> > is not possible today.
> >
> > Has any one of you run into a similar requirement? How have you coped
> with
> > it?
> > --
> > Sébastien Tromp
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

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



[appengine-java] Re: FK Maps not supported error when using HashMaps

2011-07-28 Thread datanucleus
Perhaps you ought to define your persistence code and more of your
model classes (and stack trace). When I run something like that
**using SVN code of the GAE plugin** all works fine.

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