[appengine-java] java.awt.Color is a restricted class
Hi, I am using JSF2.0 on AppEngine. I get the error below when I try to use a colorpicker utility. Is there a work around this error? Cheers CHINUA WARNING: /pages/addtemp.faces java.lang.NoClassDefFoundError: java.awt.Color is a restricted class. Please see the Google App Engine developer's guide for more details. at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java: 51) at org.primefaces.component.colorpicker.ColorPickerRenderer.getConvertedValue(ColorPickerRenderer.java: 179) at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1008) at javax.faces.component.UIInput.validate(UIInput.java:934) at javax.faces.component.UIInput.executeValidate(UIInput.java:1189) at javax.faces.component.UIInput.processValidators(UIInput.java:691) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java: 1080) at javax.faces.component.UIForm.processValidators(UIForm.java:243) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java: 1080) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java: 1080) at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java: 1180) at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java: 76) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java: 118) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1093) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java: 51) 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 com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java: 121) 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.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 139) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:352) 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.content(HttpConnection.java:844) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 396) at org.mortbay.thread.BoundedThreadPool $PoolThread.run(BoundedThreadPool.java:442) -- 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] ANN: Firefox add-on for tracking GAE estimated cost
Hi, I made a Firefox extension that collects estimated cost from App Engine response headers and shows the total in the Firefox status bar. If anyone's interested, the add-on can be downloaded from: http://radomirml.com/2010/04/06/track-appengine-estimated-cost-with-firefox-add-on Radomir -- 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] Using app's ELResolver class
I'm trying to use new EL api - version 2.2. - which knows how to deal with parameterized invocations; e.g. #{FooBarDAO.getInfos('alesj')}. Hence I'm bundling this new EL jars with my app. At runtime I get this java.lang.NoSuchMethodError: javax.el.ELResolver.invoke(Ljavax/el/ ELContext;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Class;[Ljava/ lang/Object;)Ljava/lang/Object; at com.sun.el.parser.AstValue.getValue(AstValue.java:111) at com.sun.el.parser.AstValue.getValue(AstValue.java:163) at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java: 219) at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java: 71) at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java: 71) which lead me to this finding (cl is the ClassLoader of my servlet) Class elc = cl.loadClass("javax.el.ELResolver"); String info = elc.getProtectionDomain().getCodeSource().getLocation().toExternalForm(); System.out.println("info = " + info); // info ==> file:/foobar/appengine-java-sdk-1.3.2/lib/shared/ geronimo-el_1.0_spec-1.0.1.jar This looks wrong per web CL spec, which is children first (or current CL first, then parent CL). Any reason for this? -- 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: Using app's ELResolver class
While this finds the right jar URL url = cl.getResource("META-INF/maven/javax.el/el-api/ pom.properties"); String info = url.toExternalForm(); System.out.println("info = " + info); // jar:file:/foobar/projects/foobar/trunk/server/target/ foobar-server-0.0.1-SNAPSHOT/WEB-INF/lib/el-api-2.2.jar!/META-INF/ maven/javax.el/el-api/pom.properties So we know the resources are there. -- 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: Java Mail Service
Tried the following code MailService ms = MailServiceFactory.getMailService(); MailService.Message msg = new MailService.Message(); msg.setSubject("Tu as réussi cette étape"); ms.sendToAdmins(msg); without more result. The code is executed in the development server (without sending email as specified by the documentation) And do nothing visible in the GAE server. On 2 avr, 18:12, KarthikR wrote: > Hi > > The java API javadoc > athttp://code.google.com/appengine/docs/java/javadoc/com/google/appengi... > provides send() and sendToAdmins() methods, Can you try using > sendToAdmins() ? > > Regards, > KarthikR > > On Apr 1, 7:17 am, moissinac wrote: > > > Hello > > > I have servlet with a code copied from the documentation for sending > > an email with the mail service > > Each time I call the service, I see the trace in the quota count like > > this: > > Mail > > Mail API Calls 0% 0% 5 of 7000 Okay > > Recipients Emailed 0% 0% 5 of 2000 Okay > > Admins Emailed 0% 0% 0 of 5000 Okay > > ... > > The count for Mail API Calls and Recipients Emailed is incremented > > each time > > > My code send an email from the admin of my domain to the admin of my > > admin, but the item Admins Emailed is never incremented > > > The admin of my domain (me) never receive an email by that mean. > > If I send an email with gmail to the same address, it receive the > > email. > > > Advice? help? > > Thank you inadvance -- 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: Java Mail Service
A trace on the code shows me that the line in the previous code > ms.sendToAdmins(msg); fails So, my hypothesis is that a prerequisite is not fulfilled In the code, I use the Low Level API, which doesn't need a specific configuration (I believe it) In the log, I see 2585cpu_ms with a warning saying 'This request used a high amount of CPU and may soon exceed is quota' I don't see where my code use a such amount of CPU On 7 avr, 13:26, moissinac wrote: > Tried the following code > MailService ms = MailServiceFactory.getMailService(); > MailService.Message msg = new MailService.Message(); > msg.setSubject("Tu as réussi cette étape"); > ms.sendToAdmins(msg); > > without more result. > > The code is executed in the development server (without sending email > as specified by the documentation) > And do nothing visible in the GAE server. > > On 2 avr, 18:12, KarthikR wrote: > > > Hi > > > The java API javadoc > > athttp://code.google.com/appengine/docs/java/javadoc/com/google/appengi... > > provides send() and sendToAdmins() methods, Can you try using > > sendToAdmins() ? > > > Regards, > > KarthikR > > > On Apr 1, 7:17 am, moissinac wrote: > > > > Hello > > > > I have servlet with a code copied from the documentation for sending > > > an email with the mail service > > > Each time I call the service, I see the trace in the quota count like > > > this: > > > Mail > > > Mail API Calls 0% 0% 5 of 7000 Okay > > > Recipients Emailed 0% 0% 5 of 2000 Okay > > > Admins Emailed 0% 0% 0 of 5000 Okay > > > ... > > > The count for Mail API Calls and Recipients Emailed is incremented > > > each time > > > > My code send an email from the admin of my domain to the admin of my > > > admin, but the item Admins Emailed is never incremented > > > > The admin of my domain (me) never receive an email by that mean. > > > If I send an email with gmail to the same address, it receive the > > > email. > > > > Advice? help? > > > Thank you inadvance -- 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: A catch-all servlet?
John, thanks so much, this works. I added this as the filter: forwardFilter com.markww.usermaps.server.ForwardFilter target UserMaps.jsp forwardFilter /* test is working here: http://usermaps.appspot.com/ just forwards all urls like: http://usermaps.appspot.com/abc to my gwt jsp project file. Spent a day trying to get this to work, thanks again, Mark On Apr 6, 11:09 pm, John Patterson wrote: > You could create a filter that is mapped to "/*" and does a forward to > your jsp. > > This one remembers the original path: > > public class ForwardFilter implements Filter > { > public static final String SERVLET_PATH = > ForwardFilter.class.getName() + ".servletPath"; > private String target; > > public void destroy() > { > } > > public void doFilter(ServletRequest request, ServletResponse > response, FilterChain chain) > throws IOException, ServletException > { > request.setAttribute(SERVLET_PATH, ((HttpServletRequest) > request).getServletPath()); > request.getRequestDispatcher(target).forward(request, > response); > } > > public void init(FilterConfig config) throws ServletException > { > target = config.getInitParameter("target"); > } > > } > > On 7 Apr 2010, at 10:28, Mark wrote: > > > > > Hi, > > > I'm using GWT and GAE. I want to serve my project's one and only jsp > > file no matter what url is entered by the user in their browser. So > > the web.xml file looks like this: > > > > > UserMaps.jsp > > > > > > > indexpage > > UserMaps.jsp > > > > > > indexpage > > /* > > > > > when I run this locally, it works fine. Any of the following urls > > serve my gwt app with UserMaps.jsp: > > > http://localhost:/ > > http://localhost:/JohnDoe > > http://localhost:/JaneDoe > > > when I publish to GAE, it stops working, none of the urls can find > > UserMaps.jsp: > > > http://usermaps.appspot.com/ > > http://usermaps.appspot.com/JohnDoe/ > > http://usermaps.appspot.com/JaneDoe/ > > > I'm not sure if this should work, I'm looking at the reference here: > > > http://code.google.com/appengine/docs/java/config/webxml.html#The_Wel... > > > My real goal is to support a twitter-like url mapping scheme where a > > user can enter my domain/username, and I'll show them their customized > > user page (by pulling some info out of the data store and dynamically > > rendering a page for them), > > > Thanks > > > -- > > You received this message because you are subscribed to the Google > > Groups "Google App Engine for Java" group. > > To post to this group, send email to google-appengine-java@googlegroups.com > > . > > To unsubscribe from this group, send email to > > google-appengine-java+unsubscr...@googlegroups.com > > . > > For more options, visit this group > > 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] Is it possible to have collections of embedded objects?
I have been dealing with lots of varying exceptions trying to implement/store a list of embedded objects. I found one post on this group claiming that this isn't supported (but the claim didn't come from someone at Google), and I saw no mention of lists of embedded objects in the google docs... So, does anyone know for sure, if this is actually supported, or not? Thanks, Mike -- 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: List of sub entities does not obay list order
Hi, Here are code for the entities MyEntity and SubEntity. Is anything wrong with the code? /Gunnar package appengine.test; import java.io.Serializable; import java.util.ArrayList; import javax.jdo.annotations.Element; import javax.jdo.annotations.Extension; import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; import javax.persistence.OneToMany; import com.google.appengine.api.datastore.KeyFactory; @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true") public class MyEntity implements Serializable { private static final long serialVersionUID = 1L; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true") private String key; @Persistent @Element(dependent = "true") private ArrayList myList = new ArrayList(); public Long getId() { return key == null ? null : KeyFactory.stringToKey(key).getId(); } public ArrayList getMyList() { return myList; } public void setMyList(ArrayList myList) { this.myList = myList; } @Override public String toString() { return "MyEntity [keyId=" + getId() + ", myList=" + myList + "]"; } public void clearKey() { key = null; } public void add(SubEntity subEntity) { myList.add(0,subEntity); } } package appengine.test; import java.io.Serializable; import javax.jdo.annotations.*; import com.google.appengine.api.datastore.KeyFactory; @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true") public class SubEntity implements Serializable { private static final long serialVersionUID = 1L; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true") private String key; @Persistent private String name; public SubEntity(String name) { super(); this.name = name; } public Long getId() { return key == null ? null : KeyFactory.stringToKey(key).getId(); } public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public String toString() { // return "SubEntity [name=" + name + ", id=" + getId() + ", order=" + getOrdinal() + "]"; return "SubEntity [name=" + name + ", id=" + getId() + "]"; } public void clearKey() { key = null; } public SubEntity copy() { SubEntity subEntity = new SubEntity(name); return subEntity; } } -- 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] com.google.apphosting.api.ApiProxy$ApiDeadlineExceededException: The API call mail.Send() took too long to respond and was cancelled.
Hi, I get that ApiDeadlineExceededException happens sometimes, no problem (I am not exceeding 30s, exception happens after 6 seconds). The question I have is: When I use com.google.appengine.api.mail.MailService.send() and I receive the exception com.google.apphosting.api.ApiProxy $ApiDeadlineExceededException: The API call mail.Send() took too long to respond and was cancelled. Does that mean that the email was not sent? Is there a way to know, or is it undefined. I will queue another task to resend, that's not the issue, but the email is an important daily update, so it needs to get to the customer and if there is a "not-sent" guarantee on cancelling the call, it would be nice to prevent duplicates. Cheers! 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] Re: Is it possible to have collections of embedded objects?
what do you mean by "store a list of embedded objects"? if you're storing in the datastore, you have to have a way to serialize whatever you got into one of the supported storable types. On Apr 7, 11:04 am, tempy wrote: > I have been dealing with lots of varying exceptions trying to > implement/store a list of embedded objects. I found one post on this > group claiming that this isn't supported (but the claim didn't come > from someone at Google), and I saw no mention of lists of embedded > objects in the google docs... So, does anyone know for sure, if this > is actually supported, or not? > > Thanks, > Mike -- 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: Is it possible to have collections of embedded objects?
On 8 Apr 2010, at 00:40, Tristan wrote: what do you mean by "store a list of embedded objects"? if you're storing in the datastore, you have to have a way to serialize whatever you got into one of the supported storable types. If you want to be able to query on the embedded instances then you will need to use one of the datastore specific persistence interfaces: ObjectDatastore from Twig and Objectify support this... not sure if others support embedded collections. -- 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: Is it possible to have collections of embedded objects?
Well, what I need is something like this: @PersistenceCapable(detachable = "true") public class Parent { @PersistenceCapable @EmbeddedOnly public class EmbeddedChild {...} @Embedded private List Children; ... } This doesn't work, so... Do I understand you correctly, that to accomplish this I have to serialize "Children" into a Text value or something like that? On Apr 7, 7:40 pm, Tristan wrote: > what do you mean by "store a list of embedded objects"? > > if you're storing in the datastore, you have to have a way to > serialize whatever you got into one of the supported storable types. > > On Apr 7, 11:04 am, tempy wrote: > > > > > I have been dealing with lots of varying exceptions trying to > > implement/store a list of embedded objects. I found one post on this > > group claiming that this isn't supported (but the claim didn't come > > from someone at Google), and I saw no mention of lists of embedded > > objects in the google docs... So, does anyone know for sure, if this > > is actually supported, or not? > > > Thanks, > > Mike -- 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: Using app's ELResolver class
I ran into this a few months ago when first getting jsf 2 going. Unfortunately I didn't find a resolution and wound up on the old EL version, so if you figure something out, please let us know. Thanks, Joel On Wed, Apr 7, 2010 at 5:10 AM, alesj wrote: > While this finds the right jar > > URL url = cl.getResource("META-INF/maven/javax.el/el-api/ > pom.properties"); > String info = url.toExternalForm(); > System.out.println("info = " + info); > // jar:file:/foobar/projects/foobar/trunk/server/target/ > foobar-server-0.0.1-SNAPSHOT/WEB-INF/lib/el-api-2.2.jar!/META-INF/ > maven/javax.el/el-api/pom.properties > > So we know the resources are there. > > -- > 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: Is it possible to have collections of embedded objects?
i work with low-level datastore api, so i serialize things myself, but essentially yes. The issue you're probably running into is that the thing that you're using to interact with the datastore, does not know how to store EmbeddedChild. I would start there. from low-level datastore api point of view, you can only store a list of String, Blob, Text, Integer the storable types. but I think with the persistance manager you're using, the condition is that it has to implement Serializable or IsSerializable interface (not sure which one). On Apr 7, 1:13 pm, tempy wrote: > Well, what I need is something like this: > > @PersistenceCapable(detachable = "true") > public class Parent { > > @PersistenceCapable > @EmbeddedOnly > public class EmbeddedChild {...} > > @Embedded > private List Children; > > ... > > } > > This doesn't work, so... Do I understand you correctly, that to > accomplish this I have to serialize "Children" into a Text value or > something like that? > > On Apr 7, 7:40 pm, Tristan wrote: > > > > > what do you mean by "store a list of embedded objects"? > > > if you're storing in the datastore, you have to have a way to > > serialize whatever you got into one of the supported storable types. > > > On Apr 7, 11:04 am, tempy wrote: > > > > I have been dealing with lots of varying exceptions trying to > > > implement/store a list of embedded objects. I found one post on this > > > group claiming that this isn't supported (but the claim didn't come > > > from someone at Google), and I saw no mention of lists of embedded > > > objects in the google docs... So, does anyone know for sure, if this > > > is actually supported, or not? > > > > Thanks, > > > Mike -- 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] AppstatsServlet not working in 1.3.2, redirects to /stats
Hi, I am trying out the now profiling stats in appengine using AppstatsServlet and AppstatsFilter. The filter seems to work just fine but the servlets mapped at /appstats/* just redirects to /stats. If I try to map it to /stats then it gets stuck in an infinite redirection loop. Also, what does an admin mean in this context? Is it an admin in the Google Apps domain or the App Engine admin (developer)? Thanks, Viðar -- 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] Delay between Load Request and Filter Init
Hello, I'm currently using the Wicket Framework which is simply a javax.servlet.Filter. I have a quick little logging statement in the init() method of the filter which, I believe, is the absolute first thing that should run on a loading request. I've been working hard to minimize the startup time for my application, but now I've discovered a delay between the initial GET request and the log statement in the init() function that is anywhere between 2 seconds and 15 seconds. I suppose I can live with the 2 seconds, but 15 seconds is pushing it :) 04-07 11:41AM 41.583 75.150.73.225 - - [07/Apr/2010:11:42:14 -0700] "GET / HTTP/1.1" 500 0 - "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3,gzip(gfe)" "jacob-brookover.appspot.com" D 04-07 11:41AM 53.341 org.cast.google.TestFilter init: Initializing Filter I've been fuddling around with a lot of things, so I'm far from a "standard" implementation at this point. I'm hoping someone can tell me what I can do to remove such a delay. Thanks! Jake -- 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: JDO Relationship Performance Problems - what am I doing wrong?
I'd say the average number of line items is around 100. So, the slowest request (but also the most common) is to show the 5 most recent items from all recent user orders. In JDO, I was doing that via a query for the orders, then a order.getItems() for each, then iterating in reverse for a few orders. This turned out to be super slow past a certain average number of items per order. What I'm doing currently is memcaching the order with items collection manually, then using a keys only query for orders to load from cache where possible. This has gotten the request time down to about 1/6th of where it was previously, which means I still have users whose request takes around 5 seconds on average. I think if I were to do it all over again I'd either embed the items right in the order, or not use JDO at all and try to do some more manual caching and batch loading. A lot of time was spent learning how JDO was loading the items collection and then trying to get JDO to cache that collection. It might be possible, but I couldn't figure it out. Thanks for the advice and links, they're very helpful. I'll definitely read up on Objectify and Twig for future projects. On Tue, Apr 6, 2010 at 6:28 PM, Jeff Schnitzer wrote: > The most important number in my mind is the number of line items in an > order. If you're seeing 20s+ queries, it must be a pretty large > number. > > Objectify (and Twig) support queryable collections of embedded > objects, so you can put all the line items in a single order object. > There are some practical limits to this approach, though - the > collection can have at most 5k items and the total entity size cannot > exceed 1MB. Also, writing out indexed collections with 5,000 entries > is *very* expensive in terms of $, so if you have a high churn rate > you'll burn through your budget pretty fast. > > Obviously serialization is an option, but then you won't be able to > query for orders by line item data. > > If it makes the most sense to keep the line items as separate objects > (because of churn or simple volume of line items) you can still use > the memcache to your advantage. You'll want a bidirectional > relationship, with Keys stored in the Order pointing to the LineItems > as well as vice-versa. You can load an Order and use the LineItem > keys to perform a batch get, hopefully most of which will come out of > the memcache. > > It's hard to suggest a strategy without knowing the shape of the data, > the query expected profile, and the churn rate. > > Jeff > > On Tue, Apr 6, 2010 at 2:23 PM, Steve Pritchard > wrote: > > Before proposing a solution, what is your expected active user base. > > 1000's or 1,000,000s or something in between. > > Steve > > > > On Apr 6, 3:50 pm, Matt Hall wrote: > >> Thanks for the response, could you point me to somewhere where I can > >> read about batched queries by key in JDO? Or do I need to go to the > >> low level API for that? > >> > >> I think the conclusion I'm coming to here is 1) I shouldn't have made > >> the detail for each order as a separate object, (although this has > >> huge problems for querying later as in how many people have bought > >> item x), and 2) JDO managed relationships get slow with small numbers > >> of child objects, are hard to optimize, and probably not worth the > >> trouble overall. Is that pretty much what I should be concluding? > >> > >> Thanks again, I'm really trying to understand how to translate what's > >> a basic structure in RDMS land into something that will work in app > >> engine beyond toy implementations. > >> > >> On Apr 6, 12:54 pm, "Ikai L (Google)" wrote: > >> > >> > For speed, you'll get the most gains if you denormalize when possible > - yes, > >> > the relational purists are going to riot, but you don't have many of > the > >> > benefits of normalization anyway such as foreign key constraints or > native > >> > joins. > >> > >> > If that isn't an option - and I really do recommend looking into it > where it > >> > makes sense - if you're able to retrieve keys, we may also be able to > make > >> > use of batch queries by key. > >> > >> > On Mon, Apr 5, 2010 at 2:59 PM, Matt Hall > wrote: > >> > > Hi Everyone, > >> > >> > > I've been trying for the past while to get our relatively simple JDO > >> > > based site to run at a reasonable speed, but I'm failing and I'd > love > >> > > any suggestions. I'll describe it as succinctly as possible to > >> > > hopefully keep your interest :) > >> > >> > > * The basic structure is a User -> Order -> Line items type > >> > > structure. > >> > > * The main query performed is "Orders for a user." > >> > > * A user usually has around 10 orders, each order has under 100 > line > >> > > items. > >> > > * The Order -> Items relationship is done as a One-to-many owned > >> > > relationship. > >> > >> > > My problem is that the basic request the site handles: "Get all > orders > >> > > for a user and do something based on the line items" is very slow. > In > >
[appengine-java] Re: com.google.apphosting.api.ApiProxy$ApiDeadlineExceededException: The API call mail.Send() took too long to respond and was cancelled.
I guess this covers the question http://groups.google.com/group/google-appengine/browse_thread/thread/189eecd6021b1bb4/ed1025f01b47e101 On Apr 7, 12:37 pm, Tristan wrote: > Hi, > > I get that ApiDeadlineExceededException happens sometimes, no problem > (I am not exceeding 30s, exception happens after 6 seconds). The > question I have is: > > When I use com.google.appengine.api.mail.MailService.send() and I > receive the exception com.google.apphosting.api.ApiProxy > $ApiDeadlineExceededException: The API call mail.Send() took too long > to respond and was cancelled. Does that mean that the email was not > sent? Is there a way to know, or is it undefined. > > I will queue another task to resend, that's not the issue, but the > email is an important daily update, so it needs to get to the customer > and if there is a "not-sent" guarantee on cancelling the call, it > would be nice to prevent duplicates. > > Cheers! > > 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] Re: JDO Relationship Performance Problems - what am I doing wrong?
> I think if I were to do it all over again I'd either embed the items right > in the order, or not use JDO at all and try to do some more manual caching > and batch loading. A lot of time was spent learning how JDO was loading the > items collection and then trying to get JDO to cache that collection. It > might be possible, but I couldn't figure it out. DataNucleus 2.x has L2 caching enabled by default, and caches relations (1-1, 1-N, M-N). Sadly GAE/J still doesn't support that version and no sign of when it will either (in fact DN 2.1 is in progress so they'll be even further behind soon). Can't remember how much of L2 caching was complete in DN 1.1 since it was so long ago. -- 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: JDO Relationship Performance Problems - what am I doing wrong?
Ah, that's interesting. From what I could tell via appstats during my requests, in my 1-N relationship the L2 cache was only caching the individual objects, not the entire collection. So, two accesses of the same collection in two subsequent requests would require a round trip to the memcache for each element of the collection. This is what caused my problem as the latency on the memcache lookups was between 10-30ms for each element, which gets you to some pretty awful request times even when dealing with only ~100 total elements. >From my perspective it seems like a mistake for Google to be using JDO in all the main Java documentation. It doesn't seem like it will well work for many reasonable scenarios, although DataNucleus 2.x seems to have a lot of these issues sorted out. On Wed, Apr 7, 2010 at 3:41 PM, datanucleus wrote: > > I think if I were to do it all over again I'd either embed the items > right > > in the order, or not use JDO at all and try to do some more manual > caching > > and batch loading. A lot of time was spent learning how JDO was loading > the > > items collection and then trying to get JDO to cache that collection. It > > might be possible, but I couldn't figure it out. > > DataNucleus 2.x has L2 caching enabled by default, and caches > relations (1-1, 1-N, M-N). Sadly GAE/J still doesn't support that > version and no sign of when it will either (in fact DN 2.1 is in > progress so they'll be even further behind soon). Can't remember how > much of L2 caching was complete in DN 1.1 since it was so long ago. > > -- > 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] Re: Is it possible to have collections of embedded objects?
You can serialize object graphs, but keep in mind that you won't be able to index/query this data and it will be opaque to the datastore viewer. It will also be opaque to GAE/Python tools. As John mentioned, you can get embedded object collections without Java serialization if you use Objectify or Twig. Here is a document that describes how they work in Objectify, including the implementation details (I suspect Twig is similar): http://code.google.com/p/objectify-appengine/wiki/introductiontoobjecti...@embedded Jeff On Wed, Apr 7, 2010 at 11:36 AM, Tristan wrote: > i work with low-level datastore api, so i serialize things myself, but > essentially yes. The issue you're probably running into is that the > thing that you're using to interact with the datastore, does not know > how to store EmbeddedChild. I would start there. > > from low-level datastore api point of view, you can only store a list > of String, Blob, Text, Integer the storable types. but I think > with the persistance manager you're using, the condition is that it > has to implement Serializable or IsSerializable interface (not sure > which one). > > On Apr 7, 1:13 pm, tempy wrote: >> Well, what I need is something like this: >> >> @PersistenceCapable(detachable = "true") >> public class Parent { >> >> @PersistenceCapable >> @EmbeddedOnly >> public class EmbeddedChild {...} >> >> @Embedded >> private List Children; >> >> ... >> >> } >> >> This doesn't work, so... Do I understand you correctly, that to >> accomplish this I have to serialize "Children" into a Text value or >> something like that? >> >> On Apr 7, 7:40 pm, Tristan wrote: >> >> >> >> > what do you mean by "store a list of embedded objects"? >> >> > if you're storing in the datastore, you have to have a way to >> > serialize whatever you got into one of the supported storable types. >> >> > On Apr 7, 11:04 am, tempy wrote: >> >> > > I have been dealing with lots of varying exceptions trying to >> > > implement/store a list of embedded objects. I found one post on this >> > > group claiming that this isn't supported (but the claim didn't come >> > > from someone at Google), and I saw no mention of lists of embedded >> > > objects in the google docs... So, does anyone know for sure, if this >> > > is actually supported, or not? >> >> > > Thanks, >> > > Mike > > -- > 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: Server Error A server error has occurred. - Whilst Deleting app version.
mailmymove - version 1 http://www.mailmymove.com On Apr 5, 9:51 pm, "Ikai L (Google)" wrote: > What's your application ID and the version you are trying to delete? > > > > On Mon, Apr 5, 2010 at 11:20 AM, Eurig Jones wrote: > > Hi, > > > I'm getting a... > > > Server Error > > > A server error has occurred. > > > Whilst trying to delete a particular version of an app. For the others > > it's no problem, but this particular version I cannot delete and I'm > > getting the Server error. Can anyone suggest what I can do about this? > > (Or where to report it at least) > > > -- > > 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. > > -- > 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] Re: having trouble implementing gwt in existing gae app
Anybody have any thoughts on what I could be missing? On Apr 5, 9:24 pm, zackmac wrote: > I'm using Eclipse 3.4.1, GAE 1.3.1 and trying to use GWT 2.0.3. I've > been working on my GAE app some time and that's working well - just > want to spice up the front-end a little. I added a new GWT module, > entry point class and HTML page from File -> New and then copied the > appropriate js head include in my existing index.jsp page, but I'm > still getting Missing required argument 'module[s]' > Google Web Toolkit 2.0.3. When running the app, I right-click on my > project and then go to Debug As and choose Java Application. Then I > found the com.google.gwt.dev.DevMode app to run and then I get the > Missing required argument 'module[s]' error. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-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: Adding Task-Queue Tasks in Batch?
Thanks! If under a transaction, are tasks added via batch still constrained to 5 per txn? On Apr 6, 11:53 am, Keith wrote: > Fromhttp://code.google.com/appengine/docs/java/javadoc/com/google/appengi... > > add(java.lang.Iterable taskOptions) > Submits tasks to this queue. > > On Apr 6, 9:54 am, Seth Ladd wrote:> Aloha, > > > The docs for the Java implementation of the Task Queue mentions this: > > > maximum number of tasks that can be added in a batch - 100 > > > However, I can't find any reference to adding tasks in a batch. What > > does the above mean, and where can I find more information about it? > > I'd like to be able to add "many" tasks in a batch, if that's > > possible. > > > I am aware of the "5 tasks per transaction" limit. > > > Thanks! > > Seth -- 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: java.lang.VerifyError
Hi Karthik, Thanks a lot. It worked for me. Regards, Shyam. On Apr 5, 2:10 pm, KarthikR wrote: > Hi > > The issue has the following suggested workaround: > > --- start > Comment 14 by neiltolson, Mar 30 (5 days ago) Just like mgo1977 said > above, start the app in a DeferredCommand in the EntryPoint: > > public void onModuleLoad() { > DeferredCommand.addCommand( > new Command() { > public void execute() { > TestScreen testScreen = new TestScreen(); > RootPanel.get( "application" ).add( testScreen ); > } > } ); > } > > This works consistently for me with JDK 1.5.0_19. > -- end > > Can you try if the workaround works for you? > > Regards, > Karthik > > On Apr 5, 6:38 am, Shyam Visamsetty wrote: > > > > > Hi, > > > Thanks for the reply. Definitely sounds like related to the issue > > posted. Is there a work around for this that you know of? > > > Thanks, > > Shyam > > > On Apr 4, 1:31 pm, KarthikR wrote: > > > > Hi > > > > This may be related > > > tohttp://code.google.com/p/google-web-toolkit/issues/detail?id=4254 > > > > Regards, > > > Karthik > > > > On Apr 4, 8:19 am, Shyam Visamsetty wrote: > > > > > Hi, > > > > > I am getting the followingjava.lang.VerifyErrorwhen loading a GWT > > > > Module. I am using GWT 2.0.2 and AppEngine 1.2.1. The stack trace of > > > > the error is as follows. > > > > > 10:58:38.406 [ERROR] [sensormss] Unable to load module entry point > > > > class com.sensorms.client.Sensormss (see associated exception for > > > > details) > > > >java.lang.VerifyError: (class: com/google/gwt/core/client/Scheduler, > > > > method: signature: ()V) Illegal constant pool index > > > > at > > > > com.google.gwt.user.client.ui.LayoutCommand.schedule(LayoutCommand.java: > > > > 104) > > > > at > > > > com.google.gwt.user.client.ui.LayoutPanel.animate(LayoutPanel.java: > > > > 141) > > > > at > > > > com.google.gwt.user.client.ui.LayoutPanel.animate(LayoutPanel.java: > > > > 137) > > > > at > > > > com.google.gwt.user.client.ui.LayoutPanel.insert(LayoutPanel.java:196) > > > > at com.google.gwt.user.client.ui.LayoutPanel.add(LayoutPanel.java: > > > > 133) > > > > at > > > > com.google.gwt.user.client.ui.TabLayoutPanel.(TabLayoutPanel.java: > > > > 160) > > > > at com.sensorms.client.Sensormss.onModuleLoad(Sensormss.java:45) > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > > at > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: > > > > 39) > > > > at > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp > > > > l.java: > > > > 25) > > > > at java.lang.reflect.Method.invoke(Method.java:585) > > > > at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java: > > > > 369) > > > > at > > > > com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler > > > > .java: > > > > 185) > > > > at > > > > com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan > > > > nelServer.java: > > > > 380) > > > > at > > > > com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java > > > > : > > > > 222) > > > > at java.lang.Thread.run(Thread.java:595) > > > > > I get this only when I use any of the Layout Panel stuff. This code > > > > caused this error to occur. It was taken from the TabLayoutPanel > > > > Javadoc example. > > > > > TabLayoutPanel p = new TabLayoutPanel(1.5, Unit.EM); > > > > p.add(new HTML("this"), "[this]"); > > > > p.add(new HTML("that"), "[that]"); > > > > p.add(new HTML("the other"), "[the other]"); > > > > RootLayoutPanel rp = RootLayoutPanel.get(); > > > > rp.add(p); > > > > > Kindly let me know what causes the error. Even the Appengine SDK 1.3.1 > > > > causes this error. > > > > > Any help/suggestions are appreciated. Thanks in Advance. > > > > > Regards, > > > > Shyam Visamsetty.- Hide quoted text - > > > - Show quoted text - -- 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: ANN: Firefox add-on for tracking GAE estimated cost
Great!!! On Apr 7, 5:00 pm, radomir wrote: > Hi, > > I made a Firefox extension that collects estimated cost from App > Engine response headers and shows the total in the Firefox status bar. > If anyone's interested, the add-on can be downloaded > from:http://radomirml.com/2010/04/06/track-appengine-estimated-cost-with-f... > > Radomir -- 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: Is it possible to have collections of embedded objects?
Hi John, > > If you want to be able to query on the embedded instances then you will need > to use one of the datastore specific persistence interfaces: ObjectDatastore > from Twig and Objectify support this... not sure if others support embedded > collections. > Slim3 supports embedded collections as follows: @Attribute(lob = true) private List Children; See http://sites.google.com/site/slim3appengine/slim3-datastore/defining-data-classes/serializable-objects Yasuo Higa -- 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.