[appengine-java] Need a better way to set up my JDO entities
Hello, I'm trying to retrieve race results from a couple of JDO entities but the time taken seems too long. Given an event I want to display the rider's name and number along with their results from the event. The main objects involved: RaceHistory: id, riderID, eventID, grade (for the race), time, place, points Rider: id, name, grade, number, rhPlace, rhTime, rhPlace, rhPoints I send an event id to a method that queries RaceHistory getting all the records matching the event id. Then for each RaceHistory record I lookup the Rider and set the Rider fields (rhGrade, rhTime, rhPlace, rhPoints) from the RaceHistory record. These Rider objects get added to the result ListRider object which gets returned. The time taken to do the RaceHistory query is about 1s. The time to find and update the Rider records is about 6s. The total number of records in the RaceHistory entity is 47387. The query returns 94 records The total number of records in the Rider entity is 1365. Can some recommend a better approach that I may take? (The website is http://actvc.appspot.com/) Thanks Stephen -- 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: Blob Store service createUploadUrl() and a Dispatcher Servlet
Yes that is what the problem is. The getRequestURI() and or the getPathInfo() method are set to /ah/upload*. I am sorry for the confusion. On Apr 20, 12:33 pm, Don Schwarz schwa...@google.com wrote: I'm confused. What success path is being called? In the example web.xml file you attached to the bug, you don't have a servlet mapped to /uploadComplete so invoking of your DispatcherServlet after the upload occurs is exactly what I would expect. Is the problem that once inside your DispatcherServlet, getPathInfo() and/or getRequestURI() are set to /_ah/upload/* rather than /uploadComplete? If so, that sounds like a bug and I can investigate it. On Wed, Apr 14, 2010 at 7:08 PM, Rahul Ravikumar tikura...@gmail.comwrote: On further investigation, the blobstore service actually gets called and the upload takes place. However the right success path does not seem to get called. When i log into the admin console on DevAppServer, i can see the Datastore entities of kind __BlobStore__. The same code works correctly on the App Engine environment. On Apr 14, 4:58 pm, Rahul Ravikumar tikura...@gmail.com wrote: I have verified that this does not happen on the Google App Engine environment. Blobstore service works as expected. The problem only seems to occur in the DevAppServer. Is there a servlet that i can map to _ah/upload/* as a workaround on the DevAppServer ? Any other suggestions? On Apr 13, 6:05 pm, Rahul Ravikumar tikura...@gmail.com wrote: I am seeing the problem on DevAppServer. On Apr 13, 3:08 pm, Don Schwarz schwa...@google.com wrote: Are you seeing this problem in the DevAppServer or when deployed to our servers? (Or both?) On Tue, Apr 13, 2010 at 4:27 PM, Rahul Ravikumar tikura...@gmail.com wrote: Are there any workarounds for this issue? On Apr 12, 7:48 pm, Rahul Ravikumar tikura...@gmail.com wrote: I am using DevAppServer - I have filed an issue : http://code.google.com/p/googleappengine/issues/detail?id=3083 You can reproduce the problem using a dispatch servlet and the blobstore service together. The blobstore service does not seem to handle upload in such cases. Thanks, Rahul On Apr 12, 7:21 pm, Don Schwarz schwa...@google.com wrote: It should always dispatch to the more specific URL pattern, which in this case will be the upload servlet. Are you seeing this behavior in the DevAppServer or when deployed to our servers? Can you file an issue in the issue tracker with an appengine-web.xml and web.xml for a reproducible test case? Thanks, Don On Mon, Apr 12, 2010 at 9:14 PM, Rahul Ravikumar tikura...@gmail.com wrote: I have a central dispatcher servlet that has a servlet mapping of : servlet-mapping servlet-namedispatcher/servlet-name url-pattern//url-pattern /servlet-mapping When i try to use the blob store service'screateUploadUrl(/ uploadComplete) it maps to a URL for e.g '/_ah/upload/ agp0d2VldG15cGljchsLEhVfX0Jsb2JVcGxvYWRTZXNzaW9uX18YEgw'. Before the Blob store service can handle the upload and redirect to / uploadComplete; my dispatcher gets called and i am therefore not being able to upload anything. Is there a servlet/ filter that i can map to /_ah/upload/* in my web.xml ? How do i avoid the dispatcher servlet from getting called before the Blob store service can do its thing? -- 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 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.comgoogle-appengine-java%2bunsubscr...@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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at
[appengine-java] Datastore cursor return value question - CursorHelper.getCursor(List?)
Hello app engine team, I'd like to have a search form, which allows user to search next if more result available by using a Cursor. My issue is, in the last chunk, I am not able to detect if it's. Therefore, I will need to execute one additional query to test if more data. Can you please advise if other approach, without using the 2nd query. Thanks. By document, CursorHelper.getCursor(List?) will return a Cursor which points to the last element in the list. The code is below (correct according to doc) import com.google.appengine.api.datastore.Cursor; EntityManager em = ... Query query = em.createQuery(queryString); query.setMaxResults(20); em.getTransaction().begin(); ListTestEntity testEntities = query.getResultList(); Cursor cursor = JPACursorHelper.getCursor(testEntities); em.getTransaction().rollback(); Then I will need to invoke one more call later, to check a null cursor returned indicates no more data available query.setMaxResults(1); query.setHint(JPACursorHelper.CURSOR_HINT, cursor); em.getTransaction().begin(); ListTestEntity testEntities = query.getResultList(); Cursor cursor = JPACursorHelper.getCursor(testEntities); em.getTransaction().rollback(); By curiosity (please correct me if I'm wrong), I looked into org.datanucleus.store.appengine.query and found that StreamingQueryResult returned by DatastoreQuery, which was in fact constructed from com.google.appengine.api.datastore.QueryResultList. The document say return a cursor that points to the result immediately after the last one in this list. http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/QueryResultList.html#getCursor() So I wonder if CursorHelper.getCursor(List?) can have something similar? Thank you. -- 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] WARNING: This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take long
Hey, I started seeing when a task queue starts now: WARNING: 200 OK This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application. instead of this WARNING: 500 Request was aborted after waiting too long to attempt to service your request. Most likely, this indicates that you have reached your simultaneous dynamic request limit. This is almost always due to excessively high latency in your app. Please see http://code.google.com/appengine/docs/quotas.html for more details. I like it. Is this the expected behavior from now on? Tristan -- 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] LocalDatastoreTest Error
Hi, I am trying to unit testing. I copied the sample code on the site as is, but I get the error below. Here is the unit test code import com.google.appengine.api.datastore.DatastoreService; import com.google.appengine.api.datastore.DatastoreServiceFactory; import com.google.appengine.api.datastore.Entity; import com.google.appengine.api.datastore.Query; import com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig; import com.google.appengine.tools.development.testing.LocalServiceTestHelper; import org.junit.After; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; public class LocalDatastoreTest { private final LocalServiceTestHelper helper = new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig()); @Before public void setUp() { helper.setUp(); } @After public void tearDown() { helper.tearDown(); } // run this test twice to prove we're not leaking any state across tests private void doTest() { DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); assertEquals(0, ds.prepare(new Query(yam)).countEntities()); ds.put(new Entity(yam)); ds.put(new Entity(yam)); assertEquals(2, ds.prepare(new Query(yam)).countEntities()); } @Test public void testInsert1() { doTest(); } @Test public void testInsert2() { doTest(); } } Here is the error com.google.apphosting.api.ApiProxy$CallNotFoundException: The API package 'datastore_v3' or call 'Count()' was not found. at com.google.appengine.tools.development.ApiProxyLocalImpl.makeSyncCall(ApiProxyLocalImpl.java: 109) at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:83) at com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(DatastoreApiHelper.java: 52) at com.google.appengine.api.datastore.DatastoreServiceImpl $PreparedQueryImpl.countEntities(DatastoreServiceImpl.java:379) at com.chinua.Test.demo.LocalDatastoreTest.doTest(LocalDatastoreTest.java: 34) at com.chinua.Test.demo.LocalDatastoreTest.testInsert1(LocalDatastoreTest.java: 46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod $1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java: 15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java: 41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java: 20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java: 28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java: 31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java: 76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java: 50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java: 46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java: 38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java: 467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java: 683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java: 390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java: 197) java.lang.NoClassDefFoundError: com/google/appengine/api/datastore/dev/ LocalDatastoreService at com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig.tearDown(LocalDatastoreServiceTestConfig.java: 121) at com.google.appengine.tools.development.testing.LocalServiceTestHelper.tearDown(LocalServiceTestHelper.java: 201) at com.chinua.Test.demo.LocalDatastoreTest.tearDown(LocalDatastoreTest.java: 27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at
[appengine-java] Re: Need a better way to set up my JDO entities
I would denormalize your model and embed the rider in race history. That way there is no separate lookup and your query returns in 1s. You're doing the relational datastore technique of calculating on reads instead of the non-relational technique of preparing your data on the writes. On Apr 21, 3:57 am, novarse stephenmwi...@gmail.com wrote: Hello, I'm trying to retrieve race results from a couple of JDO entities but the time taken seems too long. Given an event I want to display the rider's name and number along with their results from the event. The main objects involved: RaceHistory: id, riderID, eventID, grade (for the race), time, place, points Rider: id, name, grade, number, rhPlace, rhTime, rhPlace, rhPoints I send an event id to a method that queries RaceHistory getting all the records matching the event id. Then for each RaceHistory record I lookup the Rider and set the Rider fields (rhGrade, rhTime, rhPlace, rhPoints) from the RaceHistory record. These Rider objects get added to the result ListRider object which gets returned. The time taken to do the RaceHistory query is about 1s. The time to find and update the Rider records is about 6s. The total number of records in the RaceHistory entity is 47387. The query returns 94 records The total number of records in the Rider entity is 1365. Can some recommend a better approach that I may take? (The website ishttp://actvc.appspot.com/) Thanks Stephen -- 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.
Re: [appengine-java] open source pdf engine for GAE
for what it's worth ... I've written a small blog entry detailing the different approaches to PDF generation with GAE ... http://conorjpower.com/2010/01/11/pdf-generation-in-java/ we used pdfmyurl.com in the end, which was the least amount of additional implementation work for us ... On Sun, Apr 18, 2010 at 4:55 PM, jeno jeno...@gmail.com wrote: Hi Guys, Anyone know open source java pdf engine for GAE. Thanks Jeno -- 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] Problem Using 'Java SDK for Payflow Pro' with google app engine
Hi, I was trying to use Java SDK for Payflow Pro with google app engine, however I keep on getting this response 'Failed to connect to host Input Server Uri= https://pilot-payflowpro.paypal.com:443'. However if I run the same code as standalone all works fine. Help will be appreciated. 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] Blobstore upload files from CKEditor?
This is my first time to program for Google App Engine for Java. I want to make a CMS and store user uploaded data using Blobstore. I'd like to use CKEditor as web rich text editor in my program. upload configuration example of CKEditoris is: http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_(Uploader)#Other_Resources CKEDITOR.replace( 'editor1', { filebrowserBrowseUrl : '/browser/browse.php', filebrowserUploadUrl : '/uploader/upload.php' }); Uploading a Blob using the Blobstore example is: http://code.google.com/intl/en/appengine/docs/java/blobstore/overview.html body form action=%= blobstoreService.createUploadUrl(/upload) % method=post enctype=multipart/form-data input type=file name=myFile input type=submit value=Submit /form /body I do not know how to do it. Could anyone help me? 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] Error handler for 403 Forbidden error
Hi, all I have an application, that allows only administrator to enter it, but I want to have my own error message for other users, Here is web.xml listing: --- security-constraint web-resource-collection url-pattern//url-pattern /web-resource-collection auth-constraint role-nameadmin/role-name /auth-constraint /security-constraint security-constraint web-resource-collection url-pattern/403.jsp/url-pattern /web-resource-collection auth-constraint role-name*/role-name /auth-constraint /security-constraint error-page error-code403/error-code location/403.jsp/location /error-page --- and 403.jsp is in root folder The problem is that my page is not shown, it always shows default forbidden page. And next interesting thing is, for example , if I change location of my 403.jsp in error handling block (for exmaple I will name it 4031.jsp) and I don't have this file- when 403 error occures I get 404 errir (cannot find file 4031.jsp). Can anyone help me with this issue? -- 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 get GB2312 encoding query parameters?
Hi, all I have encountered a problem in getting gb2312 encoded query parameters. the situation is discribed below: the url is : http://localhost:/test2?item_name=%D6%D0%B9%FA test2 is a simple servlet: protected void doGet(HttpServletRequest request, HttpServletResponse resp) throws ServletException,IOException { String itemName = request.getParameter(item_name); System.out.println(itemName); } The paramter item_name is 中国(china). In tomcat I can get the parameter by using the following code: new String(request.getParameter(item_name).getBytes(ISO-8859-1), GB2312); But in GAE, I have tried many ways to get the right parameter value. but all failed. Is there any configuration in GAE? If someone get it. please let me know! best regards. -- 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] where is a secure place to put Java keystore for authentication?
Hey, I stuck the keystore under an admin only directory but that's not working because normal users can't use the google data apis. Where is a secure place to put the keystore? Tristan -- 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] Debugging stopped working after updating GAE to 3.1.0 and higher
Hey Ulrik, Ok, let's make sure a few other things are set properly: - Is the JRE used by the old web app's launch configuration the same as the new app's launch configuration? (Run Debug Configurations, click on the app on the left, then JRE tab) - Is your old web app redirecting in such a way that the ?gwt.codesvr= 127.0.0.1:9997 would get dropped? Basically, for debugging to work, that parameter must always exist as you traverse through your web app (so it must be preserved as you click on links, etc.) - Where is your breakpoint set? If it's in an anonymous inner class, there are generally issues with those getting dropped sometimes. Could you try one in onModuleLoad? - And just to make sure, the old web app is being launched via Debug As or the Debug Configurations (instead of Run As or Run Configurations)? jason On Mon, Apr 19, 2010 at 6:13 PM, Ulrik Sorber ulrik@gmail.com wrote: Jason: This is my URL: http://127.0.0.1:/MyPage.html?gwt.codesvr=127.0.0.1:9997http://127.0.0.1:/vehicles.html?gwt.codesvr=127.0.0.1:9997 http://127.0.0.1:/vehicles.html?gwt.codesvr=127.0.0.1:9997The page runs fine in debug mode, except it doesn't stop at any of my breakpoints. Hence no debugging :( I have tried to compare my project with a newly created (debuggable) project, but i cant find any discrepancies. But the must be a reason why my older projects wont debug. Just cant figure out what it is. Thanks On Mon, Apr 19, 2010 at 7:53 PM, Jason Parekh jasonpar...@gmail.comwrote: Which URL are you opening from your browser? It should have the ?gwt.codesvr=127.0.0.1:9997 (perhaps with a different value) at the end of it, is that the case? jason On Sat, Apr 17, 2010 at 10:14 AM, GAE_User ulrik@gmail.com wrote: Since GAE changed debugging from the stand alone test browser to using browser plugins i have not been able to debug my old projects. The project runs fine, but are just not able to debug. When creating new projects, debugging does works. Eclipse takes focus when the program cursor hits a breakpoint and debugging works as usual. How do i make my old projects debuggable again? PS. GWT version: 2.0.3 GAE version: 1.3.2 Eclipse version: Galileo 3.5 Web browser: Chrome + GWT Developer Plugin - Version: 1.0.7263 I have updated my VM arguments to: -javaagent:MyLocalPath\eclipse\plugins \com.google.appengine.eclipse.sdkbundle. 1.3.1_1.3.1.v201002101412\appengine-java-sdk-1.3.1\lib\agent\appengine- agent.jar -- 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: where is a secure place to put Java keystore for authentication?
I store keystores in WEB-INF/classes--it is not accessible to public and is accessible context.getRealPath(WEB-INF/classes/keystore) On Apr 21, 4:43 pm, Tristan tristan.slomin...@gmail.com wrote: Hey, I stuck the keystore under an admin only directory but that's not working because normal users can't use the google data apis. Where is a secure place to put the keystore? Tristan -- 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] Amazon Web Services SDK on GAE/Java?
Hello, the AWS SDK for Java (http://aws.amazon.com/sdkforjava/) uses the Apache Commons HTTP library which is not compatible with GAE/Java. (Apache HTTPClient, listed on http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine, is a different library). Maybe it is possible to replace the HttpClient class in the AWS SDK with a new implementation which uses the GAE URLFetch service? If somebody is faster, or code is somewhere on the web already, or if there are other problems which will make it too complicated, please share your knowledge ;-) Cheers, -- Michael Justin SCJP, SCJA betasoft - Software for Delphi™ and for the Java™ platform http://www.mikejustin.com - http://www.betabeans.de -- 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] Amazon Web Services SDK on GAE/Java?
Take a look at this: http://alan.blog-city.com/simpledb_sqs_java.htm It is 2 classes to access Amazon's SImpleDB and SQS services. I have experimented with this on Android. I don't see a reason it should not work in GAE/J. If you want other Amazon services, these classes can serve as a good starting point. Carmen -- Carmen http://www.twitter.com/CarmenDelessio http://www.talkingandroid.com http://www.facebook.com/BFFPhoto http://www.twitter.com/DroidDrop On Wed, Apr 21, 2010 at 12:22 PM, mjustin michael.jus...@gmx.net wrote: Hello, the AWS SDK for Java (http://aws.amazon.com/sdkforjava/) uses the Apache Commons HTTP library which is not compatible with GAE/Java. (Apache HTTPClient, listed on http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine , is a different library). Maybe it is possible to replace the HttpClient class in the AWS SDK with a new implementation which uses the GAE URLFetch service? If somebody is faster, or code is somewhere on the web already, or if there are other problems which will make it too complicated, please share your knowledge ;-) Cheers, -- Michael Justin SCJP, SCJA betasoft - Software for Delphi™ and for the Java™ platform http://www.mikejustin.com - http://www.betabeans.de -- 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: Amazon Web Services SDK on GAE/Java?
Hi Carmen, thank you for your answer! This library needs to be rewritten too - it uses HTTP connection classes which are not supported in GAE/Java. So actually it is the same at the moment, if there are no other hidden surprises on the road. 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.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: How to exclude the optional jars for deployment?
No problem :) Hm, I think that if you had chosen to set the This project has a war directory setting, and set it to src/main/webapp, this error could have gone away. Yup, I discovered that eventually - it was all about the ordering. I think the best solution here would either give a more specific step-by- step process for GAE users (since the current correct path is to follow the instructions for non-Java EE Eclipse users) and/or have the error message that pops up give a hint about setting the WAR directory. I think for runtime, they are referring to the server on which your application will run. The best thing was indeed to select none, because App Engine's server is not one of the choices. The default configuration is a good choice too, unless you want to add other stuff, like Web Services, JSF, etc.. We should improve the doc in our FAQ. I'm a cog in a slightly larger programming machine. So, when it comes to Eclipse, I know just enough to get my applications running and then I spend all my time in the Java trenches. I know it's not Google's job to write FAQs for Eclipse, but you did such a great job with the other steps (in description) that it would be nice to have explanations here. As you say, the default worked, but you suggest adding other stuff like Web Services and JSF which, I'll admit, I know nothing about those words other than I see them a lot on these forums :) The GAE documentation frequently points people to other places where they can learn about non-GAE technologies - I hope that you do it here, too :) Looks like we need to have some sort of break-out in the FAQ for those users that are working with App Engine-only projects. Yes, please, if only to point to the correct help documents elsewhere. Again, by a hint from someone else in another forum, I followed the steps for non-Java EE Eclipse users (even though I use the Eclipse Java EE version). Couldn't you have gone back to Use Specific SDK, and chosen the one listed on your build path (instead of having to use one of the SDKs that are installed with the plugin)? I apologize...I have since had to wipe this test project (and the Eclipse installation) for completely unrelated reasons, so I can't reproduce anything at the moment - though I still have the pom.xml. From memory, though, I believe changing the option in the Google menus did not change the SDK that was listed in the Eclipse build path. Can you elaborate on the pom.xml-related problem? Was this GPE reporting an error, or the Maven plugin? Again, from memory, the errors were symptomatic of missing Jar files during compile time and/or duplicate Jar files - GPE was not reporting any errors at this point. I'm not sure what the best solution is when mixing maven with the plugin (and I'm certainly not the best person to ask about it). However, it seems that if someone is dead set on using maven, then perhaps all jar files should be loaded via maven and the GPE could generate a pom.xml with the necessary base files. How did you end up fixing the problem? Was geronimo_jpa missing from the pom.xml? Yes, I put geronimo_jpa back in my pom.xml, which I think is strange since it was listed on the build path along with the other dozen+ GAE jars. This goes back to my previous comment. This is interesting (that it was working fine without GPE). It must be some sort of difference in your classpath in GPE vs. not in GPE. Can you tell me what: 1) Your build classpath looks like? 2) What files you have in your WEB-INF/lib folder? I did not put anything directly in my WEB-INF/lib folder - it was either dragged in by GPE or in my pom.xml. I've pasted snippets of my pom.xml below. I didn't do any modifications to my classpath other than to bring in the correct GAE SDK (which hadn't been done automatically via switching SDKs in the GPE menu). The refreshing of the target folder - was this something that you had to do manually? I guess you're saying that this is something we should doc after the mvn package step? Yup. Eclipse is really bad about refreshing folders in the Project Explorer. In my mind, I was going down the really bad path of believing that I would end up running this out of Eclipse's WTP folders (e.g. /Users/jacobbrookover/Documents/ workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/ wtpwebapps/app-id). That was a stupid mistake and ignored the instructions in the FAQ, but perhaps something as simple as On first run, choose the folder that looks like /target/app-id. It may not show up in Eclipse right away, so refresh your folders. In fact, you could even give a brief explanation of what the 'mvn package' step does. I know now how that plays out with GAE, but only because I learned it when trying to get maven to work with GAE before GPE 1.3. Feel free to peg me with any more questions. I may have time to re- create this all again tomorrow, if necessary. And, of course, any hints about the SAX Parser issue would
Re: [appengine-java] Problem Using 'Java SDK for Payflow Pro' with google app engine
Can you remove the port? Port 443 is understood if you are using the HTTPS protocol. On Wed, Apr 21, 2010 at 2:28 AM, Daud daud.a...@gmail.com wrote: Hi, I was trying to use Java SDK for Payflow Pro with google app engine, however I keep on getting this response 'Failed to connect to host Input Server Uri= https://pilot-payflowpro.paypal.com:443'. However if I run the same code as standalone all works fine. Help will be appreciated. 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. -- Ikai Lan Developer Relations, Google App Engine Twitter: http://twitter.com/ikai Delicious: http://delicious.com/ikailan Google App Engine links: Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- 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: How to exclude the optional jars for deployment?
Forgot to post the relevant pom.xml bits: dependencies !-- Insert Many Workspace Dependencies Here -- dependency groupIdcom.googlecode.objectify/groupId artifactIdobjectify/artifactId version2.1/version /dependency dependency groupIdnet.sf.saxon/groupId artifactIdsaxon/artifactId version9.1.0.8/version /dependency dependency groupIdnet.sf.saxon/groupId artifactIdsaxon-dom/artifactId version9.1.0.8/version /dependency dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version2.5/version typejar/type scopeprovided/scope /dependency dependency groupIdorg.apache.geronimo.specs/groupId artifactIdgeronimo-jpa_3.0_spec/artifactId version1.1.1/version typejar/type scopecompile/scope /dependency dependency groupIdnet.sf.jsr107cache/groupId artifactIdjsr107cache/artifactId version1.1/version typejar/type scopecompile/scope /dependency /dependencies build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId configuration warSourceDirectory${basedir}/src/main/webapp/warSourceDirectory /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId version2.1/version configuration compilerVersion1.6/compilerVersion source${jdk.version.source}/source target${jdk.version.target}/target /configuration /plugin /plugins /build On Apr 21, 1:54 pm, Jake jbrooko...@cast.org wrote: No problem :) Hm, I think that if you had chosen to set the This project has a war directory setting, and set it to src/main/webapp, this error could have gone away. Yup, I discovered that eventually - it was all about the ordering. I think the best solution here would either give a more specific step-by- step process for GAE users (since the current correct path is to follow the instructions for non-Java EE Eclipse users) and/or have the error message that pops up give a hint about setting the WAR directory. I think for runtime, they are referring to the server on which your application will run. The best thing was indeed to select none, because App Engine's server is not one of the choices. The default configuration is a good choice too, unless you want to add other stuff, like Web Services, JSF, etc.. We should improve the doc in our FAQ. I'm a cog in a slightly larger programming machine. So, when it comes to Eclipse, I know just enough to get my applications running and then I spend all my time in the Java trenches. I know it's not Google's job to write FAQs for Eclipse, but you did such a great job with the other steps (in description) that it would be nice to have explanations here. As you say, the default worked, but you suggest adding other stuff like Web Services and JSF which, I'll admit, I know nothing about those words other than I see them a lot on these forums :) The GAE documentation frequently points people to other places where they can learn about non-GAE technologies - I hope that you do it here, too :) Looks like we need to have some sort of break-out in the FAQ for those users that are working with App Engine-only projects. Yes, please, if only to point to the correct help documents elsewhere. Again, by a hint from someone else in another forum, I followed the steps for non-Java EE Eclipse users (even though I use the Eclipse Java EE version). Couldn't you have gone back to Use Specific SDK, and chosen the one listed on your build path (instead of having to use one of the SDKs that are installed with the plugin)? I apologize...I have since had to wipe this test project (and the Eclipse installation) for completely unrelated reasons, so I can't reproduce anything at the moment - though I still have the pom.xml. From memory, though, I believe changing the option in the Google menus did not change the SDK that was listed in the Eclipse build path. Can you elaborate on the pom.xml-related problem? Was this GPE reporting an error, or the Maven plugin? Again, from memory, the errors were symptomatic of missing Jar files during compile time and/or duplicate Jar files - GPE was not reporting any errors at this point. I'm not sure what the best solution is when mixing maven with the plugin (and I'm certainly not the best person to ask about it). However, it seems that if someone is dead set on using maven, then perhaps all jar files should be loaded via maven and the GPE could generate a pom.xml with the necessary base files. How did you end up fixing the problem? Was geronimo_jpa missing from the pom.xml? Yes, I put geronimo_jpa back in my pom.xml, which I think is strange since it was listed on the build path along with the other dozen+ GAE jars. This goes back to my previous comment. This is
Re: [appengine-java] What is the best way to store child object?
Hi Andrey, I'll try to answer your questions inline. First off, I'm using these docs as reference: http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/KeyFactory.Builder.html http://code.google.com/appengine/docs/java/datastore/transactions.html It works. But there are couple things which bother me. First at all, there is some extra job here. I actually don't need instance of parent class (MyList). I have the parent key. Theoretically speaking, it is the only thing needed to maintain parent child relationship. MyList class may have more fields I don't need at all. So, I'd like to avoid reading them to memory. You can do this with KeyFactory.Builder. Build a Key using the parent and child Keys, then query using this Key. You can also use an ancestor query to find multiple child items. Second concern is about line myList.items.add(item); what if MyList already has million of items? How efficient is add operation in this case. It's O(Linear) in memory, but as far as saving goes, adding a new child element is a single row write + index writes. It's not dependent on the number of items you already have. We have a series of articles describing here: http://code.google.com/appengine/articles/datastore/overview.html Any thoughts? Is it possible to store child object using parent key only? Yep. Use KeyFactory.Builder to build and set a Key. Thank you, Andrey -- 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 Relations, Google App Engine Twitter: http://twitter.com/ikai Delicious: http://delicious.com/ikailan Google App Engine links: Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- 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] WARNING: This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take
Yep, we're rolling this out slowly with the 1.3.3 release to let developers know that some requests are slow because they are startup requests. On Wed, Apr 21, 2010 at 6:09 AM, Tristan tristan.slomin...@gmail.comwrote: Hey, I started seeing when a task queue starts now: WARNING: 200 OK This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application. instead of this WARNING: 500 Request was aborted after waiting too long to attempt to service your request. Most likely, this indicates that you have reached your simultaneous dynamic request limit. This is almost always due to excessively high latency in your app. Please see http://code.google.com/appengine/docs/quotas.html for more details. I like it. Is this the expected behavior from now on? Tristan -- 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 Relations, Google App Engine Twitter: http://twitter.com/ikai Delicious: http://delicious.com/ikailan Google App Engine links: Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- 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: WARNING: This request caused a new process to be
You're not the only on experiencing this. Please star http://code.google.com/p/googleappengine/issues/detail?id=2396 On Apr 21, 9:09 am, Tristan tristan.slomin...@gmail.com wrote: Hey, I started seeing when a task queue starts now: WARNING: 200 OK This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application. instead of this WARNING: 500 Request was aborted after waiting too long to attempt to service your request. Most likely, this indicates that you have reached your simultaneous dynamic request limit. This is almost always due to excessively high latency in your app. Please seehttp://code.google.com/appengine/docs/quotas.htmlfor more details. I like it. Is this the expected behavior from now on? Tristan -- 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.
Re: [appengine-java] Using DataNucleus JPA - Online Quizzes Database Design
My second thought after posting previous message is to modify schema of ScoreBoar and make it a real scoreboard. Old: ScoreBoard(scoreboard_id as primary key, quizz_id as foreign key to Quizzes, 100, 90, 80, 70,60,50,40,30,20,10,0). New: ScoreBoard( identity id, quizz_id, foreign key to quizzes, user_id, foreign key to User user_score ) Table ScoreBoard has one-to-one to both table User and Quizzes. New schema would allow to post absolute value for each user and also it's easy to calculate percentage of other user's result below or above the current user's with sorting on user_score. right? On Wed, Apr 21, 2010 at 2:38 PM, bobo david.bo...@gmail.com wrote: Hi After leaning JPA tutorial with Getting Started tutorial, I would like to try creating my own web application called on-line quizzes with Google Engine. This application would provide users quizzes with uncertain number of questions for each quizz. And it displays the result a user plays, as well as tells the rank of the result among participants and percentage of performers below the result the user receives. If a user desires, the application would be able to tell the historic records of quizzes the user played in the past. I am stuck on how to design and flat tables for this application. Below is what I tried and feel the design is a bit of awkward and it may not fit into tasks the application would perfom: 1. User table(user_id, first_name, last_name) 2. Quizzes tables(quizz_id, quizz_name) User and Quizzes tables has many-to-many relationship. Each user has a number of quizzes and each quizz can have a number of users 3. Join or associate table User_Quizzes(user_id, quizz_id). Both ids are from User and Quizz table as a foregn key to its source table, and both as a composite primay key for this join table. 4. Record table(record_id, score, qizz_id, user_id). It has one-to- many relationship between User and Record table. Foreign key in Record table is a user_id. So we can retrieve historic records for a particular user; 5. ScoreBoard table, this is where I am confused and not confident. Each quizz will store distribution of users with different level of scores for a particular quizz, let's say 10 as an interval for score level and then it can tell percentage of users played above or below to this user. So it's one-to-one relationship between each quizz and its corresponding scoreboard. ScoreBoard(scoreboard_id as primary key, quizz_id as foreign key to Quizzes, 100, 90, 80, 70,60,50,40,30,20,10,0). If a user plays a quizz with 15 questions and have 11 correct, it's 73% correct for that quizz. I will update the column of 70 with whatever value there increased by 1. At this time, the total percent of peope below this user is: sum( values in column 60, 50, 40, ,0)/ total number of users participated in the quizz. With this database design above, firstly the application is not able to give the rank of absolute scores with the user's result(but can give a level rank). Should I create another table; Second, I am not sure if the design can eventually fit into DataNucleus JPA implementation. Do you have a better idea or experiences to make this type of database work? My question may look dumb to you but please shed me a light...thanks! Hope this question is not too boring to you. -- 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] Datastore size growing one way
I have the datastore growing in only one way up... The datastore size shows the size of all entities as 116 MB... However, the total stored data shows up as 40% of 1GB.. The data that are being deleted are not reflected in the total stored data size. I had around 8 indexes, deleted 4 indexes using vacuum_indexes of python appcfg utility. However, the total stored data still shows up as 40%.. Please advice what should be done to have the datastore quota reflect the actual size? -- 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] Sending multi-part email from Googl e App Engine using Spring’s JavaMailSender
I've got a problem with sending Multi-Part email using Spring's JavaMailSender. It works fine without the multi-part (modified from the example in Spring documentation): final MimeMessagePreparator preparator = new MimeMessagePreparator() { public void prepare(final MimeMessage mimeMessage) throws Exception { final MimeMessageHelper message = new MimeMessageHelper( mimeMessage); message.setTo(toAddress); message.setFrom(fromAddress); message.setSubject(subject); final String htmlText = FreeMarkerTemplateUtils .processTemplateIntoString(configuration .getTemplate(htmlTemplate), model); message.setText(htmlText, true); } }; mailSender.send(preparator); But once I change it to: final MimeMessagePreparator preparator = new MimeMessagePreparator() { public void prepare(final MimeMessage mimeMessage) throws Exception { final MimeMessageHelper message = new MimeMessageHelper( mimeMessage, true); ... message.setText(plainText, htmlText); } }; mailSender.send(preparator); I get: Failed message 1: javax.mail.MessagingException: Converting attachment data failed at com.google.appengine.api.mail.stdimpl.GMTransport.sendMessage(GMTransport.java:231) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:402) ... This is especially difficult since the GMTransport is proprietary Google class and no source is available, which makes it pretty difficult to debug. Anyone have any ideas what to try next? My bean config, for helping you to help me: bean id=mailSender class=org.springframework.mail.javamail.JavaMailSenderImpl p:username=${mail.username} p:password=${mail.password} p:protocol=gm / The question is also asked at Stack Overflow: http://stackoverflow.com/questions/2686889/sending-multi-part-email-from-google-app-engine-using-springs-javamailsender-fai Best Regards, Hannu -- 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] Chat Time transcript for April 21, 2010
The high-level summary and complete transcript of the April 7th edition of the IRC office hours is pasted below. Join us in two weeks, Wednesday, May 5th from 7:00-8:00 p.m. PST for the next installment. Note: On the first and third Wednesdays of every month, the App Engine team signs into the #appengine IRC channel on irc.freenode.net for an hour-long chat session. On the first Wednesday, we meet in the channel from 7:00-8:00 p.m. PST (evening hours), and on the third Wednesday, we're available from 9:00-10:00 a.m. PST (morning hours). Please stop by! - Jason --SUMMARY--- - There is a slight error in our webapp framework documentation -- if you're using templates, you should specify the path relative to the location of the controller, not the root directory. We'll address this docs bug shortly. [9:03, 9:05, 9:09] - Discussion on various forthcoming roadmap features (OpenID, OAuth, reserved instances) [9:05, 9:08, 9:11, 9:13, 9:18, 9:38] - Q: What is the best way to estimate the total number of entities for paging display (e.g. 1-10 of 400)? A: Try to avoid using count() queries if possible. You can use a keys-only query to retrieve the keys of all entities that match a specific criteria, and use that, but if you do this, you should cache this count to avoid re-querying in every request. You may also consider estimating or otherwise giving a rough number if the exact count isn't important, similar to Gmail (e.g. 1-20 of hundreds). [9:17, 9:19-9:32] - Discussion on cold startup times for Python and Java applications -- all applications are cycled out after a certain period of time when no requests come in. Startup times are generally better for Python apps since the Python runtime doesn't have to load a JVM and most Python frameworks are smaller than comparable Java frameworks. For now, the only way to ensure that your application remains warm is to have steady traffic (generally more than one request per minute) from actual users, not cron pingers. Reserved instances are on the roadmap which will enable you to pay to keep your application loaded in the absence of traffic. [9:29, 9:34-9:36, 9:38-9:41, 9:43, 9:49-10:04] - Discussion on backwards-traversing cursors [9:43-9:45] --FULL TRANSCRIPT--- [09:02am] apijason_google: Hi Everyone. Welcome to the second IRC office hour session of the month. I and a few others will be in the channel for the next hour to answer any App Engine questions if you've got any, so fire away. [09:03am] perlmonkey2: hmm, the GAE webapp docs say that for template paths, the current dir is the application root directory. but passing in templates/mytemplate.html which is under the MyApp directory isn't working. Is this a bug or am I not Doing It Right? [09:04am] perlmonkey2: oh, office hours. I'll shut up for real questions [09:05am] rsaccon: @apijason_google is there anything you can tell us about forthcoming OpenId / oAuth service, beyond what is on the roadmap ? [09:05am] apijason_google: perlmonkey2: It works for me. This is the template path I set in my own apps: path = os.path.join(os.path.dirname(__file__), 'templates', 'index.html') where templates is the name of the directory at the root level. [09:06am] ikai_google: Hi everybody! [09:06am] apijason_google: rsaccon: What specifically would you like to know? The answer is probably not, although I can assure you that it's coming along. [09:06am] apijason_google: Hi Ikai! [09:08am] prencher: apijason_google: can you tell us anything about the upcoming reserved instances? guessing not, but if so I'd like to know whether we're talking about N hot spares at all times (including while there's load), or a minimum number of instances [09:09am] ikai_google: prencher: We can't give many details right now about any upcoming features. [09:09am] perlmonkey2: hmm, outputted the path. Looks like the docs might be wrong as the path is from the controller not the root path of the application. So if my controllers are in MyApp/lib/controllers, that is the relative path. Not Myapp/ as the docs say. Or am I doing it wrong [09:10am] perlmonkey2: Nevermind me, these are webapp questions. Hate to burn any time on this when there are serious GAE questions. [09:11am] apijason_google: prencher: The details are still being worked out, so nothing I say here is canon. But, to my knowledge, the team has been discussing the second option -- minimum number of instances. Everything is subject to change until release, however. [09:11am] yodler12: How's the pagination blog post coming? Any good pagination libraries yet that you know of based on cursors? Any advice if I'm going to try to write one? [09:11am] ikai_google: perlmonkey2: No, it's totally fair game, though you're generally better asking this in the groups [09:11am] apijason_google: perlmonkey2: Thanks for the pointer. Can you file a docs bug in the issue tracker?
[appengine-java] App Engine SDK 1.3.3 is out!
Hi everyone! I just wanted to let you all know that App Engine 1.3.3 SDK is out. The blogpost is here: http://googleappengine.blogspot.com/2010/04/app-engine-sdk-133-released.html http://googleappengine.blogspot.com/2010/04/app-engine-sdk-133-released.htmlYou can download this from the standard download page: http://code.google.com/appengine/downloads.html http://code.google.com/appengine/downloads.htmlRelease notes: Version 1.3.3 = - Added two new system properties com.google.appengine.application.id and com.google.appengine.application.version - DeadlineExceededException is now always thrown before HardDeadlineExceededError - Decreased likelihood of Too many URLMap deployment errors for complex web apps - Fixed an error where QuotaService.getCpuTimeInMegaCycles() was returning cycles instead of megacycles - Fixed an issue between differing behavior of jsp in the production and development environments http://code.google.com/p/googleappengine/issues/detail?id=3022 - Fixed an issue uploading webapps with .tag files http://code.google.com/p/googleappengine/issues/detail?id=2902 -- Ikai Lan Developer Relations, Google App Engine Twitter: http://twitter.com/ikai Delicious: http://delicious.com/ikailan Google App Engine links: Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- Ikai Lan Developer Relations, Google App Engine http://www.reddit.com/r/appengine Twitter: http://www.reddit.com/r/appenginehttp://twitter.com/ikai Delicious: http://delicious.com/ikailan Google App Engine links: Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine ppengine target=_blankhttp://www.reddit.com/r/appengine -- 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] using an Objectify query filter with IN -- IllegalArgumentException
Looks like you found a bug. I should be able to have a unit test and a fix checked in tonight. Sorry about that! Jeff On Wed, Apr 21, 2010 at 1:43 PM, Larry White ljw1...@gmail.com wrote: Hi, I'm trying to pass in a collection of Strings to be used in a filter using Objectify (which I LOVE, btw). I'm doing it like so: QuerySNote query = ofy.query(SNote.class).filter(id IN, results).limit(limit).offset(offset).order(-timestamp); where the results parameter is a non-empty ArrayListString. I'm getting the exception: 64951 [btpool0-4] ERROR com.deathrayresearch - java.lang.IllegalArgumentException: A collection of values is required. at com.google.appengine.api.datastore.DataTypeUtils.checkSupportedValue(DataTypeUtils.java:153) at com.google.appengine.api.datastore.Query$FilterPredicate.init(Query.java:543) at com.google.appengine.api.datastore.Query.addFilter(Query.java:231) at com.googlecode.objectify.impl.QueryImpl.filter(QueryImpl.java:102) at com.googlecode.objectify.impl.QueryImpl.filter(QueryImpl.java:28) The id parameter contains Strings and I think an ArrayListString qualifies as a collection of values. Can anyone tell me what I'm doing wrong? thanks much Larry -- 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.
[appengine-java] Re: WARNING: This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take
Is it possible to make it an INFO and not a WARNING? Should I start an issue? As a programmer, I really don't have any direct control over this. All the WARNINGS are just masking other important issues that should be warnings. On Apr 21, 1:33 pm, Ikai L (Google) ika...@google.com wrote: Yep, we're rolling this out slowly with the 1.3.3 release to let developers know that some requests are slow because they are startup requests. On Wed, Apr 21, 2010 at 6:09 AM, Tristan tristan.slomin...@gmail.comwrote: Hey, I started seeing when a task queue starts now: WARNING: 200 OK This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application. instead of this WARNING: 500 Request was aborted after waiting too long to attempt to service your request. Most likely, this indicates that you have reached your simultaneous dynamic request limit. This is almost always due to excessively high latency in your app. Please see http://code.google.com/appengine/docs/quotas.htmlfor more details. I like it. Is this the expected behavior from now on? Tristan -- 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 Relations, Google App Engine Twitter:http://twitter.com/ikai Delicious:http://delicious.com/ikailan Google App Engine links: Blog:http://googleappengine.blogspot.com Twitter:http://twitter.com/app_engine Reddit:http://www.reddit.com/r/appengine -- 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.
Re: [appengine-java] using an Objectify query filter with IN -- IllegalArgumentException
Fixed. Although you might prefer to issue a batch get() operation instead of the query. There might be a performance difference - I'm not sure. Jeff On Wed, Apr 21, 2010 at 6:46 PM, Jeff Schnitzer j...@infohazard.org wrote: Looks like you found a bug. I should be able to have a unit test and a fix checked in tonight. Sorry about that! Jeff On Wed, Apr 21, 2010 at 1:43 PM, Larry White ljw1...@gmail.com wrote: Hi, I'm trying to pass in a collection of Strings to be used in a filter using Objectify (which I LOVE, btw). I'm doing it like so: QuerySNote query = ofy.query(SNote.class).filter(id IN, results).limit(limit).offset(offset).order(-timestamp); where the results parameter is a non-empty ArrayListString. I'm getting the exception: 64951 [btpool0-4] ERROR com.deathrayresearch - java.lang.IllegalArgumentException: A collection of values is required. at com.google.appengine.api.datastore.DataTypeUtils.checkSupportedValue(DataTypeUtils.java:153) at com.google.appengine.api.datastore.Query$FilterPredicate.init(Query.java:543) at com.google.appengine.api.datastore.Query.addFilter(Query.java:231) at com.googlecode.objectify.impl.QueryImpl.filter(QueryImpl.java:102) at com.googlecode.objectify.impl.QueryImpl.filter(QueryImpl.java:28) The id parameter contains Strings and I think an ArrayListString qualifies as a collection of values. Can anyone tell me what I'm doing wrong? thanks much Larry -- 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.
[appengine-java] Re: Datastore size growing one way
Thanks Ikai for a prompt response! Its been more than 24hours now and the datstore still shows up as 40% of 1GB usage. Generally, how long does it take to update? Also, in the past even when I delete significant amount of data from datastore, the datastore size never went down. However, the datastore statistics reflected the deletes. Is there anything else that occupies datastore size apart from datastore entities and indexes? If I delete all the indexes, will my datastore size match datastore statistics? On Apr 22, 4:32 am, Ikai L (Google) ika...@google.com wrote: When did you delete the indexes? The dashboard isn't updated in real time. It's updated with background tasks, so may take a bit to update depending on load. On Wed, Apr 21, 2010 at 9:21 AM, vinothkumar vinothkumar4...@gmail.comwrote: I have the datastore growing in only one way up... The datastore size shows the size of all entities as 116 MB... However, the total stored data shows up as 40% of 1GB.. The data that are being deleted are not reflected in the total stored data size. I had around 8 indexes, deleted 4 indexes using vacuum_indexes of python appcfg utility. However, the total stored data still shows up as 40%.. Please advice what should be done to have the datastore quota reflect the actual size? -- 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 Relations, Google App Engine Twitter:http://twitter.com/ikai Delicious:http://delicious.com/ikailan Google App Engine links: Blog:http://googleappengine.blogspot.com Twitter:http://twitter.com/app_engine Reddit:http://www.reddit.com/r/appengine -- 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] Re: Error message after updating AppEngine in my project
Me too have the misstake! It's not effect gae application running!but it's :( ubuntu 9.10 64b,Eclipse 3.5,GAE 1.3.3,jdk1.6.20 -- 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] Query returns more than limit
Hello, I have seen problem with Java, like this: - Fixed a datastore issue where an error was thrown when setting a query offset to more than the number of results throws an error. http://code.google.com/p/googleappengine/issues/detail?id=2875 I send this query: query.filter(:user_id=user.id).sort(:created_at, :desc).each(:limit=3) This query uses composite-index. UserNews user_id ▲ , created_at ▼ I set limit=3, but many (all?) entities are return. It is not always. very very rare case. This code is ruby, but I trace code, I found JavaAPI's PreparedQuery#asIterator(FetchOptions fetchOptions) is used. From application log. Maybe query is retried, by application code. I am using deadline=3.0sec. First query is deadlined, and retryed. Is this known problem? takeru -- 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] Indexes for one field
Can I see how mach space take one-field indexes and every index - for decide about delete some indexes and monitoring for indexes that i don't want create (for example if i forgot add gae.unindexed in JDO or make mistake in 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.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] App Engine SDK 1.3.3 is out!
Well done for the release! By the way: On Thu, Apr 22, 2010 at 00:37, Ikai L (Google) ika...@google.com wrote: [...] - Added two new system properties com.google.appengine.application.id and com.google.appengine.application.version What about a property like com.google.appengine.environment, that could have local or production as values? I know there are some other mechanisms to check that, but that would be interesting to have that convention available. -- Guillaume Laforge Groovy Project Manager Head of Groovy Development at SpringSource http://www.springsource.com/g2one -- 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.