[appengine-java] Re: Java Mail Service
Hi I am not sure why the low-level API isn't working (or why the low- level api is using a high amount of CPU). As to your original question, can you take a look at http://code.google.com/p/googleappengine/issues/detail?id=1631 Also from http://code.google.com/appengine/docs/java/mail/usingjavamail.html : The low-level API includes a convenience method for sending mail to all of the application's administrators. To do this in JavaMail, use admins (with no at-symbol or domain) as a recipient Looks like regaular JavaMail should work with msg.addRecipient(Message.RecipientType.CC, new InternetAddress (admins)); ... Regards, Karthik On Apr 7, 5:56 am, moissinac jcmoissi...@gmail.com wrote: 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 jcmoissi...@gmail.com 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 soumya.karth...@gmail.com 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 jcmoissi...@gmail.com 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- 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: java.lang.VerifyError
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 shyamsunder...@gmail.com 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 soumya.karth...@gmail.com 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 shyamsunder...@gmail.com wrote: Hi, I am getting the following java.lang.VerifyError when 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: init 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.init(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: java.lang.VerifyError
Hi This may be related to http://code.google.com/p/google-web-toolkit/issues/detail?id=4254 Regards, Karthik On Apr 4, 8:19 am, Shyam Visamsetty shyamsunder...@gmail.com wrote: Hi, I am getting the following java.lang.VerifyError when 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: init 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.init(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(DelegatingMethodAccessorImpl.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(BrowserChannelServer.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. -- 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 the jar file for i.cache.BasicCacheFactory'
Hi In addition to jsr107-cache.1.1.jar , appengine- jsr107cache-1.3.2.jar should also be in the classpath (which is found in lib\user directory). Can you check if it is so? Ref: http://osdir.com/ml/GoogleAppEngine/2010-02/msg01418.html Regards, Karthik On Apr 2, 11:09 am, niraj njun...@gmail.com wrote: I keep on getting this error - net.sf.jsr107cache.CacheException: Could not find class: 'ri.cache.BasicCacheFactory' Where is the jar file for this. I have jsr107-cache.1.1.jar on the path and I am running GAEJ 1.3.2 -- 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
Hi The java API javadoc at http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/mail/MailService.html provides send() and sendToAdmins() methods, Can you try using sendToAdmins() ? Regards, KarthikR On Apr 1, 7:17 am, moissinac jcmoissi...@gmail.com 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: Fwd: JSF 2.0 Netbeans and Google Appengine given error
Hi This issue is discussed at http://javadocs.wordpress.com/2009/10/17/mojarra-jsf-2-0-rc2-and-google-app-engine-sdk-1-2-6/ Regards On Mar 31, 2:14 am, Haroon Idrees haroo...@gmail.com wrote: I attached simple hello world app for appengine sdk 1.3.2 and I alread follow the instruction given at and add the define jarshttps://sites.google.com/a/wildstartech.com/adventures-in-java/Java-P... [java] java.lang.NoClassDefFoundError: javax.naming.InitialContext is a restricted class. Please see the Google App Engine developer's guide for more details. [java] at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51) [java] at com.sun.faces.config.WebConfiguration.processJndiEntries(WebConfiguration.java:578) [java] at com.sun.faces.config.WebConfiguration.init(WebConfiguration.java:114) [java] at com.sun.faces.config.WebConfiguration.getInstance(WebConfiguration.java:174) [java] at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:161) [java] at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) [java] at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) -- Regards Haroon Idrees Software Team Lead IBL Group Voice:+923212066747 Site:http://www.haroonidrees.com Profile:http://www.google.com/profiles/haroonob MSN:haroon.idr...@hotmail.com msn%3aharoon.idr...@hotmail.com Skype :haroonob LinkedIn:http://www.linkedin.com/in/haroonob Facebook:http://www.facebook.com/haroonidrees -- Regards Haroon Idrees Software Team Lead IBL Group Voice:+923212066747 Site:http://www.haroonidrees.com Profile:http://www.google.com/profiles/haroonob MSN:haroon.idr...@hotmail.com msn%3aharoon.idr...@hotmail.com Skype :haroonob LinkedIn:http://www.linkedin.com/in/haroonob Facebook:http://www.facebook.com/haroonidrees JSFAppOnGoogleAppEngine.zip 25KViewDownload -- 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 register a custom ELResolver?
Hi Can you take a look at http://stackoverflow.com/questions/2551517/gae-j-unable-to-register-a-custom-elresolver and see if it helps? regards. On Mar 30, 10:05 am, Davide Angelocola davide.angeloc...@gmail.com wrote: Hello, I've the following class: public class WebAiatListener implements ServletContextListener { private static final Logger logger = Logger.getAnonymousLogger(); @Override public void contextInitialized(ServletContextEvent sce) { ServletContext context = sce.getServletContext(); if (context == null) { throw new NullPointerException(servlet context); } if (JspFactory.getDefaultFactory() == null) { throw new NullPointerException(default factory); } if (JspFactory.getDefaultFactory().getJspApplicationContext(context) == null) { throw new NullPointerException(jsp application context); } JspApplicationContext jspContext = JspFactory.getDefaultFactory().getJspApplicationContext(context); if (jspContext == null) { logger.info(cannot register 'EntityELResolver'); } else { jspContext.addELResolver(new EntityELResolver()); logger.info('EntityELResolver' registered); } } using the local dev environment it works but when I deploy it on GAE I obtain the following exception: Failed startup of context com.google.apphosting.utils.jetty.runtimeappenginewebappcont...@391da0{/,/ base/data/home/apps/webaiat/3.340904528580025222} java.lang.NullPointerException: default factory since JspFactory.getDefaultFactory() returns null. How can I register a custom ELResolver? Thanks. PS Please note that I'm using servlet 2.5 version (so I'm using JSP 2.1): web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://java.sun.com/xml/ns/javaee; xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; xsi:schemaLocation=http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; version=2.5 -- 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 register a custom ELResolver?
Hi Can you check out http://stackoverflow.com/questions/2551517/gae-j-unable-to-register-a-custom-elresolver ? this is recognizeable as a bug in Tomcat 6.x. A workaround is to force the loading of JspRuntimeContext yourself before getting the factory: Class.forName(org.apache.jasper.compiler.JspRuntimeContext); See if this or similar hack helps. Regards, On Mar 30, 10:05 am, Davide Angelocola davide.angeloc...@gmail.com wrote: Hello, I've the following class: public class WebAiatListener implements ServletContextListener { private static final Logger logger = Logger.getAnonymousLogger(); @Override public void contextInitialized(ServletContextEvent sce) { ServletContext context = sce.getServletContext(); if (context == null) { throw new NullPointerException(servlet context); } if (JspFactory.getDefaultFactory() == null) { throw new NullPointerException(default factory); } if (JspFactory.getDefaultFactory().getJspApplicationContext(context) == null) { throw new NullPointerException(jsp application context); } JspApplicationContext jspContext = JspFactory.getDefaultFactory().getJspApplicationContext(context); if (jspContext == null) { logger.info(cannot register 'EntityELResolver'); } else { jspContext.addELResolver(new EntityELResolver()); logger.info('EntityELResolver' registered); } } using the local dev environment it works but when I deploy it on GAE I obtain the following exception: Failed startup of context com.google.apphosting.utils.jetty.runtimeappenginewebappcont...@391da0{/,/ base/data/home/apps/webaiat/3.340904528580025222} java.lang.NullPointerException: default factory since JspFactory.getDefaultFactory() returns null. How can I register a custom ELResolver? Thanks. PS Please note that I'm using servlet 2.5 version (so I'm using JSP 2.1): web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://java.sun.com/xml/ns/javaee; xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; xsi:schemaLocation=http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; version=2.5 -- 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.ClassNotFoundException: com.google.appengine.tools.appstats.AppstatsFilter
Hi In my 1.3.2 installation, the missing class com.google.appengine.tools.appstats.AppstatsFilter is part of 'appengine-api-labs-1.3.2.jar'. The jar is found in the following directories: lib\impl\ , lib\user and demos\guestbook\war\WEB-INF \lib . Can you check if your install has the labs api jar? And if so, check the build script to see if the jar file is being copied to app's WEB- INF. Regards, KarthikR On Apr 1, 6:18 am, Prashant Gupta nextprash...@gmail.com wrote: someone please help me out following is the code I added to my web.xml file : filter filter-nameappstats/filter-name filter- classcom.google.appengine.tools.appstats.AppstatsFilter/filter- class init-param param-namelogMessage/param-name param-valueAppstats available: /appstats/details?time={ID} /param-value /init-param /filter filter-mapping filter-nameappstats/filter-name url-pattern/*/url-pattern /filter-mapping servlet servlet-nameappstats/servlet-name servlet- classcom.google.appengine.tools.appstats.AppstatsServlet/servlet- class /servlet servlet-mapping servlet-nameappstats/servlet-name url-pattern/appstats/*/url-pattern /servlet-mapping security-constraint web-resource-collection url-pattern/appstats/*/url-pattern /web-resource-collection auth-constraint role-nameadmin/role-name /auth-constraint /security-constraint -- 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.