[appengine-java] Re: java.lang.NoClassDefFoundError: for sample project ( CodeLabEx2.zip.)
make sure you have all the app engine libs in /WEB-INF/lib -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/QTTGn-_VOmAJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Mining logs for performance data
I've seen a couple of apps (iPad app) that can log into your account and monitor various things. I took a very low-tech approach to average the response time from logs: I filter logs by label (e.g. path:/place/.*) and set the limit to 200 (the maximum logs you can show in one page) and then copy and past the results into a file and run this to average the times: public class GetAverageTimeFromLogPage { public static void main(String[] args) throws MalformedURLException, IOException { FileReader reader = new FileReader(args[0]); String text = CharStreams.toString(reader); long total = 0; int count = 0; Pattern pattern = Pattern.compile(" 200 (\\d+)ms"); Matcher matcher = pattern.matcher(text); while (matcher.find()) { String time = matcher.group(1); long value = Long.parseLong(time); // remove restarts if (value <= 1000) { count++; total += value; } } System.out.println(total / count + " from " + count); } } I hope someone has a nicer method!! -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/lwLRH0p6XYkJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Task queue locking up
On Tuesday, 26 July 2011 04:03:44 UTC+7, Ikai L (Google) wrote: > > John, yeah, it's a deadlock, possibly in userspace code. Can you look into > this? > > The only pattern I could detect was the dead-lock with concurrent file access - I had my web framework in dev mode so each request was loading templates. I do a lot of reflective reads and writes (Method.get Method.set) and annotation reading, which makes me suspect the GAE security manager. I've run a load test on the dev server and not seen the dead-locks locally. On our end we'll see if we can surface and more usable error message. > > Nice one, a stack trace would really help figure this one out. I'll turn on threadsafe mode again once its possible to get some more details on the problem. I think that running single threaded increases the variance of response times. I often now see a request take e.g. 600ms but my code competes in 50ms. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/YfJhHVZZo70J. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Mining logs for performance data
Hi, My application writes timing information for the backend hits in the log using standard logger. I can see them in the logs using GAE dashboard 'Logs' tab. I would like to run a cron job to get these metrics and have a report. How can I mine the application logs? Any suggestions on how to handle this? Thanks Neeli -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/z82OQfwZHGUJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] GAE Mail Sending Error-
Dear All- Here is a log trace that I get for an piece of code that is trying to send out an email. java.lang.NoClassDefFoundError: com/sun/mail/util/TraceOutputStream at com.google.appengine.runtime.Request.process-1ef8200785964f49(Request.java) at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406) at java.lang.Class.getConstructor0(Class.java:2716) at java.lang.Class.getConstructor(Class.java:266) at javax.mail.Session.getService(Session.java:483) at javax.mail.Session.getTransport(Session.java:379) at javax.mail.Session.getTransport(Session.java:339) at javax.mail.Session.getTransport(Session.java:368) at javax.mail.Transport.send(Transport.java:67) at javax.mail.Transport.send(Transport.java:48) at com.company.trisunkworld.emails.EmailFacade.sendEmail(EmailFacade.java:28) at com.company.trisunkworld.controllers.EmailController.sendEmailHandler(EmailController.java:116) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:43) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:710) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:167) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:414) Any thoughts of I have different in my Classpath or information? I have a whole stack of code that is associated, If you could let me know what specific code will help you debug this faster, kindly let me know. -Thanks -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/kyJCWEDpDcMJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Task queue locking up
John, yeah, it's a deadlock, possibly in userspace code. Can you look into this? On our end we'll see if we can surface and more usable error message. Ikai Lan Developer Programs Engineer, Google App Engine Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine On Thu, Jul 21, 2011 at 11:31 PM, John Patterson wrote: > In case others are facing these time-outs, by setting "threadsafe" to > false, all errors stopped and response time does not > seem significantly different. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-appengine-java/-/ofJmJRTpR2oJ. > > To post to this group, send email to > google-appengine-java@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] deployment to production stalling
Hello, Anyone having troubles deploying to appengine production? My deployments are currently stalling out to production since Friday July 21 though they still succeed to development. I didn't change my java jdk binaries, didn't change the appengine sdks that I was using, and had previously successfully deployed the app using the same configuration and builds, even after the July 14th maintenance. To troubleshoot, I tried installing and building from variations of java jdks, variations of appengine sdks (fresh downloads and existing that I already had) and had the same stalls during attempts to upload to production. I ran the deployment with java verbose options to print the classes loaded and then created aspects and used load time weaving to see the methods where the deployment is stalling. I can print them out here if it's helpful, but it looks to be a bug in the appengine-tools-api.jar Has anyone else had the same problem recently? If so, how did you solve it? Thanks, Nichole -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] How to handle SNMP traps on appengine?
Hi, I just wanted to know what's the best process to handle SNMP traps from the application. Our app will be doing some critical third party backend hits and we need to alerts/notifications on any errors. One option is sto end SNMP traps to some SNMP sever outside appengine but I don't want to have SNMP server installed in EC2 or any other cloud just for that. I could send email notification on error conditions but that is lame. Any suggestions? Thanks Neeli -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/Gf_BGTf3opkJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Running UI tests against AppServer in a CI environment
Has anyone set this up? We're running UI tests against our app using Cucumber and Capybara and it works great locally. But I'd like to get it done in a continuous integration environment. The major stumbling block as that I can't seem to start the server process (DevAppServerMain) and have it outlive Ant. I'm using a modified "runserver" target because of issues with a hanging java.exe process (outlined here: http://code.google.com/p/googleappengine/issues/detail?id=2093). My target is based on one from that thread: This runs but it blocks waiting for you to cancel it manually. If I add "spawn=true" to the task, I get an error that it's not allowed. Note that I'm doing something similar with a GWT/GAE project successfully. In that project, I launch hosted mode with spawn=true and it runs fine. This project is AppEngine only so I'm not using GWT or hosted mode. Any ideas? -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/q4Z78GjokQIJ. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Development server deletes automatically-generated datastore indices
I've noticed the same problem today. I hope the SDK will be updated to make life easier for developers. On Jul 1, 9:29 am, Ian Marshall wrote: > Yes, the essence of what you describe below is what I plan to do - > what a pain, though. > > It's a pity that the dev app server doesn't look at the automatically- > generated indices at launch-time, but I'll live with it. > > On Jul 1, 8:22 am, Cyrille Vincey wrote: > > > > > > > > > Yes, I have noticed the same behaviour. > > My workaround: once a index has been automatically generated, I copy > > its xml configuration from "datastore-indexes-auto.xml" to "datastore- > > indexes.xml". > > Thus I consider "datastore-indexes-auto.xml" as automatic > > propositions. > > > On Jun 30, 12:14 pm, Ian Marshall wrote: > > > > I have my datastore-indexes.xml configuration file set as > > > > > > > > > > > I make successive runs of the development server. Each time before > > > stopping it, I wait a couple of minutes for updates to be flushed to > > > local_db.bin and datastore-indexes-auto.xml. > > > > I have found that successive runs of the development server can cause > > > previously-existing automatically-generated datastore indices to be > > > erased (even though the datastore data in local_db.bin is preserved). > > > > Has anyone else found this? Is this expected behaviour or a glitch? -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] java.lang.NoClassDefFoundError: for sample project ( CodeLabEx2.zip.)
Hi, I am using sdk 1.5.1 to run one sample google application/project CodeLabEx2.zip. WARNING: Error for /product java.lang.NoClassDefFoundError: com/google/appengine/api/datastore/ EntityNotFoundException at com.google.appengine.codelab.Product.getAllProducts(Product.java: 59) at com.google.appengine.codelab.ProductServlet.doGet(ProductServlet.java: 54) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java: 35) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java: 58) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java: 122) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java: 97) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:351) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.headerComplete(HttpConnection.java:923) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 409) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:582) Caused by: java.lang.ClassNotFoundException: com.google.appengine.api.datastore.EntityNotFoundException at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java: 176) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 33 more Jul 25, 2011 2:43:11 PM com.google.appengine.tools.development.LocalResourceFileServlet doGet WARNING: No file found for: /favicon.ico Could you please let me know for same. Thanks -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: [google-appengine] Re: CMS for GAE
Thanks for your explications. PS I don't want to start a discussion but my excerpt is clear, with the package: package com.claymus.site.module.page; and the definition of the class: @PersistenceCapable(detachable = "true") public class Page extends PersistentCapable { This page is clearly a Data Access Object (not a servlet) and one off it's method 'serve' output html. On Jul 22, 8:18 pm, Prashant wrote: > Hello Michel, > > Thanks for checking out the code and the query :) > > On Thu, Jul 21, 2011 at 9:49 PM, Michel Schroeder wrote: > > > Hello, > > > Thanks for your contributions for a GAE-Java CMS. > > > I had a look at the code of claymus. It seems that you use the > > combination of gae and gwt, this is a very interesting point. > > > But on the client side, some architectural questions come to my > > mind... > > > I don't understand your separation of code responsability? > > Code separation is done considering mainly, modularity and pluggability of > modules. All the classes related to a module are placed in a package (and > sub-packages) meant for that module. Modules are designed such that it won't > affect the functioning of App or other modules if a new module is added or > an old one (which is not a core module) is removed from the App. > > Up to now, I don't see something like MVC or MVP or UI Builder ... It > > > seems that your write the html output directly from java (and that in > > the same file that the DAO definition if I am not wrong)... > > Yes, I didn't try to follow MVC or MVP strictly because I don't think that > is a strict requirement. I din't use UI Builder because none of the GWT > modules have very big and/or complex UI. If you are worried about supporting > mobile devices, that can supported just by creating a mobile theme (which > will include layout and look & feel) and few tweeks in Content and Block > types. > > I think you are thinking of following methods as Data-Access methods. They > are not Data-Access methods, they are just converting Data Object to Data > Transfer Object. PageData class, in the same package, is the DAO for page > module. > > public PageDTO getDTO() { > PageDTO pageDTO = new PageDTO(); > pageDTO.setUri(getUri()); > pageDTO.setTitle(getTitle()); > pageDTO.setLayout(getLayout().getClass().getSimpleName()); > return pageDTO; > > } > > public void update(PageDTO pageDTO) { > setTitle(pageDTO.getTitle()); > setLayout(pageDTO.getLayout()); > > } > > And, I don't see any thing wrong in outputting html from a java servlet. > > Could you explain a bit the advantages of your strategy? > > > > I am not following popular design architectures, like MVP and MVC, that may > have some disadvantages that I am not aware about now. > > I am trying to support maximum modularity and plaggability like any other > CMS. e.g. if you have to add a new Content or Block type, you just need to > write 2 small classes, one for backend and one for front-end (see > com/claymus/site/module/block/types/RichText.java and > com/claymus/site/module/block/types/gwt/RichText.java) and drop them in to > Content/Block Types package. Same for a theme. > > > > > > > > > A lot of people could think that a bad separation of responsibilities > > will lead to a lot of difficulties in code maintenance and > > evolution... > > > But it must be subtilities in your approach that I don't catch up to > > now...? > > > Thanks in advance for your explanations, > > > Michel > > > PS: > > I look for example in: > > package com.claymus.site.module.page; > > (...) > > @PersistenceCapable(detachable = "true") > > public class Page extends PersistentCapable { > > (...) > > public void serve(List> contents, List> > > blocks, Theme theme) throws ServletException, IOException { > > > PrintWriter out = ClaymusMain.getResponse().getWriter(); > > > // DOC TYPE > > out.print(getDocType()); > > > out.print(""); > > (...) > > > On Jul 18, 5:50 pm, Prashant wrote: > > > Yes, you are right. Picking an opensource project and making it work for > > you > > > is very easy, but making something from scratch has its own fun :) . I > > > stared building Claymus because I felt need of Java based CMS which is > > made > > > for GAE, considering what GAE is, how it is different from other hosting > > > services, services/apis GAE is providing to developers, etc. etc. etc. > > > > Claymus is designed to give you maximum flexibility and support to build > > > your app on top of Claymus. Along with all the GAE features you can take > > > advantage of Servlet Level caching to minimize delay and cpu usage, > > plugable > > > modules and themes, etc ... (complete list will be put on updated Claymus > > > Website :) ). > > > > Regards, > > > Prashant > > > > On Mon, Jul 18, 2011 at 7:28 PM, Niklas Rosencrantz > >wrote: > > > > > Having something like a CMS eg like wordpress, joomla or mediawiki > > > > compatible then we won't have to start every project from
[appengine-java] Re: Blobstore: storing multiple blobs, retrieving blobkeys in doGet, form dissappears in appspot deployment
Hi Lkai, others, Any follow up or information on why I'm facing this issue in Blobstore? I'm not able to figure it out yet. I'am only able to get a list of files uploaded in the most recent session, not the earlier uploads Thanks in advance, -Rajesh TN On Jul 8, 11:55 pm, "Ikai Lan (Google)" wrote: > Can you post your source code? > > Ikai Lan > Developer Programs Engineer, Google App Engine > Blog:http://googleappengine.blogspot.com > Twitter:http://twitter.com/app_engine > Reddit:http://www.reddit.com/r/appengine > > On Fri, Jul 8, 2011 at 2:32 AM, Rajesh T N wrote: > > > > > > > > > Hi, > > > I'm a newbie to appengine and currently experimanting with Blobstore APIs. > > I have 4 queries > > > 1. When I upload a file to blob, and try getting uploaded blobs in doPost > > of the corresponding action servlet, I get only the latest file uploaded. > > The earlier files uploaded are not retrievable from Blobstore. Am I missing > > any fundamental concept here? This was observed in localhost cloud > > simulation. > > 2. When I try to get uploaded blobs from blobstore in doGet of a servlet, I > > get an illegal state exception which says that I can do this operation after > > uploading a blob. Why is this? What do I do to get a list of uploaded blobs > > from blobstore in a doGet API? > > 3. When I deployed the app to appspot, the upload form itself was not > > visible. The getUploadURL in the jsp seems to fail. > > 4. Why is an error indicated on my JSP file which says that permission is > > required to run JSP files, but still does run in development server (Couls > > this be the reason that the form became invisible as given in query 3?). > > What setting should I do in eclipse to prevent this error? > > > Regards, > > -Rajesh > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine for Java" group. > > To view this discussion on the web visit > >https://groups.google.com/d/msg/google-appengine-java/-/v-VqxMLRftQJ. > > To post to this group, send email to > > google-appengine-java@googlegroups.com. > > To unsubscribe from this group, send email to > > google-appengine-java+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.