[appengine-java] Re: App Engine cold starts and overly aggressive cycling
Seems to be the case for me too, I've been noticing instance restarts pretty often these last 2 or 3 days. On 8 fév, 19:02, Ikai L (Google) ika...@google.com wrote: Thanks for the info, Jake. Has anyone else experienced this? That is, has anyone else noticed improvement which has since degraded? On Mon, Feb 8, 2010 at 9:10 AM, Jake jbrooko...@cast.org wrote: Hey all, Since Ikai's post on January 22nd, I haven't had much trouble with my instance rebooting unexpectedly. However, today the problem has returned. I'm getting instance restarts within a minute or two of each other on a somewhat regular basis - sometimes even within a few seconds of each other, caused by my first request. Jake On Jan 30, 3:06 pm, Edwin Hautus ehau...@gmail.com wrote: I am having this problem for the last week or two after months of good performance and very little recycling. As my app start up time is around 15 seconds this is really hitting my user experience in a negative way. On Jan 16, 12:32 am, Ikai Lan i...@google.com wrote: Hey everybody, We've been seeing more and more reports of applications being cycled out overly aggressively, resulting in some folks implementing (discouraged) workarounds to keep their application from being cycled out. - What is your application ID? salsa-amsterdam - How do you know it is being cycled out? You'll need to insert some code that only gets called when the app cold starts. I have some logging which is executed on startup - How much time of inactivity does it take before your application is cycled out? Can be as little as a minute. - What time or days does this seem to happen? Seems to happen all the time. - What frameworks or libraries are you loading? Just the plain Servlet API and Groovy. Any other information you can provide would be helpful. Start up time of the app is about 10 seconds and involves some on the fly compilation of Groovy scripts. Ikai Lan Developer Programs Engineer, Google App Engine -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Enginehttp://googleappengine.blogspot.com|http://twitter.com/app_engine -- 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-j...@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] news on remote_api for java ?
Hi, Does anybody have some news on the remote_api for java ? It would be great to be able to use our JDO/JPA objects to interact with the datastore without having to upload a version to appengine ! Thanx :) emerix -- 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-j...@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: vs-accounting.appspot.com - datastore viewer error
Hello Toby, thanks. Yes, the property type email could have been empty. Further dev, I will change them to non-empty. Now, I cannot trace back those entities from my application, as it is being tested and is logged in by different users and entities are created. How can I correct this situation? -Aswath On Sat, Feb 6, 2010 at 1:06 AM, Toby Reyelts to...@google.com wrote: You have an empty property of type e-mail, and that makes the datastore viewer unhappy. You need to either use a different type that can be non-empty (like String), or have non-empty e-mails. On Thu, Feb 4, 2010 at 10:25 PM, aswath satrasala aswath.satras...@gmail.com wrote: My application is running fine. I am still getting the datastore viewer error.What can we do in this scenario. How can we get support? -Aswath On Mon, Feb 1, 2010 at 12:36 PM, aswath satrasala aswath.satras...@gmail.com wrote: Hello GAE team, I am still not able to use the DataStore viewer for my app-id 'vs-accounting' Thanks -Aswath On Thu, Jan 28, 2010 at 11:08 AM, aswath satrasala aswath.satras...@gmail.com wrote: Local file: datastore-indexes !-- Used 2 times in query history -- datastore-index kind=Tenant ancestor=true source=auto property name=tenants_INTEGER_IDX direction=asc/ /datastore-index !-- Used 1 time in query history -- datastore-index kind=Party ancestor=true source=auto property name=partys_INTEGER_IDX direction=asc/ /datastore-index !-- Used 1 time in query history -- datastore-index kind=SecurityGroup ancestor=true source=auto property name=secGrpList_INTEGER_IDX direction=asc/ /datastore-index datastore-index kind=PartyRole ancestor=true source=auto property name=partyRoles_INTEGER_IDX direction=asc/ /datastore-index /datastore-indexes Production: Party partys_INTEGER_IDX ▲ Includes ancestors *Serving* PartyRole partyRoles_INTEGER_IDX ▲ Includes ancestors *Serving* SecurityGroup secGrpList_INTEGER_IDX ▲ Includes ancestors *Serving* Tenant tenants_INTEGER_IDX ▲ Includes ancestors 12hrs ago , the secGrpList_INTEGER_IDX was not shown on the production admin console. Now, it is showing up. The datastore viewer is still responding back error page. -Aswath On Thu, Jan 28, 2010 at 2:48 AM, Ikai L (Google) ika...@google.comwrote: What does you local indexes file look like? Can you post the indexes listed in your production admin console? On Tue, Jan 26, 2010 at 11:24 PM, aswath satrasala aswath.satras...@gmail.com wrote: Hello GAE team, Further observations made while testing the app. I am not able to write entities to the datastore. Upon examining the logs, I found the following error. com.veersoft.action.CreateTenantAction doCreate: com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching index found.. datastore-index kind=SecurityGroup ancestor=true source=manual property name=secGrpList_INTEGER_IDX direction=asc/ /datastore-index The application is fine on the local develpment server. -Aswath On Tue, Jan 26, 2010 at 8:51 PM, aswath satrasala aswath.satras...@gmail.com wrote: Hello, My app-id is vs-accounting. I login into appengine.google.com. I choose the above application. Then I click on the datastore viewer. I get the error Server Error A server error has occurred. Return to Applications screen » https://appengine.google.com/ -Aswath -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at
[appengine-java] Some weird exception while deploying struts
Uncaught exception from servlet java.lang.reflect.InvocationTargetException at com.google.appengine.runtime.Request.process- df292afe47330d6f(Request.java) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Method.java:43) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java: 441) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java: 280) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 243) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java: 165) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java: 87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java: 252) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java: 68) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java: 87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java: 122) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java: 195) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java: 87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java: 195) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java: 87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java: 179) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java: 75) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java: 94) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java: 235) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java: 89) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java: 130) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java: 267) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java: 126) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java: 138) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java: 87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java: 165) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java: 164) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:
[appengine-java] Re: Some weird exception while deploying struts
The above happens when i use Persistence Manager (PMF) with Spring +Struts. On Feb 9, 4:11 pm, Saeed saee...@gmail.com wrote: Uncaught exception from servlet java.lang.reflect.InvocationTargetException at com.google.appengine.runtime.Request.process- df292afe47330d6f(Request.java) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Method.java:43) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java: 441) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java: 280) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 243) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java: 165) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java: 87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java: 252) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java: 68) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java: 87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java: 122) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java: 195) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java: 87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java: 195) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java: 87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java: 179) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java: 75) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java: 94) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java: 235) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java: 89) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java: 130) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java: 267) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java: 126) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java: 138) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java: 87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java: 165) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 237) at
[appengine-java] OutOfMemoryError
Hi , I am getting OutOfMemoryErrors. The stack trace always points to the exact same place at the Jetty runtime. see stack trace below has anyone experienced this? These errors occur for the same flow in my code (sometime it succeeds and sometime it get the OutOfMemoryError). this particular flow does not return too much content (around 5KB). If my app had a memory problem I would expect to get the OutOfMemoryErrors all over the place, but, it only happens in one flow. please help. java.lang.OutOfMemoryError: Java heap space at java.nio.HeapByteBuffer.init(Unknown Source) at java.nio.ByteBuffer.allocate(Unknown Source) at com.google.apphosting.runtime.jetty.RpcResponseGenerator.newBufferFromPool(RpcResponseGenerator.java: 213) at com.google.apphosting.runtime.jetty.RpcResponseGenerator.init(RpcResponseGenerator.java: 39) at com.google.apphosting.runtime.jetty.RpcConnection.init(RpcConnection.java: 41) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java: 99) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java: 235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5233) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java: 24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 363) at com.google.net.rpc.impl.Server$2.run(Server.java:838) at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java: 56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java: 536) at com.google.net.rpc.impl.Server.startRpc(Server.java:793) at com.google.net.rpc.impl.Server.processRequest(Server.java:368) at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java: 448) at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java: 319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java: 290) at com.google.net.async.Connection.handleReadEvent(Connection.java: 466) at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java: 759) at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java: 205) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java: 101) at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java: 251) at com.google.apphosting.runtime.JavaRuntime $RpcRunnable.run(JavaRuntime.java:394) at java.lang.Thread.run(Unknown Source) -- 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-j...@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] java.lang.VerifyError
I have an application that has been deployed and running for several months. Yesterday it began throwing the error java.lang.VerifyError. No new deployments or changes in usage on my side. The code throwing the error is in this method... /** * Retrieve a list of Expense depending on the Dates and Vendor passed in. There will be two * execution paths because Vendor does not need to be passed in as a filter. */ @SuppressWarnings(unchecked) //query is against Expense.class so it will return ListExpense public Liststeveshrader.budget.client.dto.Expense getExpenses(Date startDate, Date endDate, String vendor) { Liststeveshrader.budget.client.dto.Expense dtoExpenses = new ArrayListsteveshrader.budget.client.dto.Expense(); String userId = getUserId(); if(userId != null) { ListExpense expenses = null; PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = pm.newQuery(Expense.class); query.declareImports(import java.util.Date); query.setOrdering(date asc); String queryFilter = userId == userIdParam date = startDateParam date = endDateParam; Map queryParameters = new HashMap(); queryParameters.put(userIdParam, userId); queryParameters.put(startDateParam, startDate); queryParameters.put(endDateParam, endDate); if(vendor != null vendor.trim().length() 0) { //if a vendor passed in queryFilter = queryFilter + vendor == vendorParam; queryParameters.put(vendorParam, vendor); } query.setFilter(queryFilter); expenses = (ListExpense) query.executeWithMap(queryParameters); for(Expense e : expenses) { dtoExpenses.add(new steveshrader.budget.client.dto.Expense(e.getId(), e.getDate(), e.getAmount(), e.getVendor(), e.getExpenseType(), e.getPaymentType())); } pm.close(); } return dtoExpenses; } The complete stack trace is... javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.util.List steveshrader.budget.client.BudgetService.getExpenses(java.util.Date,java.util.Date,java.lang.String)' threw an unexpected exception: java.lang.VerifyError: org/datanucleus/ store/appengine/query/StreamingQueryResult$1 at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java: 360) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 546) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java: 166) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java: 86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1093) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java: 97) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java: 35) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java: 238) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506) at org.mortbay.jetty.HttpConnection
Re: [appengine-java] DELETE HTTP Method not working on Google Chrome
Hi. Thank you for responding! Here is my code... This is de jQuery call: $.ajax({ type: DELETE, url: api.getUrl(delete, username, id), contentType: application/json, complete: successByStatus(204, onSuccess, onError) }); I don't see anything on the Appengine Logs after making the request. This is the response I'm getting on Chrome: 1. Request URL: (..) 2. Request Method: DELETE 3. Status Code: 400 Bad Request 4. Request Headers 1. Accept: */* 2. Content-Type: application/json 3. Origin: (...) 4. Referer: (...) 5. User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.5 Safari/532.9 6. X-Requested-With: XMLHttpRequest 5. Request Payload 1. undefined 6. Response Headers 1. Cache-Control: private, x-gzip-ok= 2. Content-Length: 1350 3. Content-Type: text/html; charset=UTF-8 4. Date: Tue, 09 Feb 2010 14:14:00 GMT 5. Server: GFE/2.0 6. X-XSS-Protection: 0 htmlhead meta http-equiv=content-type content= text/html;charset=utf-8 title400 Bad Request/title style!-- body {font-family: arial,sans-serif} div.nav {margin-top: 1ex}div.nav A {font-size: 10pt; font-family: arial,sans-serif} span.nav {font-size: 10pt; font-family: arial,sans-serif; font-weight: bold} div.nav A,span.big {font-size: 12pt; color: #cc} div.nav A {font-size: 10pt; color: black}A.l:link {color: #6f6f6f}A.u:link {color: green} //--/style script!--var rc=400; //-- /script /head body text=#00 bgcolor=#ff table border=0 cellpadding=2 cellspacing=0 width=100%trtd rowspan=3 width=1% nowrap bfont face=times color= #0039b6 size=10G/fontfont face=times color=#c41200 size=10o/fontfont face=times color=#f3c518 size=10o/fontfont face=times color=#0039b6 size =10g/fontfont face=times color=#30a72f size=10l/fontfont face=times color=#c41200 size=10e/fontnbsp;nbsp;/b tdnbsp;/td/tr trtd bgcolor=#3366ccfont face=arial,sans-serif color=#ffbError/b /td/tr trtdnbsp;/td/tr/table blockquote H1Bad Request /H1 *Your client has issued a malformed or illegal request.* p /blockquote table width=100% cellpadding=0 cellspacing=0trtd bgcolor =#3366ccimg alt= width=1 height=4/td/tr/table /body/html This is the signature of my Spring 3 MVC controller mapped to the URL, though the request is not reaching this point: @RequestMapping(method = RequestMethod.DELETE) @ResponseBody @ResponseStatus(value = HttpStatus.NO_CONTENT) public final void delete(...); We've tried changing the method to POST and it works fine. But we need it to be a DELETE. Any ideas? Thanks! 2010/2/8 Johan Vallejo jvall...@vnperu.com Francisco send your code for help you El 08/02/2010 10:55 a.m., Francisco Gonzalez escribió: Hi. I'm developing an application that receives AJAX requests to perform some actions. I'm using jQuery to send the requests from the client. One of those requests is of type HTTP DELETE. The problem is that this request does not work when using Google Chrome on the deployed app. It gets a 400 error (bad request) as response. It works fine on my local SDK though. Firefox works well on both SDK and the deployed app. Anyone having the same trouble? Any ideas? Thank you in advance! -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@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] OutOfMemoryError
It looks like the response your RPC method is generating is too big. On 9 Feb 2010, at 19:53, Lior Harsat wrote: Hi , I am getting OutOfMemoryErrors. The stack trace always points to the exact same place at the Jetty runtime. see stack trace below has anyone experienced this? These errors occur for the same flow in my code (sometime it succeeds and sometime it get the OutOfMemoryError). this particular flow does not return too much content (around 5KB). If my app had a memory problem I would expect to get the OutOfMemoryErrors all over the place, but, it only happens in one flow. please help. java.lang.OutOfMemoryError: Java heap space at java.nio.HeapByteBuffer.init(Unknown Source) at java.nio.ByteBuffer.allocate(Unknown Source) at com .google .apphosting .runtime .jetty .RpcResponseGenerator.newBufferFromPool(RpcResponseGenerator.java: 213) at com .google .apphosting .runtime.jetty.RpcResponseGenerator.init(RpcResponseGenerator.java: 39) at com .google .apphosting.runtime.jetty.RpcConnection.init(RpcConnection.java: 41) at com .google .apphosting .runtime .jetty .JettyServletEngineAdapter .serviceRequest(JettyServletEngineAdapter.java: 99) at com .google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java: 235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5233) at com .google .net .rpc .impl .BlockingApplicationHandler .handleRequest(BlockingApplicationHandler.java: 24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 363) at com.google.net.rpc.impl.Server$2.run(Server.java:838) at com .google .tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java: 56) at com .google .tracing .LocalTraceSpanBuilder .internalContinueSpan(LocalTraceSpanBuilder.java: 536) at com.google.net.rpc.impl.Server.startRpc(Server.java:793) at com.google.net.rpc.impl.Server.processRequest(Server.java:368) at com .google .net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java: 448) at com .google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java: 319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java: 290) at com.google.net.async.Connection.handleReadEvent(Connection.java: 466) at com .google .net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java: 759) at com .google.net.async.EventDispatcher.internalLoop(EventDispatcher.java: 205) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java: 101) at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java: 251) at com.google.apphosting.runtime.JavaRuntime $RpcRunnable.run(JavaRuntime.java:394) at java.lang.Thread.run(Unknown Source) -- 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-j...@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: Persistence with JPA + GAE
Hi Jake, Now i have this error Log : javax.persistence.PersistenceException: Transaction is still active. You should always close your transactions correctly using commit() or rollback(). this is my code : EntityManager cn2 = emf.get().createEntityManager(); distritos dist2 = cn2.find(distritos.class, id); evento e = new evento(); e.setDistrito(dist2); Date fecha = new Date(); e.setFechaCreacion(fecha); try{ cn2.getTransaction().begin(); cn2.persist(e); cn2.getTransaction().commit(); response.getWriter().write("ok"); }finally{ cn2.close(); } Distrito : @Entity public class distritos implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Extension (vendorName="datanucleus", key="gae.encoded-pk", value="true") Key id; --getter and setter-- El 08/02/2010 03:37 p.m., Jake escribi: Hello, The Google Datastore has four ways that you can store a Primary Key ID: String, Long, and two variations on Google's own Key object. If you want to create a parent/child relationship between two persisted objects (in your case, evento is the parent and distritos is the child), then you need to use Google's Key object as the primary ID. See: http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#Keys "If the class is used as a "child" class in a relationship, the key field must be of a type capable of representing an entity group parent: either a Key instance, or a Key value encoded as a string." So, you have two options: 1. Change your Long id values to Key id values. 2. Instead of storing "private distritos distrito" directly in your evento object, store a reference to the id: "private Long distrito_id" Jake On Feb 6, 4:06pm, chevelle jvall...@vnperu.com wrote: Hi I am new in the list, in these days i am trying save data between two entity beans using JPA but without success, i am cheking the log nd says: Uncaught exception from servlet javax.persistence.PersistenceException: Error in meta-data for beans.distritos.id: Cannot have a java.lang.Long primary key and be a child object (owning field is beans.evento.distrito). this is my servlet: Long id = Long.parseLong(request.getParameter("idDistrito")); response.setContentType("text/html"); EntityManager cn = emf.get().createEntityManager(); Query q = cn.createQuery("SELECT d FROM distritos d WHERE d.id = :codigo"); q.setParameter("codigo",id); distritos dist = (distritos) q.getSingleResult(); EntityManager cn2 = emf.get().createEntityManager(); cn2.getTransaction().begin(); evento e = new evento(); e.setDistrito(dist); Date fecha = new Date(); e.setFechaCreacion(fecha); try{ cn2.persist(e); response.getWriter().write("ok"); }finally{ cn2.getTransaction().commit(); cn2.close(); } this is my entity bean Evento: @Entity public class evento implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; @Temporal(javax.persistence.TemporalType.DATE) private Date fechaCreacion; @JoinColumn @OneToMany(cascade = CascadeType.ALL) private distritos distrito; --getter and setter-- Distrito: @Entity public class distritos implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; private String distrito; --getter and setter-- i hope anyone help me, Thank! Johan -- 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-j...@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: Persistence with JPA + GAE
Hey, I don't play with JPA too much, but I saw this: http://www.datanucleus.org/products/datanucleus/jpa/transactions.html Jake On Feb 9, 10:55 am, Johan Vallejo jvall...@vnperu.com wrote: Hi Jake, Now i have this error Log :javax.persistence.PersistenceException: Transaction is still active. You should always close your transactions correctly using commit() or rollback(). this is my code : EntityManager cn2 = emf.get().createEntityManager(); distritos dist2 = cn2.find(distritos.class, id); evento e = new evento(); e.setDistrito(dist2); Date fecha = new Date(); e.setFechaCreacion(fecha); try{ cn2.getTransaction().begin(); cn2.persist(e); cn2.getTransaction().commit(); response.getWriter().write(ok); }finally{ cn2.close(); } Distrito : @Entity public class distritos implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Extension (vendorName=datanucleus, key=gae.encoded-pk, value=true) Key id; --getter and setter-- El 08/02/2010 03:37 p.m., Jake escribió:Hello, The Google Datastore has four ways that you can store a Primary Key ID: String, Long, and two variations on Google's own Key object. If you want to create a parent/child relationship between two persisted objects (in your case, evento is the parent and distritos is the child), then you need to use Google's Key object as the primary ID. See:http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#KeysIf the class is used as a child class in a relationship, the key field must be of a type capable of representing an entity group parent: either a Key instance, or a Key value encoded as a string. So, you have two options: 1. Change your Long id values to Key id values. 2. Instead of storing private distritos distrito directly in your evento object, store a reference to the id: private Long distrito_id Jake On Feb 6, 4:06 pm, chevellejvall...@vnperu.comwrote:Hi I am new in the list, in these days i am trying save data between two entity beans using JPA but without success, i am cheking the log nd says: Uncaught exception from servlet javax.persistence.PersistenceException: Error in meta-data for beans.distritos.id: Cannot have a java.lang.Long primary key and be a child object (owning field is beans.evento.distrito). this is my servlet: Long id = Long.parseLong(request.getParameter(idDistrito)); response.setContentType(text/html); EntityManager cn = emf.get().createEntityManager(); Query q = cn.createQuery(SELECT d FROM distritos d WHERE d.id = :codigo); q.setParameter(codigo,id); distritos dist = (distritos) q.getSingleResult(); EntityManager cn2 = emf.get().createEntityManager(); cn2.getTransaction().begin(); evento e = new evento(); e.setDistrito(dist); Date fecha = new Date(); e.setFechaCreacion(fecha); try{ cn2.persist(e); response.getWriter().write(ok); }finally{ cn2.getTransaction().commit(); cn2.close(); } this is my entity bean Evento: @Entity public class evento implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; @Temporal(javax.persistence.TemporalType.DATE) private Date fechaCreacion; @JoinColumn @OneToMany(cascade = CascadeType.ALL) private distritos distrito; --getter and setter-- Distrito: @Entity public class distritos implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; private String distrito; --getter and setter-- i hope anyone help me, Thank! Johan -- 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-j...@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: Google Plugin for Eclipse 1.3 plans
This all sounds good. However please make sure that it plays well with other languages, especially scala. I opened this ticket 3 months ago with the scala eclipse plugin team. https://lampsvn.epfl.ch/trac/scala/ticket/2614 Thanks On Feb 4, 2:52 pm, Keith Platfoot kplatf...@google.com wrote: Hey all, Many of you have reported incompatibilities between the Google Plugin for Eclipse and other build systems/project structures, most notably Maven and J2EE/Dynamic Web Projects. For example, issue 1515 (Eclipse plugin requires fixed location for war directory)http://code.google.com/p/googleappengine/issues/detail?id=1515 has collected well over 100 stars, and a similar one in the GWT issue tracker has attracted a lot of attention as well. Based on this feedback, we've decided to try and address as many of the incompatibilities as possible with our upcoming 1.3 release of the plugin. To deliver on that goal, we want to share with your our current plans, and also let you know about a preview build that we'll make available so you can test the changes for yourself and give us feedback before final release. Our plans for the 1.3 release include 4 changes designed to make integration with Maven and J2EE projects easier: 1. The WAR directory can now be configured to be *any* project-relative path (e.g. src/main/webapp if you're using Maven). You'll also be able to specify whether that directory is source-only (typical Maven/J2EE scenario), or whether it should also function as the WAR output directory from which to run/debug or deploy to App Engine. If your WAR directory is input *and* output (which will remain the default for new Web App projects), the plugin will manage synchronizing the contents of WEB-INF/lib WEB-INF/classes with your project's build path and compiled output. Otherwise, we'll leave your WAR source directory alone and you'll need to specify your WAR output location when launching, deploying, etc (the plugin will remember the location once you set it the first time). 2. The Web App launch configuration UI is being redesigned to allow you to see, and if necessary change, *any* of the launch arguments. Previously, we were waiting until launch time to set many of these arguments based on heuristics that were invisible and inaccessible to you. Now you'll be in full control of how your projects get launched. Also, we're adding the capability to automatically migrate your launch configurations when necessary, for example, updating the -javaagent flag when changing App Engine SDKs. 3. GWT/App Engine projects will no longer require our SDK library on the classpath. This means Maven users will be able to pull in JAR files from their M2 repository as they're accustomed to and the plugin won't mind a bit. 4. The severity of any problem marker generated by the plugin will be fully customizable via an Errors/Warnings preference page (similar to the Java Errors/Warnings page), letting you specify either Error, Warning, or Ignore. We'll also be including a few smaller features and bug fixes as well. What does everyone think about the 4 changes outlined above? We've been testing the plugin against various Maven and J2EE configurations to try to ensure that we've eliminated the most critical roadblocks. However, we're very interested in also having you folks take it for a spin before the official release date (slated for next month). We're not quite ready yet, but stay tuned for a 1.3 preview build to be made available hopefully in a few weeks. We'll distribute it as a zip file for dropin installationhttp://code.google.com/eclipse/docs/install-from-zip.html so it will come with the standard warnings and caveats (use with a clean Eclipse install and workspace, use at your risk, etc.). However, it will hopefully give you a chance to give us any last-minute feedback about our changes before the final release. Thanks, Keith -- 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-j...@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] OutOfMemoryError
Hi Lior, Are you allocating a large amount of memory up front? When you start writing a response, a fixed-size heap allocation occurs to hold it. (Implementation detail). If you've exhausted most of your JVM's memory before this point, it won't have enough left over to allocate that buffer for your response. On Tue, Feb 9, 2010 at 7:53 AM, Lior Harsat lior.har...@gmail.com wrote: Hi , I am getting OutOfMemoryErrors. The stack trace always points to the exact same place at the Jetty runtime. see stack trace below has anyone experienced this? These errors occur for the same flow in my code (sometime it succeeds and sometime it get the OutOfMemoryError). this particular flow does not return too much content (around 5KB). If my app had a memory problem I would expect to get the OutOfMemoryErrors all over the place, but, it only happens in one flow. please help. java.lang.OutOfMemoryError: Java heap space at java.nio.HeapByteBuffer.init(Unknown Source) at java.nio.ByteBuffer.allocate(Unknown Source) at com.google.apphosting.runtime.jetty.RpcResponseGenerator.newBufferFromPool(RpcResponseGenerator.java: 213) at com.google.apphosting.runtime.jetty.RpcResponseGenerator.init(RpcResponseGenerator.java: 39) at com.google.apphosting.runtime.jetty.RpcConnection.init(RpcConnection.java: 41) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java: 99) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java: 235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5233) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java: 24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 363) at com.google.net.rpc.impl.Server$2.run(Server.java:838) at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java: 56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java: 536) at com.google.net.rpc.impl.Server.startRpc(Server.java:793) at com.google.net.rpc.impl.Server.processRequest(Server.java:368) at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java: 448) at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java: 319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java: 290) at com.google.net.async.Connection.handleReadEvent(Connection.java: 466) at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java: 759) at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java: 205) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java: 101) at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java: 251) at com.google.apphosting.runtime.JavaRuntime $RpcRunnable.run(JavaRuntime.java:394) at java.lang.Thread.run(Unknown Source) -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@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] java.lang.VerifyError
Hi Steve, thanks for bringing this to our attention. We've identified a problem on our end and we're in the process of correcting it. You're of course free to continue using an older version of the SDK, but newer versions are not susceptible to this problem. Max On Tue, Feb 9, 2010 at 5:56 AM, Steve Shrader steveshra...@gmail.comwrote: I have an application that has been deployed and running for several months. Yesterday it began throwing the error java.lang.VerifyError. No new deployments or changes in usage on my side. The code throwing the error is in this method... /** * Retrieve a list of Expense depending on the Dates and Vendor passed in. There will be two * execution paths because Vendor does not need to be passed in as a filter. */ @SuppressWarnings(unchecked) //query is against Expense.class so it will return ListExpense public Liststeveshrader.budget.client.dto.Expense getExpenses(Date startDate, Date endDate, String vendor) { Liststeveshrader.budget.client.dto.Expense dtoExpenses = new ArrayListsteveshrader.budget.client.dto.Expense(); String userId = getUserId(); if(userId != null) { ListExpense expenses = null; PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = pm.newQuery(Expense.class); query.declareImports(import java.util.Date); query.setOrdering(date asc); String queryFilter = userId == userIdParam date = startDateParam date = endDateParam; Map queryParameters = new HashMap(); queryParameters.put(userIdParam, userId); queryParameters.put(startDateParam, startDate); queryParameters.put(endDateParam, endDate); if(vendor != null vendor.trim().length() 0) { //if a vendor passed in queryFilter = queryFilter + vendor == vendorParam; queryParameters.put(vendorParam, vendor); } query.setFilter(queryFilter); expenses = (ListExpense) query.executeWithMap(queryParameters); for(Expense e : expenses) { dtoExpenses.add(new steveshrader.budget.client.dto.Expense(e.getId(), e.getDate(), e.getAmount(), e.getVendor(), e.getExpenseType(), e.getPaymentType())); } pm.close(); } return dtoExpenses; } The complete stack trace is... javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.util.List steveshrader.budget.client.BudgetService.getExpenses(java.util.Date,java.util.Date,java.lang.String)' threw an unexpected exception: java.lang.VerifyError: org/datanucleus/ store/appengine/query/StreamingQueryResult$1 at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java: 360) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 546) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java: 166) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java: 86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1093) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java: 97) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java: 35) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at
Re: [appengine-java] Re: vs-accounting.appspot.com - datastore viewer error
One solution is to run some cron / task-queue based job which fixes up the entities in the background. On Tue, Feb 9, 2010 at 5:40 AM, aswath satrasala aswath.satras...@gmail.com wrote: Hello Toby, thanks. Yes, the property type email could have been empty. Further dev, I will change them to non-empty. Now, I cannot trace back those entities from my application, as it is being tested and is logged in by different users and entities are created. How can I correct this situation? -Aswath On Sat, Feb 6, 2010 at 1:06 AM, Toby Reyelts to...@google.com wrote: You have an empty property of type e-mail, and that makes the datastore viewer unhappy. You need to either use a different type that can be non-empty (like String), or have non-empty e-mails. On Thu, Feb 4, 2010 at 10:25 PM, aswath satrasala aswath.satras...@gmail.com wrote: My application is running fine. I am still getting the datastore viewer error.What can we do in this scenario. How can we get support? -Aswath On Mon, Feb 1, 2010 at 12:36 PM, aswath satrasala aswath.satras...@gmail.com wrote: Hello GAE team, I am still not able to use the DataStore viewer for my app-id 'vs-accounting' Thanks -Aswath On Thu, Jan 28, 2010 at 11:08 AM, aswath satrasala aswath.satras...@gmail.com wrote: Local file: datastore-indexes !-- Used 2 times in query history -- datastore-index kind=Tenant ancestor=true source=auto property name=tenants_INTEGER_IDX direction=asc/ /datastore-index !-- Used 1 time in query history -- datastore-index kind=Party ancestor=true source=auto property name=partys_INTEGER_IDX direction=asc/ /datastore-index !-- Used 1 time in query history -- datastore-index kind=SecurityGroup ancestor=true source=auto property name=secGrpList_INTEGER_IDX direction=asc/ /datastore-index datastore-index kind=PartyRole ancestor=true source=auto property name=partyRoles_INTEGER_IDX direction=asc/ /datastore-index /datastore-indexes Production: Party partys_INTEGER_IDX ▲ Includes ancestors *Serving* PartyRole partyRoles_INTEGER_IDX ▲ Includes ancestors *Serving* SecurityGroup secGrpList_INTEGER_IDX ▲ Includes ancestors *Serving* Tenant tenants_INTEGER_IDX ▲ Includes ancestors 12hrs ago , the secGrpList_INTEGER_IDX was not shown on the production admin console. Now, it is showing up. The datastore viewer is still responding back error page. -Aswath On Thu, Jan 28, 2010 at 2:48 AM, Ikai L (Google) ika...@google.comwrote: What does you local indexes file look like? Can you post the indexes listed in your production admin console? On Tue, Jan 26, 2010 at 11:24 PM, aswath satrasala aswath.satras...@gmail.com wrote: Hello GAE team, Further observations made while testing the app. I am not able to write entities to the datastore. Upon examining the logs, I found the following error. com.veersoft.action.CreateTenantAction doCreate: com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching index found.. datastore-index kind=SecurityGroup ancestor=true source=manual property name=secGrpList_INTEGER_IDX direction=asc/ /datastore-index The application is fine on the local develpment server. -Aswath On Tue, Jan 26, 2010 at 8:51 PM, aswath satrasala aswath.satras...@gmail.com wrote: Hello, My app-id is vs-accounting. I login into appengine.google.com. I choose the above application. Then I click on the datastore viewer. I get the error Server Error A server error has occurred. Return to Applications screen » https://appengine.google.com/ -Aswath -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@googlegroups.com. To unsubscribe from this group,
[appengine-java] Re: Use Blobstore Java API with GWT
Dou you have an example source code to do this. i am bit lost in this matter? On Dec 19 2009, 1:28 am, Henry enricrequ...@gmail.com wrote: Yes, I did like this and works without problems...thank for the response! On 17 Dec, 09:42, Raphael André Bauer raphael.andre.ba...@gmail.com wrote: hey henry, the gwt frontend code looks like java, but it is crosscompiled. that's the reason why the imports cannot be found - it's technically something completely different. so what you have to do is having an RPC call to your server, that returns a valid form url where you can upload your files. basically BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); must be in the servlet of your RPC and the value returned by then you get this url back and add it to your client code in .setAction .. hope that helps, ra On Thu, Dec 17, 2009 at 12:08 AM, Henry enricrequ...@gmail.com wrote: Hi Guys, Im trying to upload images using the new Blobstore API to the app engine with GWT. Ive created a FormPanel() to upload the images to the app engine, but when im trying to set up the action in the form using BlobstoreService, i cant because the import com.google.appengine cannot be resolved. My question is: how can I set up the action on the form using the BlobstoreService?? I've this code in the client side: import com.google.appengine.api.blobstore.BlobstoreService; FormPanel form = new FormPanel(); form.setEncoding(FormPanel.ENCODING_MULTIPART); form.setMethod(FormPanel.METHOD_POST); BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); form.setAction(blobstoreService.createUploadUrl(handizo/ upload)); error: import com.google.appengine cannot be resolved. Ive also tried to setup the action without the BlobstoreService, but when the form is read in the server side using the BlobstoreService: private BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { MapString, BlobKey blobs = blobstoreService.getUploadedBlobs(req); BlobKey blobKey = blobs.get(myFile); if (blobKey == null) { resp.sendRedirect(/); } else { resp.sendRedirect(/serve?blob-key= + blobKey.getKeyString()); } I've this other error saying me that I've to set up the action using the BlobstoreService. Error: Must be called from a blob upload callback request. at com.google.appengine.api.blobstore.BlobstoreServiceImpl.getUploadedBlobs (BlobstoreServiceImpl.java:97) at com.handizo.server.service.FileUploadAnnouncementServlet.doPost (FileUploadAnnouncementServlet.java:23) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) So its possible to user the BlobstoreService with GWT by the moment?? Thanks in advance :-) -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp://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-j...@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] makeImageFromBlob but no storeImageToBlob ?
Hello, does anyone know how to update a (image-)blob file after image transformation via ImageService? // LOAD ImagesServiceFactory.makeImageFromBlob(blobKey); // TRANSFORM Transform resize = ImagesServiceFactory.makeResize(150, 200); Image newImage = imagesService.applyTransform(resize, oldImage); // UPDATE NOT POSSIBLE? update blob? thanks in advance alex -- 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-j...@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] queue.xml question
The bucket size and rate seem to have no effect when running my application in eclipse. The tasks added to my queue are processed at the default rate. Is there something I need to know? ?xml version=1.0 encoding=UTF-8? queue-entries queue nameetfease/name rate0/m/rate bucket-size1/bucket-size /queue /queue-entries -- 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-j...@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] VerifyError on StreamingQueryResult
Look similar to http://groups.google.com/group/google-appengine-java/browse_thread/thread/daa540465c4605d/c155d492b8fe89c9?lnk=gstq=StreamingQueryResult%241#c155d492b8fe89c9 app id: swiatlo-czuli gae version: 1.2.1 (?) Uncaught exception from servlet java.lang.VerifyError: org/datanucleus/store/appengine/query/ StreamingQueryResult$1 at org.datanucleus.store.appengine.query.StreamingQueryResult.listIterator(StreamingQueryResult.java: 128) at org.datanucleus.store.appengine.query.StreamingQueryResult.iterator(StreamingQueryResult.java: 120) at pl.simpatico.swiatloczuli.server.supports.FolderSupport.getFoldersTree(FolderSupport.java: 179) at org.apache.jsp.gallery_jsp._jspService(gallery_jsp.java:83) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1093) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java: 129) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java: 77) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at pl.simpatico.swiatloczuli.server.filter.CharEncodingFilter.doFilter(CharEncodingFilter.java: 44) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java: 97) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java: 35) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java: 238) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506) at org.mortbay.jetty.HttpConnection $RequestHandler.headerComplete(HttpConnection.java:830) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java: 76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java: 135) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java: 235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5485) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5483) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java: 24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 363) at com.google.net.rpc.impl.Server$2.run(Server.java:837) at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java: 56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java: 536) at com.google.net.rpc.impl.Server.startRpc(Server.java:792) at com.google.net.rpc.impl.Server.processRequest(Server.java:367) at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java: 448) at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java: 319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java: 290) at com.google.net.async.Connection.handleReadEvent(Connection.java: 474) at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java: 774) at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java: 205) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java: 101) at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java: 251) at
[appengine-java] java.lang.NoClassDefFoundError: Could not initialize ... PMF
Error for ... java.lang.NoClassDefFoundError: Could not initialize class dao.PMF at my app got the above problems quite often. And, it will get cured by itself after a while. Any idea how to fix it totally? i checked - nothing above quote limits. -- 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-j...@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: Persistence with JPA + GAE
Hi Johan, you can use the Long as PK @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; []'s Diego 2010/2/9 Johan Vallejo jvall...@vnperu.com Hi Jake, Now i have this error Log : javax.persistence.PersistenceException: Transaction is still active. You should always close your transactions correctly using commit() or rollback(). this is my code : EntityManager cn2 = emf.get().createEntityManager(); distritos dist2 = cn2.find(distritos.class, id); evento e = new evento(); e.setDistrito(dist2); Date fecha = new Date(); e.setFechaCreacion(fecha); try{ cn2.getTransaction().begin(); cn2.persist(e); cn2.getTransaction().commit(); response.getWriter().write(ok); }finally{ cn2.close(); } Distrito : @Entity public class distritos implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Extension (vendorName=datanucleus, key=gae.encoded-pk, value=true) Key id; --getter and setter-- El 08/02/2010 03:37 p.m., Jake escribió: Hello, The Google Datastore has four ways that you can store a Primary Key ID: String, Long, and two variations on Google's own Key object. If you want to create a parent/child relationship between two persisted objects (in your case, evento is the parent and distritos is the child), then you need to use Google's Key object as the primary ID. See: http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#Keys If the class is used as a child class in a relationship, the key field must be of a type capable of representing an entity group parent: either a Key instance, or a Key value encoded as a string. So, you have two options: 1. Change your Long id values to Key id values. 2. Instead of storing private distritos distrito directly in your evento object, store a reference to the id: private Long distrito_id Jake On Feb 6, 4:06 pm, chevelle jvall...@vnperu.com jvall...@vnperu.com wrote: Hi I am new in the list, in these days i am trying save data between two entity beans using JPA but without success, i am cheking the log nd says: Uncaught exception from servlet javax.persistence.PersistenceException: Error in meta-data forbeans.distritos.id: Cannot have a java.lang.Long primary key and be a child object (owning field is beans.evento.distrito). this is my servlet: Long id = Long.parseLong(request.getParameter(idDistrito)); response.setContentType(text/html); EntityManager cn = emf.get().createEntityManager(); Query q = cn.createQuery(SELECT d FROM distritos d WHEREd.id = :codigo); q.setParameter(codigo,id); distritos dist = (distritos) q.getSingleResult(); EntityManager cn2 = emf.get().createEntityManager(); cn2.getTransaction().begin(); evento e = new evento(); e.setDistrito(dist); Date fecha = new Date(); e.setFechaCreacion(fecha); try{ cn2.persist(e); response.getWriter().write(ok); }finally{ cn2.getTransaction().commit(); cn2.close(); } this is my entity bean Evento: @Entity public class evento implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; @Temporal(javax.persistence.TemporalType.DATE) private Date fechaCreacion; @JoinColumn @OneToMany(cascade = CascadeType.ALL) private distritos distrito; --getter and setter-- Distrito: @Entity public class distritos implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; private String distrito; --getter and setter-- i hope anyone help me, Thank! Johan -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@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] VerifyError on StreamingQueryResult
Thanks for the report. This is indeed the same issue. We're testing a fix now and hope to have this resolved very soon. Max On Tue, Feb 9, 2010 at 4:27 AM, paweł majewski swiatloczuli...@gmail.comwrote: Look similar to http://groups.google.com/group/google-appengine-java/browse_thread/thread/daa540465c4605d/c155d492b8fe89c9?lnk=gstq=StreamingQueryResult%241#c155d492b8fe89c9 app id: swiatlo-czuli gae version: 1.2.1 (?) Uncaught exception from servlet java.lang.VerifyError: org/datanucleus/store/appengine/query/ StreamingQueryResult$1 at org.datanucleus.store.appengine.query.StreamingQueryResult.listIterator(StreamingQueryResult.java: 128) at org.datanucleus.store.appengine.query.StreamingQueryResult.iterator(StreamingQueryResult.java: 120) at pl.simpatico.swiatloczuli.server.supports.FolderSupport.getFoldersTree(FolderSupport.java: 179) at org.apache.jsp.gallery_jsp._jspService(gallery_jsp.java:83) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1093) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java: 129) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java: 77) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at pl.simpatico.swiatloczuli.server.filter.CharEncodingFilter.doFilter(CharEncodingFilter.java: 44) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java: 97) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java: 35) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java: 238) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506) at org.mortbay.jetty.HttpConnection $RequestHandler.headerComplete(HttpConnection.java:830) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java: 76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java: 135) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java: 235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5485) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5483) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java: 24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 363) at com.google.net.rpc.impl.Server$2.run(Server.java:837) at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java: 56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java: 536) at com.google.net.rpc.impl.Server.startRpc(Server.java:792) at com.google.net.rpc.impl.Server.processRequest(Server.java:367) at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java: 448) at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java: 319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java: 290) at com.google.net.async.Connection.handleReadEvent(Connection.java: 474) at
[appengine-java] DataStore Error 1000000 characters, but I'm not persisting
Hello, I'm getting the following error: java.lang.IllegalArgumentException: string property _values is too long. It cannot exceed 100 characters. The trick is, I'm not persisting any Blobs and certainly none called _values. I do have one object with a Blob field, but I'm not persisting anything to that field to cause the above exception. Also, this is a new issue and that Blob has been in my application for awhile. All I'm doing is viewing pages that query the datastore. My admin panel doesn't show any quota issues. My newest change is that I'm uploading a 350K XML file (a book), applying some XSLT translation using Saxon and storing the result in an application variable, and displaying certain chunks of that file depending on the clicked page. I do have sessions enabled, which I fear is related, but I'm not sure how to resolve this. Thanks in advance for any help! Jake /titlepage java.lang.IllegalArgumentException: string property _values is too long. It cannot exceed 100 characters. at com.google.appengine.api.datastore.DatastoreApiHelper.translateError(DatastoreApiHelper.java: 33) at com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(DatastoreApiHelper.java: 60) at com.google.appengine.api.datastore.DatastoreServiceImpl $2.run(DatastoreServiceImpl.java:163) at com.google.appengine.api.datastore.TransactionRunner.runInTransaction(TransactionRunner.java: 30) at com.google.appengine.api.datastore.DatastoreServiceImpl.put(DatastoreServiceImpl.java: 151) at com.google.appengine.api.datastore.DatastoreServiceImpl.put(DatastoreServiceImpl.java: 131) at com.google.appengine.api.datastore.DatastoreServiceImpl.put(DatastoreServiceImpl.java: 123) at com.google.apphosting.runtime.jetty.SessionManager $AppEngineSession.save(SessionManager.java:162) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java: 41) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java: 238) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506) at org.mortbay.jetty.HttpConnection $RequestHandler.headerComplete(HttpConnection.java:830) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java: 76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java: 135) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java: 235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5485) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5483) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java: 24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 363) at com.google.net.rpc.impl.Server$2.run(Server.java:837) at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java: 56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java: 536) at com.google.net.rpc.impl.Server.startRpc(Server.java:792) at com.google.net.rpc.impl.Server.processRequest(Server.java:367) at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java: 448) at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java: 319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java: 290) at com.google.net.async.Connection.handleReadEvent(Connection.java: 474) at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java: 774) at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java: 205) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java: 101) at
Re: [appengine-java] Re: Google Plugin for Eclipse 1.3 plans
I'm a bit of a Scala enthusiast myself, so I'm glad to see folks using Scala on App Engine. Last I checked, Miles was swamped, but here's hoping he can do this! On Tue, Feb 9, 2010 at 8:57 AM, ga...@dynafocus.com ga...@dynafocus.comwrote: This all sounds good. However please make sure that it plays well with other languages, especially scala. I opened this ticket 3 months ago with the scala eclipse plugin team. https://lampsvn.epfl.ch/trac/scala/ticket/2614 Thanks On Feb 4, 2:52 pm, Keith Platfoot kplatf...@google.com wrote: Hey all, Many of you have reported incompatibilities between the Google Plugin for Eclipse and other build systems/project structures, most notably Maven and J2EE/Dynamic Web Projects. For example, issue 1515 (Eclipse plugin requires fixed location for war directory) http://code.google.com/p/googleappengine/issues/detail?id=1515 has collected well over 100 stars, and a similar one in the GWT issue tracker has attracted a lot of attention as well. Based on this feedback, we've decided to try and address as many of the incompatibilities as possible with our upcoming 1.3 release of the plugin. To deliver on that goal, we want to share with your our current plans, and also let you know about a preview build that we'll make available so you can test the changes for yourself and give us feedback before final release. Our plans for the 1.3 release include 4 changes designed to make integration with Maven and J2EE projects easier: 1. The WAR directory can now be configured to be *any* project-relative path (e.g. src/main/webapp if you're using Maven). You'll also be able to specify whether that directory is source-only (typical Maven/J2EE scenario), or whether it should also function as the WAR output directory from which to run/debug or deploy to App Engine. If your WAR directory is input *and* output (which will remain the default for new Web App projects), the plugin will manage synchronizing the contents of WEB-INF/lib WEB-INF/classes with your project's build path and compiled output. Otherwise, we'll leave your WAR source directory alone and you'll need to specify your WAR output location when launching, deploying, etc (the plugin will remember the location once you set it the first time). 2. The Web App launch configuration UI is being redesigned to allow you to see, and if necessary change, *any* of the launch arguments. Previously, we were waiting until launch time to set many of these arguments based on heuristics that were invisible and inaccessible to you. Now you'll be in full control of how your projects get launched. Also, we're adding the capability to automatically migrate your launch configurations when necessary, for example, updating the -javaagent flag when changing App Engine SDKs. 3. GWT/App Engine projects will no longer require our SDK library on the classpath. This means Maven users will be able to pull in JAR files from their M2 repository as they're accustomed to and the plugin won't mind a bit. 4. The severity of any problem marker generated by the plugin will be fully customizable via an Errors/Warnings preference page (similar to the Java Errors/Warnings page), letting you specify either Error, Warning, or Ignore. We'll also be including a few smaller features and bug fixes as well. What does everyone think about the 4 changes outlined above? We've been testing the plugin against various Maven and J2EE configurations to try to ensure that we've eliminated the most critical roadblocks. However, we're very interested in also having you folks take it for a spin before the official release date (slated for next month). We're not quite ready yet, but stay tuned for a 1.3 preview build to be made available hopefully in a few weeks. We'll distribute it as a zip file for dropin installationhttp://code.google.com/eclipse/docs/install-from-zip.html so it will come with the standard warnings and caveats (use with a clean Eclipse install and workspace, use at your risk, etc.). However, it will hopefully give you a chance to give us any last-minute feedback about our changes before the final release. Thanks, Keith -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this
Re: [appengine-java] Re: Persistence with JPA + GAE
Hi Diego Yes, i try using Long and Key but with both i have the error Log : javax.persistence.PersistenceException: Transaction is still active. You should always close your transactions correctly using commit() or rollback(). El 09/02/2010 01:06 p.m., Diego Osse Fernandes escribi: Hi Johan, you can use the Long as PK @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; []'s Diego 2010/2/9 Johan Vallejo jvall...@vnperu.com Hi Jake, Now i have this error Log : javax.persistence.PersistenceException: Transaction is still active. You should always close your transactions correctly using commit() or rollback(). this is my code : EntityManager cn2 = emf.get().createEntityManager(); distritos dist2 = cn2.find(distritos.class, id); evento e = new evento(); e.setDistrito(dist2); Date fecha = new Date(); e.setFechaCreacion(fecha); try{ cn2.getTransaction().begin(); cn2.persist(e); cn2.getTransaction().commit(); response.getWriter().write("ok"); }finally{ cn2.close(); } Distrito : @Entity public class distritos implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Extension (vendorName="datanucleus", key="gae.encoded-pk", value="true") Key id; --getter and setter-- El 08/02/2010 03:37 p.m., Jake escribi: Hello, The Google Datastore has four ways that you can store a Primary Key ID: String, Long, and two variations on Google's own Key object. If you want to create a parent/child relationship between two persisted objects (in your case, evento is the parent and distritos is the child), then you need to use Google's Key object as the primary ID. See: http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#Keys "If the class is used as a "child" class in a relationship, the key field must be of a type capable of representing an entity group parent: either a Key instance, or a Key value encoded as a string." So, you have two options: 1. Change your Long id values to Key id values. 2. Instead of storing "private distritos distrito" directly in your evento object, store a reference to the id: "private Long distrito_id" Jake On Feb 6, 4:06pm, chevelle jvall...@vnperu.com wrote: Hi I am new in the list, in these days i am trying save data between two entity beans using JPA but without success, i am cheking the log nd says: Uncaught exception from servlet javax.persistence.PersistenceException: Error in meta-data for beans.distritos.id: Cannot have a java.lang.Long primary key and be a child object (owning field is beans.evento.distrito). this is my servlet: Long id = Long.parseLong(request.getParameter("idDistrito")); response.setContentType("text/html"); EntityManager cn = emf.get().createEntityManager(); Query q = cn.createQuery("SELECT d FROM distritos d WHERE d.id = :codigo"); q.setParameter("codigo",id); distritos dist = (distritos) q.getSingleResult(); EntityManager cn2 = emf.get().createEntityManager(); cn2.getTransaction().begin(); evento e = new evento(); e.setDistrito(dist); Date fecha = new Date(); e.setFechaCreacion(fecha); try{ cn2.persist(e); response.getWriter().write("ok"); }finally{ cn2.getTransaction().commit(); cn2.close(); } this is my entity bean Evento: @Entity public class evento implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; @Temporal(javax.persistence.TemporalType.DATE) private Date fechaCreacion; @JoinColumn @OneToMany(cascade = CascadeType.ALL) private distritos distrito; --getter and setter-- Distrito: @Entity public class distritos implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; private String distrito; --getter and setter-- i hope anyone help me, Thank! Johan -- 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. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send
[appengine-java] Discussion on will-it-play-in-app-engine
Has anyone tried some of the payment gateways within AppEngine? I am looking at the Chase Orbital Secure Payment Gateway. One issue I have from an initial look at their Developer Guide is the requirement for an additional SSL security provider: security.provider.3=com.sun.net.ssl.internal.ssl.Provider -- 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-j...@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] Tag search
I already searchedread app-engine(|-java|-python) forums for tag search and it looks like the the best way to implement tags is unordered relationship many to many. I can search for object with one tag. But I would like to specify multiple tags. e.g. I wish objects that has all 10 tags that I specify or any of 10 tags that I specify. I would like to generate tag cloud also. But SELECT name, count(name) from Tags GROUP by name is not supported Is that possible to implement all most common tag features with app engine? I start thinking that it is not possible. I will have millions of object. So I can't select all objects. Have someone implemented tags in App Engine? Please, tell if know that it is not possible to implement tags in App Engine. Thanks, Max -- 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-j...@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] Tag search
Hi Max, you could store tags as a multi-valued property which will allow you to search for entities with all tags in a single query. To track how common a tag is you should maintain a count entity for each one. On 10 Feb 2010, at 02:23, Max wrote: I already searchedread app-engine(|-java|-python) forums for tag search and it looks like the the best way to implement tags is unordered relationship many to many. I can search for object with one tag. But I would like to specify multiple tags. e.g. I wish objects that has all 10 tags that I specify or any of 10 tags that I specify. I would like to generate tag cloud also. But SELECT name, count(name) from Tags GROUP by name is not supported Is that possible to implement all most common tag features with app engine? I start thinking that it is not possible. I will have millions of object. So I can't select all objects. Have someone implemented tags in App Engine? Please, tell if know that it is not possible to implement tags in App Engine. Thanks, Max -- 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-j...@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: Google Plugin for Eclipse 1.3 plans
I filed http://code.google.com/p/google-web-toolkit/issues/detail?id=4608. GPE should NPE even if the source language is Scala. On Tue, Feb 9, 2010 at 11:57 AM, ga...@dynafocus.com ga...@dynafocus.comwrote: This all sounds good. However please make sure that it plays well with other languages, especially scala. I opened this ticket 3 months ago with the scala eclipse plugin team. https://lampsvn.epfl.ch/trac/scala/ticket/2614 Thanks On Feb 4, 2:52 pm, Keith Platfoot kplatf...@google.com wrote: Hey all, Many of you have reported incompatibilities between the Google Plugin for Eclipse and other build systems/project structures, most notably Maven and J2EE/Dynamic Web Projects. For example, issue 1515 (Eclipse plugin requires fixed location for war directory) http://code.google.com/p/googleappengine/issues/detail?id=1515 has collected well over 100 stars, and a similar one in the GWT issue tracker has attracted a lot of attention as well. Based on this feedback, we've decided to try and address as many of the incompatibilities as possible with our upcoming 1.3 release of the plugin. To deliver on that goal, we want to share with your our current plans, and also let you know about a preview build that we'll make available so you can test the changes for yourself and give us feedback before final release. Our plans for the 1.3 release include 4 changes designed to make integration with Maven and J2EE projects easier: 1. The WAR directory can now be configured to be *any* project-relative path (e.g. src/main/webapp if you're using Maven). You'll also be able to specify whether that directory is source-only (typical Maven/J2EE scenario), or whether it should also function as the WAR output directory from which to run/debug or deploy to App Engine. If your WAR directory is input *and* output (which will remain the default for new Web App projects), the plugin will manage synchronizing the contents of WEB-INF/lib WEB-INF/classes with your project's build path and compiled output. Otherwise, we'll leave your WAR source directory alone and you'll need to specify your WAR output location when launching, deploying, etc (the plugin will remember the location once you set it the first time). 2. The Web App launch configuration UI is being redesigned to allow you to see, and if necessary change, *any* of the launch arguments. Previously, we were waiting until launch time to set many of these arguments based on heuristics that were invisible and inaccessible to you. Now you'll be in full control of how your projects get launched. Also, we're adding the capability to automatically migrate your launch configurations when necessary, for example, updating the -javaagent flag when changing App Engine SDKs. 3. GWT/App Engine projects will no longer require our SDK library on the classpath. This means Maven users will be able to pull in JAR files from their M2 repository as they're accustomed to and the plugin won't mind a bit. 4. The severity of any problem marker generated by the plugin will be fully customizable via an Errors/Warnings preference page (similar to the Java Errors/Warnings page), letting you specify either Error, Warning, or Ignore. We'll also be including a few smaller features and bug fixes as well. What does everyone think about the 4 changes outlined above? We've been testing the plugin against various Maven and J2EE configurations to try to ensure that we've eliminated the most critical roadblocks. However, we're very interested in also having you folks take it for a spin before the official release date (slated for next month). We're not quite ready yet, but stay tuned for a 1.3 preview build to be made available hopefully in a few weeks. We'll distribute it as a zip file for dropin installationhttp://code.google.com/eclipse/docs/install-from-zip.html so it will come with the standard warnings and caveats (use with a clean Eclipse install and workspace, use at your risk, etc.). However, it will hopefully give you a chance to give us any last-minute feedback about our changes before the final release. Thanks, Keith -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Miguel -- 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
Re: [appengine-java] 500 Server error when loading data into memory
There's a 10mb limit on files, but I'm wondering if we accidentally trip this if it's a bit lower. What happens if you break the zip file up and load it piecemeal? On Wed, Feb 3, 2010 at 1:46 PM, Alyona medel...@gmail.com wrote: Hi, I get a 500 Server error when running my app maui-indexer. It might have something to do with the timeout or the quota, when a relatively large zipped text file (~9M) is loaded into memory, which is required by my app. I had now problems uploading using eclipse and I can't see any specific info in the error logs on the dashboard. Could you please advise what I need to do to make it work? Cheers Alyona - Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the query that caused it. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- 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-j...@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] Best option to scope transactions for fast RPC calls
If the Merchants are the root entity, then a transaction on the Merchant's entity group will not trample a transaction on another Merchant's entity group. Is this how you have things set up? On Fri, Feb 5, 2010 at 1:16 PM, Bourke Floyd IV chb...@gmail.com wrote: I'm working on a RPC like service and I was wondering if I picked the right method to implement my classes that I'll be persisting to the datastore. Also note that I allow users to create their own keys used to lookup their data. Currently I have a MerchantClass Entity that holds my merchants and a DataWrapper Entity that holds the data they are looking for. Several merchants could be making requests at the same time, and as I understand it could cause (read/write) transactions to fail. I don't have any relationships at the moment because I don't want opening a Transaction on the MerchantClass Entity to prevent read/writes to the DataWrapper Entities. However, I do want to limit the scope in a more modular way to keep a merchants transactions from interfering with other merchants transactions. My overall goal is speed if I just need to keep it simple. Currently I can get a merchant and verify their status, then get their requested transaction without any problems. But I merchants can't register two transactions with the same key, and I'm a little worried that one merchant could interfere with the success of another merchants successful transactions. Thanks for input! -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- 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-j...@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] Error while uploading the App - Unable to update
Is there any information in that log file that the error mentioned? On Mon, Feb 8, 2010 at 3:22 AM, mike22153 groeg...@gmx.de wrote: Hi, I just tried to upload my first App to the Google App Engine. I tried the Eclipse Plugin and appengine-java-sdk-1.3.0/bin/appcfg.sh. I have Suse Linux 10.3 and jdk1.6.0_18 installed. Each time I tried, I got the following error: -- Reading application configuration data... Beginning server interaction for ... 0% Creating staging directory 5% Scanning for jsp files. 20% Scanning files on local disk. 25% Initiating update. Email: ...@xxx.xx Password for ...@xxx.xx: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.DefaultSSLContextImpl) Unable to update app: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.DefaultSSLContextImpl) Please see the logs [/tmp/appcfg55133.log] for further information. Has anybody an idea? On my pc, the App is running. Best regards, Michael -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- 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-j...@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] Estimated expiration average of an entity in memcache
You really aren't going to get a useful answer to this question without doing some testing yourself. There are several factors that can influence this: - How many items are you putting into Memcache? - How large are the items? - Are you forcing the old items out via LRU? Other applications with even only minor deviations in numbers from yours will see significantly different results simply due to different usage patterns. I like the way you're approaching the problem - non-critical data that is regularly flushed. This is the way we'd like to encourage developers to think about how to scale their applications: differentiating between what is critical, non-critical, what can be done synchronously versus what can be done asynchronously. I'd toy with the cron jobs and track a miss rate as a function of the length of the cron job interval. There's probably a stable balance between acceptable miss rate and minimizing datastore updates you can achieve that may very well change with time as you change the data being saved or as your application's usage patterns shift. On Sun, Feb 7, 2010 at 4:34 AM, a.maza andr.m...@gmail.com wrote: Hello, I am keeping non-critical data (which is updated quite often) in memcache. I would like to use a cronjob to fetch the data in frequent intervalls from memcache in order to persist it to the datastore. Thus, I would be interested if anyone has any experiences with the average expiration time of entities that are kept in memcache (and there quite frequentally accessed) - 5min? 10min? Thanks and regards, andr -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- 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-j...@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: What is the most optimal way to delete and create objects in the datastore?
Ikai, First, I really would like to thank you for your response. I appreciate the details and links you gave me on improving datastore performance. I work on research, and somehow I need to able to update and/or delete significant amounts of data. This is part of a setup cost our application has to undergo in order to function properly. Our users really do not expect to see an immediate response from the application, but we also would like to reduce the amount of delay when processing data. I think your links about using cache, batch processing, and AJAX operations could help us to alleviate the setup cost of our application. Those may be the alternative mechanisms that we need in our data intensive operations. Are you aware of the possibility of running computer simulations in App Engine? Is it possible? Is there a way to keep running a process longer than the timeout deadlines? Thanks for your help. On Feb 9, 3:20 pm, Ikai L (Google) ika...@google.com wrote: We're always looking at ways to improve datastore performance, but we really try to push developers towards optimizing the performance from the User's perspective. That is - if you have to delete or create 150 persistent, indexed objects, you may want to rethink what problems you are trying to solve. Users have come to expect a certain level of quality of service when it comes to certain types of page serves, and you can fake this out by using Memcache and task queues for writes. True, the amount of computation still does not go down, but there's a net gain here from an improved experience and increased user retention. I'm not surprised that you're seeing the numbers you're seeing based on the data you've provided. To really scale up, think about how to make operations fast. There are a few tips that go a long way: - make as much as you can asynchronous. For some operations this may not make sense - cache heavily. Use a write-through cache when saving and task queues for big saves - write to as few indexes and entities as possible if you need to do anything synchronously This is one of my favorite articles about this subject: http://highscalability.com/blog/2010/1/22/how-buddypoke-scales-on-fac... http://highscalability.com/blog/2010/1/22/how-buddypoke-scales-on-fac...BuddyPoke realized early on they weren't working with a relational database and made full use of the fact that App Engine's datastore is build on a distributed key-value store with custom indexing. On Mon, Feb 8, 2010 at 11:37 AM, RSN romeo.sanc...@gmail.com wrote: Hi, I am kind of new to GAE, and I was wondering if someone has statistics or data that shows what are the most optimal (efficient) ways for deleting and creating objects in the Datastore. I did some small experiments in order to identify a more efficient mechanism to delete and create objects in the datastore. In these tests, I have a single persistent object that contains 8 persistent fields. In the first test, I have a loop of 150 instances, and at each iteration I create the persistent object, and I call the makePersistent function to add the single instance to the datastore. This should take much longer, and it does. It takes on average 16-17 seconds. In the second test, the loop only creates the 150 objects, and then outside the loop, I call the makePersistentAll function, passing all my collection of objects. As it is mentioned in the documentation, this is supposed to be faster, and it is. It takes on average 1-2 seconds. I have experimented only with one way for deleting objects. Basically, I make a query to retrieve ONLY the keys of my objects. Query query = pm.newQuery(select objectKey from + objectClass.getName()); keys = (ListKey) query.execute(); Then, once all keys have been retrieved, I call the following service method: DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); ds.delete(keys); To delete the objects. It takes on average 2-4 seconds to delete 150 instances. I was just wondering if I am missing something, and if there is a more efficient way for deleting (or creating) objects in the datastore. I see also that there is a higher variance in deleting objects than in creating them. For example, the fastest run in my test took 1.6 seconds to delete the 150 instances, while the slowest run took almost 8 seconds. I do not see this variability when I create the objects (i.e., when I add them to GAE). Any advice or suggestions on alternative methods for doing these kinds of operations in GAE is GREATLY APPRECIATED. Or, If I am in the right track, please let me know. THANKS A LOT. -- 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 togoogle-appengine-j...@googlegroups.com. To unsubscribe from this group, send email
Re: [appengine-java] 500 Server error when loading data into memory
How large is your file unzipped? If it's 9M compressed, I wouldn't be surprised if it comes out to be 100M decompressed in Java heap space causing your heap to be blown out. Are you sure there aren't any errors in your admin console? On Wed, Feb 3, 2010 at 4:46 PM, Alyona medel...@gmail.com wrote: Hi, I get a 500 Server error when running my app maui-indexer. It might have something to do with the timeout or the quota, when a relatively large zipped text file (~9M) is loaded into memory, which is required by my app. I had now problems uploading using eclipse and I can't see any specific info in the error logs on the dashboard. Could you please advise what I need to do to make it work? Cheers Alyona - Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the query that caused it. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@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: What is the most optimal way to delete and create objects in the datastore?
Thanks again! On Feb 9, 3:46 pm, Ikai L (Google) ika...@google.com wrote: For the time being, not without using task queues. We're looking at providing a map/reduce interface, which would likely fit your use case. It's on our roadmap: http://code.google.com/appengine/docs/roadmap.html On Tue, Feb 9, 2010 at 3:43 PM, RSN romeo.sanc...@gmail.com wrote: Ikai, First, I really would like to thank you for your response. I appreciate the details and links you gave me on improving datastore performance. I work on research, and somehow I need to able to update and/or delete significant amounts of data. This is part of a setup cost our application has to undergo in order to function properly. Our users really do not expect to see an immediate response from the application, but we also would like to reduce the amount of delay when processing data. I think your links about using cache, batch processing, and AJAX operations could help us to alleviate the setup cost of our application. Those may be the alternative mechanisms that we need in our data intensive operations. Are you aware of the possibility of running computer simulations in App Engine? Is it possible? Is there a way to keep running a process longer than the timeout deadlines? Thanks for your help. On Feb 9, 3:20 pm, Ikai L (Google) ika...@google.com wrote: We're always looking at ways to improve datastore performance, but we really try to push developers towards optimizing the performance from the User's perspective. That is - if you have to delete or create 150 persistent, indexed objects, you may want to rethink what problems you are trying to solve. Users have come to expect a certain level of quality of service when it comes to certain types of page serves, and you can fake this out by using Memcache and task queues for writes. True, the amount of computation still does not go down, but there's a net gain here from an improved experience and increased user retention. I'm not surprised that you're seeing the numbers you're seeing based on the data you've provided. To really scale up, think about how to make operations fast. There are a few tips that go a long way: - make as much as you can asynchronous. For some operations this may not make sense - cache heavily. Use a write-through cache when saving and task queues for big saves - write to as few indexes and entities as possible if you need to do anything synchronously This is one of my favorite articles about this subject: http://highscalability.com/blog/2010/1/22/how-buddypoke-scales-on-fac... http://highscalability.com/blog/2010/1/22/how-buddypoke-scales-on-fac.. .BuddyPoke realized early on they weren't working with a relational database and made full use of the fact that App Engine's datastore is build on a distributed key-value store with custom indexing. On Mon, Feb 8, 2010 at 11:37 AM, RSN romeo.sanc...@gmail.com wrote: Hi, I am kind of new to GAE, and I was wondering if someone has statistics or data that shows what are the most optimal (efficient) ways for deleting and creating objects in the Datastore. I did some small experiments in order to identify a more efficient mechanism to delete and create objects in the datastore. In these tests, I have a single persistent object that contains 8 persistent fields. In the first test, I have a loop of 150 instances, and at each iteration I create the persistent object, and I call the makePersistent function to add the single instance to the datastore. This should take much longer, and it does. It takes on average 16-17 seconds. In the second test, the loop only creates the 150 objects, and then outside the loop, I call the makePersistentAll function, passing all my collection of objects. As it is mentioned in the documentation, this is supposed to be faster, and it is. It takes on average 1-2 seconds. I have experimented only with one way for deleting objects. Basically, I make a query to retrieve ONLY the keys of my objects. Query query = pm.newQuery(select objectKey from + objectClass.getName()); keys = (ListKey) query.execute(); Then, once all keys have been retrieved, I call the following service method: DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); ds.delete(keys); To delete the objects. It takes on average 2-4 seconds to delete 150 instances. I was just wondering if I am missing something, and if there is a more efficient way for deleting (or creating) objects in the datastore. I see also that there is a higher variance in deleting objects than in creating them. For example, the fastest run in my test took 1.6 seconds to delete the 150 instances, while the slowest run took almost 8 seconds. I do not see this variability
Re: [appengine-java] Re: getNextID
JDO Sequences work, we just haven't publicized them. The DataNucleus docs should tell you everything you need to know: http://www.datanucleus.org/products/accessplatform/jdo/sequences.html IdGeneratorStrategy.INCREMENT is not yet implemented. What are you looking to use it for? Max On Mon, Feb 8, 2010 at 3:20 AM, Vincent TELLIER tellier.vinc...@gmail.comwrote: I tried the incrementation, but I got an error saying that it was not implemented in the appengine datastore. TELLIER Vincent + Email : cont...@tellier-vincent.eu + Contact messenger (msn) : abs...@esugenus.fr 2010/2/8 aswath satrasala aswath.satras...@gmail.com See if the following annotation help you. @Persistent(valueStrategy = IdGeneratorStrategy.INCREMENT) -Aswath On Mon, Feb 8, 2010 at 1:18 AM, datanucleus andy_jeffer...@yahoo.comwrote: What getNextID feature on JDO ? i.e please make reference to the JDO API and which particular API Method you're referring to -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@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: Spring 3.0 + Tiles 2.1.4 + GAE
Hi, try using tiles-2.1.2 Best regards, Vladislav On Feb 8, 12:52 pm, Arun Shanker Prasad arunshankerpra...@gmail.com wrote: Hi All, Any suggestions/thoughts/ideas? Stuck at this now.. Thanks, Arun Shanker Prasad. On Feb 4, 4:23 pm, Arun Shanker Prasad arunshankerpra...@gmail.com wrote: Hi All, I was trying to create a sample spring application with Spring 3.0 (RELEASE) Tiles 2.1.4, but I am getting the following error when I start up the dev server. Has anyone else come across this? Any work around? I had read in the forum about modifying some classes got get the Spring form tag to work, but that was for 2.5, anyone else tried Spring 3.0? What more problems can I get? I am at the initial phase of planning for my project and just thought to give Spring 3.0 a try since I don't want to learn 2.5 if 3.0 is already there ;) WARNING: Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tilesConfigurer' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;: java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ ServletContext;)Ljavax/servlet/jsp/JspApplicationContext; at org.apache.tiles.jsp.evaluator.el.JspExpressionFactoryFactory.getExpression Factory(JspExpressionFactoryFactory.java: 62) at org.apache.tiles.evaluator.el.ELAttributeEvaluator.init(ELAttributeEvaluato r.java: 111) at org.apache.tiles.factory.TilesContainerFactory.storeContainerDependencies(T ilesContainerFactory.java: 447) at org.apache.tiles.factory.TilesContainerFactory.initializeContainer(TilesCon tainerFactory.java: 368) at org.apache.tiles.factory.TilesContainerFactory.createTilesContainer(TilesCo ntainerFactory.java: 287) at org.apache.tiles.factory.TilesContainerFactory.createContainer(TilesContain erFactory.java: 231) at org.apache.tiles.startup.BasicTilesInitializer.createContainer(BasicTilesIn itializer.java: 117) at org.apache.tiles.startup.BasicTilesInitializer.initialize(BasicTilesInitial izer.java: 53) at org.springframework.web.servlet.view.tiles2.TilesConfigurer.afterProperties Set(TilesConfigurer.java: 203) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactor y $5.run(AbstractAutowireCapableBeanFactory.java:1451) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactor y.invokeInitMethods(AbstractAutowireCapableBeanFactory.java: 1449) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactor y.initializeBean(AbstractAutowireCapableBeanFactory.java: 1398) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactor y.doCreateBean(AbstractAutowireCapableBeanFactory.java: 512) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactor y.createBean(AbstractAutowireCapableBeanFactory.java: 450) at org.springframework.beans.factory.support.AbstractBeanFactory $1.getObject(AbstractBeanFactory.java:290) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getS ingleton(DefaultSingletonBeanRegistry.java: 222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abs tractBeanFactory.java: 287) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstr actBeanFactory.java: 189) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preIns tantiateSingletons(DefaultListableBeanFactory.java: 557) at org.springframework.context.support.AbstractApplicationContext.finishBeanFa ctoryInitialization(AbstractApplicationContext.java: 842) at org.springframework.context.support.AbstractApplicationContext.refresh(Abst ractApplicationContext.java: 416) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContex t(FrameworkServlet.java: 443) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContex t(FrameworkServlet.java: 459) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext( FrameworkServlet.java: 340) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkS ervlet.java: 307) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java: 127) at
Re: [appengine-java] Re: UserService.createLoginURL() to a chrome extension
I actually ended up asking one of the Chrome guys for the answer to this. This is what he tells me: Ah, to me it sounds like GAE's createLoginURL function doesn't recognize chrome-extension:// as a protocol. It's appending the extension url like a relative path. You can tell him to redirect to something like success.html on his GAE app, where he can set headers to redirect back to the chrome-extension URL, although I think there may be a security precaution in Chrome to prevent doing that. If that's the case, the developer can inject a content script into success.html that will notify his extension's background page and open the appropriate URL from within the extension itself. I'm sorry if this doesn't make sense, I'm not an expert on Chrome extension development. Have you tried their groups? On Tue, Feb 9, 2010 at 5:48 PM, Shai levys...@gmail.com wrote: I would still appreciate some pointers on this issue. Is the redirect limited to http://; otherwise the API thinks I'm trying to send to file in my application ? any suggestion how to overcome this ? Is there a way to manually create the URL ? Thanks On Feb 4, 5:10 pm, Shai levys...@gmail.com wrote: Hi, If I try doing a redirect to a normal http site it works fine, for example UserService.createLoginURL(http://www.somewhere.com/index.html;) ; This will let me login to my Google app account and then redirect me towww.somewhere.com... But if I try to redirect to html in mychromeextension: UserService.createLoginURL(chrome-extension://[extensionid]/ myhtml.html) ; It redirects me to:http://[myapp]. appspot.com/chrome-extension://[myextensionid]]/ myhtml.html Can someone suggest a simple solution ? Mychromeplug-in uses Google app engine for authentication and I when the user is not logged in I would like to invoke a log-in page and give control back to myextension -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- 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-j...@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: getNextID
Hello Max, I am planning to use IdGeneratorStrategy.INCREMENT feature to assign sequential ids for entities I am creating. for example, Employee. -Aswath On Wed, Feb 10, 2010 at 5:49 AM, Max Ross (Google) maxr+appeng...@google.com maxr%2bappeng...@google.com wrote: JDO Sequences work, we just haven't publicized them. The DataNucleus docs should tell you everything you need to know: http://www.datanucleus.org/products/accessplatform/jdo/sequences.html IdGeneratorStrategy.INCREMENT is not yet implemented. What are you looking to use it for? Max On Mon, Feb 8, 2010 at 3:20 AM, Vincent TELLIER tellier.vinc...@gmail.com wrote: I tried the incrementation, but I got an error saying that it was not implemented in the appengine datastore. TELLIER Vincent + Email : cont...@tellier-vincent.eu + Contact messenger (msn) : abs...@esugenus.fr 2010/2/8 aswath satrasala aswath.satras...@gmail.com See if the following annotation help you. @Persistent(valueStrategy = IdGeneratorStrategy.INCREMENT) -Aswath On Mon, Feb 8, 2010 at 1:18 AM, datanucleus andy_jeffer...@yahoo.comwrote: What getNextID feature on JDO ? i.e please make reference to the JDO API and which particular API Method you're referring to -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@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] Least CPU Intensive way to query?
Hi guys, I was wondering if anyone has found a less CPU intensive way to query. I basically have a bunch of small objects in the database I want out. I tried a few ways to get them out, including an extent and a query. I ended up settling on this: Query query = pm.newQuery(Post.class); query.setOrdering(postedDate desc); query.setRange(start, end); ListPost posts = (ListPost) query.execute(); Doing a range of 0 to 1000.. figuring the 1000 newest items is good enough. I find that this tends to be pretty bad on my quota CPU.. like maybe 8 seconds of CPU time per query, if there are 1000 posts. Is this just how it is? Or do I need to add an index to postedDate maybe? I plan to play with it more tomorow, but if anyone has insight on getting stuff out of the database fast (from both a time and CPU quota standpoint), I would appreciate it. I have never seen a datbase take .1 seconds for such a stupid silly query, I have to be doing something wrong. 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-j...@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: Least CPU Intensive way to query?
I am also getting and closing a new PersistenceManager around the query, if that matters On Feb 9, 11:08 pm, Brian bwa...@gmail.com wrote: Hi guys, I was wondering if anyone has found a less CPU intensive way to query. I basically have a bunch of small objects in the database I want out. I tried a few ways to get them out, including an extent and a query. I ended up settling on this: Query query = pm.newQuery(Post.class); query.setOrdering(postedDate desc); query.setRange(start, end); ListPost posts = (ListPost) query.execute(); Doing a range of 0 to 1000.. figuring the 1000 newest items is good enough. I find that this tends to be pretty bad on my quota CPU.. like maybe 8 seconds of CPU time per query, if there are 1000 posts. Is this just how it is? Or do I need to add an index to postedDate maybe? I plan to play with it more tomorow, but if anyone has insight on getting stuff out of the database fast (from both a time and CPU quota standpoint), I would appreciate it. I have never seen a datbase take .1 seconds for such a stupid silly query, I have to be doing something wrong. 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-j...@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: getNextID
Hi Aswath, Unfortunately there is no way to guarantee the assignment of sequential ids using JDO on App Engine, or even using the low-level datastore api. This is because ids are allocated in batches across many datastore backends, and one request to get the next id may hit one backend while another may hit a different backend. Is sequential ids a hard requirement? Max On Tue, Feb 9, 2010 at 8:27 PM, aswath satrasala aswath.satras...@gmail.com wrote: Hello Max, I am planning to use IdGeneratorStrategy.INCREMENT feature to assign sequential ids for entities I am creating. for example, Employee. -Aswath On Wed, Feb 10, 2010 at 5:49 AM, Max Ross (Google) maxr+appeng...@google.com maxr%2bappeng...@google.com wrote: JDO Sequences work, we just haven't publicized them. The DataNucleus docs should tell you everything you need to know: http://www.datanucleus.org/products/accessplatform/jdo/sequences.html IdGeneratorStrategy.INCREMENT is not yet implemented. What are you looking to use it for? Max On Mon, Feb 8, 2010 at 3:20 AM, Vincent TELLIER tellier.vinc...@gmail.com wrote: I tried the incrementation, but I got an error saying that it was not implemented in the appengine datastore. TELLIER Vincent + Email : cont...@tellier-vincent.eu + Contact messenger (msn) : abs...@esugenus.fr 2010/2/8 aswath satrasala aswath.satras...@gmail.com See if the following annotation help you. @Persistent(valueStrategy = IdGeneratorStrategy.INCREMENT) -Aswath On Mon, Feb 8, 2010 at 1:18 AM, datanucleus andy_jeffer...@yahoo.comwrote: What getNextID feature on JDO ? i.e please make reference to the JDO API and which particular API Method you're referring to -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@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] How to clear logs?
Thanks for your help ^ ^ My GAE Application has too mush logs! But I don't know how to clear the logs! -- 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-j...@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] Error; Transaction is not active.
First it 's work ok! but after tx.commit() the transaction is complete,so you must call tx.begin() to start a transaction before tx.commit()! Or invoke the tx.commit out of the while block! I'm sorray for my English! 2010/2/10 Acerezo acerezoguil...@gmail.com Hello all, I can´t delete records of a table I'm using this code: PersistenceManager pm = PersistenceManagerHelper.getPersistenceManager(); Transaction tx = pm.currentTransaction(); tx.begin(); Extent ex = pm.getExtent(Robot.class, true); Iterator iter = ex.iterator(); while (iter.hasNext()) { Robot obj = (Robot)iter.next(); pm.deletePersistent(obj); tx.commit(); } And always delete only two records after I get this message in the log: Transaction is not active. You either need to define a transaction around this, or run your PersistenceManagerFactory with 'NontransactionalRead' and 'NontransactionalWrite' set to 'true' Anyone can help me, please? 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-j...@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] How to clear logs?
I've the same problem that you and looking in the documentation of google, I read that the logs can't be deleted. 2010/2/10 时空之蕊 skzr@gmail.com: Thanks for your help ^ ^ My GAE Application has too mush logs! But I don't know how to clear the logs! -- 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-j...@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-j...@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] Error; Transaction is not active.
Yes! 2010/2/10 Andrés Cerezo acerezoguil...@gmail.com I don´t understand very well I think you are telling me: Transaction tx = pm.currentTransaction(); // tx.begin(); old Extent ex = pm.getExtent(Robot.class, true); Iterator iter = ex.iterator(); while (iter.hasNext()) { tx.begin(); // new Robot obj = (Robot)iter.next(); pm.deletePersistent(obj); tx.commit(); } isn´t? 2010/2/10 杨浩 skzr@gmail.com: First it 's work ok! but after tx.commit() the transaction is complete,so you must call tx.begin() to start a transaction before tx.commit()! Or invoke the tx.commit out of the while block! I'm sorray for my English! 2010/2/10 Acerezo acerezoguil...@gmail.com Hello all, I can´t delete records of a table I'm using this code: PersistenceManager pm = PersistenceManagerHelper.getPersistenceManager(); Transaction tx = pm.currentTransaction(); tx.begin(); Extent ex = pm.getExtent(Robot.class, true); Iterator iter = ex.iterator(); while (iter.hasNext()) { Robot obj = (Robot)iter.next(); pm.deletePersistent(obj); tx.commit(); } And always delete only two records after I get this message in the log: Transaction is not active. You either need to define a transaction around this, or run your PersistenceManagerFactory with 'NontransactionalRead' and 'NontransactionalWrite' set to 'true' Anyone can help me, please? 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@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] How to clear logs?
Now,there is not found the document about the logs! Thanks Andrés Cerezo! My solustion: deploy another version as the default, and del the old version! so the logs may be clear all! 2010/2/10 Andrés Cerezo acerezoguil...@gmail.com I've the same problem that you and looking in the documentation of google, I read that the logs can't be deleted. -- 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-j...@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.