[appengine-java] Re: Can we use the bulkuploader on the local environment?
Yes, you can. http://code.google.com/intl/de-DE/appengine/docs/python/tools/uploadingdata.html#Downloading_and_Uploading_All_Data appcfg.py download_data --url=http://127.0.0.1/[remote_api_path] -- filename=data-filename --kind=KIND appcfg.py upload_data --url=http://127.0.0.1/[remote_api_path] -- filename=data-filename On local download, you have to set the kind parameter. On upload you mustn't. -- 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.
Re: [appengine-java] Re: Backends.xml ERROR when deploying
Don, Thanks for helping us out getting backends running. I tried the targetbackendname/target parameter and it seems to work intermittently. I tried running the urls that would be run in the task queues and get a 503 error (below) every time. Is this something that can happen when the backend is busy? Is there a limit to how many requests a backend can handle? Thanks again, Jake Error: Server ErrorThe service you requested is not available yet. Please try again in 30 seconds. -- 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.
Re: [appengine-java] Re: Backends.xml ERROR when deploying
here's more about URLFetch http://code.google.com/appengine/docs/java/urlfetch/overview.html Also, for code samples, Ikai Lan's blog is great: http://ikaisays.com/2010/06/29/using-asynchronous-urlfetch-on-java-app-engine/ Happy coding. -- 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 instances memory usage
Hi everybody, I would like to know how much memory space do your Java instances use. Mines use from 75 to 90 MB of memory on average basis. Future billing rules might make these numbers more important than they are today. Thanx for your help. Francois -- 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: Can we use the bulkuploader on the local environment?
You can add the remote_api Service into your java project. Just add the following lines to web.xml servlet servlet-nameRemoteApiServlet/servlet-name servlet- classcom.google.apphosting.utils.remoteapi.RemoteApiServlet/servlet- class /servlet servlet-mapping servlet-nameRemoteApiServlet/servlet-name url-pattern/remote_api/url-pattern /servlet-mapping Then you have to use appcfg.py, so you need the python sdk. You don't need a python project, just the sdk is enough. -- 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.
Re: [appengine-java] Re: Can we use the bulkuploader on the local environment?
Heiko, Thanks for the help. Yes i have configured the python sdk and added the entries as mentioned. I will test how it works on local db setup. I will consult you if i need help Either ways i will let you know how my work went. Thanks On Tue, May 17, 2011 at 1:27 PM, Heiko Roth r...@egotec.com wrote: You can add the remote_api Service into your java project. Just add the following lines to web.xml servlet servlet-nameRemoteApiServlet/servlet-name servlet- classcom.google.apphosting.utils.remoteapi.RemoteApiServlet/servlet- class /servlet servlet-mapping servlet-nameRemoteApiServlet/servlet-name url-pattern/remote_api/url-pattern /servlet-mapping Then you have to use appcfg.py, so you need the python sdk. You don't need a python project, just the sdk is enough. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Simple Google App Engine Datastore operation taking too long: causing DeadlineExceededException/DatastoreTimeoutException
Quick update: The query interface works. I was able to run the query across all the entities and start iterating over them (so it must lazy load when iterating). However I could not do a size() on the collection returned, so there must be too many items in the collection now. I can work around the now redundant relationship of account.getOrders() by querying. Now to figure out the best way to add a child object without accessing the parent's collection of children. Maybe I should switch to JDO+MySQL before I get in too deep - is this a completely wrong application of GAE? -- 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.
Re: [appengine-java] Simple Google App Engine Datastore operation taking too long: causing DeadlineExceededException/DatastoreTimeoutException
Thanks for the reply. That's fair enough I can see why getOrders() in the add() method can be problematic. I actually thought it lazy loaded the collection under the covers, such that calling get() wouldn't actually fetch everything - looks like I was wrong about that. So I need to figure out how to refactor the add() code to add the order to the collection some other way. Any tips on that? Do I have to create my own Key that includes the parent Key? I still have the problem that as of right now I can not actually call account.getOrders() - for any reason, adding to it, or simply reading from it. It just freezes up, burns a bunch of CPU and then times out. Seems a bit of a waste even having the child relationship mapped. I'm just testing a Query approach right now, which I imagine is the query that would be running under the covers to access the orders of an account: Query query = pm.newQuery(Order.class); query.setFilter(account == accountKey); query.declareParameters(Key.class.getName() + accountKey); query.setOrdering(orderDate desc); I'll report back what I find out. Hopefully it allows me to get the accounts orders - if nothing else at least I can cursor through them with a query. -- 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] DeadlineExceededException on Jetty session loading
Hey Googlers, Do you know why we get these DeadlineExceededException when Jetty's trying to load session data from the datastore ? It looks like a bug as there is only Google App Engine code being executed here (see stacktrace below). And (still haven't got an answer about that) why does it have to kill and restart the instance when such exceptions occurs ? Doesn't seem to be optimal in threadsafe mode. Thanx for your help. Francois 1. 2011-05-17 02:00:14.483 Nested in javax.servlet.ServletException: com.google.apphosting.api.DeadlineExceededException: This request (fb27bd896bd3c1f8) started at 2011/05/17 08:59:44.654 UTC and was still executing at 2011/05/17 09:00:14.465 UTC.: com.google.apphosting.api.DeadlineExceededException: This request (fb27bd896bd3c1f8) started at 2011/05/17 08:59:44.654 UTC and was still executing at 2011/05/17 09:00:14.465 UTC. at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226) at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1037) at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1326) at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:232) at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:69) at com.google.appengine.tools.development.TimedFuture.get(TimedFuture.java:41) at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:64) at com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:67) at com.google.appengine.api.datastore.FutureHelper$CumulativeAggregateFuture.get(FutureHelper.java:136) at com.google.appengine.api.datastore.FutureHelper.getInternal(FutureHelper.java:71) at com.google.appengine.api.datastore.FutureHelper.quietGet(FutureHelper.java:32) at com.google.appengine.api.datastore.DatastoreServiceImpl$1.runInternal(DatastoreServiceImpl.java:78) at com.google.appengine.api.datastore.DatastoreServiceImpl$1.runInternal(DatastoreServiceImpl.java:75) at com.google.appengine.api.datastore.TransactionRunner.runInTransaction(TransactionRunner.java:31) at com.google.appengine.api.datastore.DatastoreServiceImpl.get(DatastoreServiceImpl.java:75) at com.google.appengine.api.datastore.DatastoreServiceImpl.get(DatastoreServiceImpl.java:62) at com.google.apphosting.runtime.jetty.SessionManager.loadSession(SessionManager.java:318) at com.google.apphosting.runtime.jetty.SessionManager.getSession(SessionManager.java:288) at org.mortbay.jetty.servlet.AbstractSessionManager.getHttpSession(AbstractSessionManager.java:237) at org.mortbay.jetty.servlet.SessionHandler.setRequestedId(SessionHandler.java:246) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:136) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238) 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 com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:260) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$2.handleRequest(RuntimePb.java:9669) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:439) at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:573) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448) at com.google.tracing.TraceContext.runInContext(TraceContext.java:688) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at
[appengine-java] Upload image to the Blobstore with the use of urlFetch.fetch();
i have a servlet in which i try to upload an image. i have pasted my servlet class here, that gets called from a jsp. form action=/testuploadmimevalidation?provider-key=testprovider method=post enctype=multipart/form-data public class TestUploadMimeValidation extends HttpServlet { private BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); private static final Logger log = Logger.getLogger(TestUploadMimeValidation.class.getName()); private static final boolean PRODUCTION_MODE = SystemProperty.environment.value() == SystemProperty.Environment.Value.Production; private static final String URL_PREFIX = PRODUCTION_MODE ? : http://127.0.0.1:8080;; public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { InputStream in = req.getInputStream(); int formDataLength = req.getContentLength(); byte dataBytes[] = new byte[formDataLength]; int len; ByteArrayOutputStream bos = new ByteArrayOutputStream(); while ((len = in.read(dataBytes, 0, formDataLength)) != -1) bos.write(dataBytes, 0, len); dataBytes = bos.toByteArray(); String urlStr = URL_PREFIX +BlobstoreServiceFactory.getBlobstoreService().createUploadUrl(/ testupload); URLFetchService urlFetch = URLFetchServiceFactory.getURLFetchService(); HTTPRequest request = new HTTPRequest(new URL(urlStr), HTTPMethod.POST, FetchOptions.Builder.withDeadline(10.0)); request.setHeader(new HTTPHeader(Content-Type,multipart/ form-data)); ByteArrayOutputStream baos = new ByteArrayOutputStream(); request.setPayload(dataBytes); try { urlFetch.fetch(request); } catch (IOException e) { // Need a better way of handling Timeout exceptions here - 10 second deadline //log.error(Possible timeout?,e); } } } the image loads fine into the Blobstore but i get a NullpointerException. i've read that a DoGet and a DoPost is required in the target servlet class (/testupload): http://jeremyblythe.blogspot.com/ I have implemented those but i keep getting the exception. am I not supplying enough parameters to the request object? there aren't many examples online where the blob is uploaded through a servlet by using the urlfetch.Fetch(). -- 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] post action not working in python
hii.. when i try to run the code in this page its giving an error during post action i.e during form submission.. http://code.google.com/appengine/docs/python/gettingstarted/handlingforms.html appspot server shows 500 Server error where as in my computer when i try to run with google app engine launcher... its entirely different.. it gives a big list of errors Traceback (most recent call last): File C:\Program Files (x86)\Google\google_appengine\google\appengine \tools\dev_appserver.py, line 4053, in _HandleRequest self._Dispatch(dispatcher, self.rfile, outfile, env_dict) File C:\Program Files (x86)\Google\google_appengine\google\appengine \tools\dev_appserver.py, line 3977, in _Dispatch base_env_dict=env_dict) File C:\Program Files (x86)\Google\google_appengine\google\appengine \tools\dev_appserver.py, line 588, in Dispatch base_env_dict=base_env_dict) File C:\Program Files (x86)\Google\google_appengine\google\appengine \tools\dev_appserver.py, line 3050, in Dispatch self._module_dict) this list is very big.. but i just shared four lines of it.. need help asap.. thanks in advance.. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-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: Getting class cast exception in BackendServersFilter after 1.5 sdk update
@Don I am getting the same error. Also using struts 2.0 and also noticed this after upgrading to 1.5. Should i send you the war or has someone else already sent it to you? On May 17, 2:13 am, Don Schwarz schwa...@google.com wrote: This is very strange. Can one of you send me your war directory? On Mon, May 16, 2011 at 12:14 PM, Nischal Shetty nischalshett...@gmail.comwrote: @Sean Let's hope someone from the GAE team helps us. They've been super busy the entire last week. Hoping someone helps us out soon. If you come across a possible solution please do update this thread, I'll do the same. On 16 May 2011 00:11, svoeller sean.voel...@gmail.com wrote: I'm experiencing the same issue - stack trace is identical. Also using struts 2.0 and also noticed this after attempting to upgrade to 1.5. On May 13, 11:32 am, Nischal nischalshett...@gmail.com wrote: GAE team, need your help here. -- 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. -- -Nischal +91-9920240474 twitter: NischalShetty http://twitter.com/nischalshetty facebook: Nischal http://facebook.com/nischal http://www.justunfollow.com http://www.buffr.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Backend instance and CPU hours
Hi all, I have create a backend instance and I use it in order to load data into the datastore. It works very well. However, from the Dashboard I have seen that the CPU time resource increase whereas only my backend instance is running. Is it a correct behavior? I was thinking the purpose of backends was to remove the CPU and memory restrictions (according to the backend class). Is it not true? Kind Regards, Laurent -- 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: UserService.getCurrentUser() returning null sometimes
If the user logins in your app and then in another tab logout from gmail (for example) you will get null when you do UserService.getCurrentUser() Could this be your trouble? -- 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: open source pdf engine for GAE
You could try iText: http://groups.google.com/group/google-appengine-java/browse_thread/thread/7dfdf19cfdd410d6/ee7024dd040ba6eb?lnk=gstq=pdf#ee7024dd040ba6eb http://code.google.com/appengine/docs/java/mail/usingjavamail.html On May 16, 7:11 pm, Vik vik@gmail.com wrote: Hie Trying to send a pdf created using pdfJet throws the exception class javax.mail.SendFailedException:Send failure (javax.mail.MessagingException: Converting attachment data failed) The code is like: MimeBodyPart htmlPart = new MimeBodyPart(); htmlPart.setFileName(whatever.pdf); htmlPart.setContent(out.toByteArray(), application/pdf); mp.addBodyPart(htmlPart); logged issuehttp://code.google.com/p/googleappengine/issues/list?cursor=1764upda... does not seems to help. Please advise. Thankx and Regards Vik Founderhttp://www.sakshum.orghttp://blog.sakshum.org On Sun, May 15, 2011 at 8:26 PM, Erick Fleming er...@sudogs.com wrote: You can use ByteArrayOutputStream [1http://download.oracle.com/javase/6/docs/api/java/io/ByteArrayOutputS...], then attach that to your mail message. If you are using low-level api, then Attrachment [2http://code.google.com/appengine/docs/java/javadoc/com/google/appengi...] has a constructor for this. [1] http://download.oracle.com/javase/6/docs/api/java/io/ByteArrayOutputS... [2] http://code.google.com/appengine/docs/java/javadoc/com/google/appengi... On Sun, May 15, 2011 at 9:16 AM, Vik vik@gmail.com wrote: Hie Just a little question. I am using this pdfJet thing. The requirement for us is to create a pdf and then mail it to a user. So i am done with pdf creation part and at then end i have the code like: OutputStream out = resp.getOutputStream(); PDF pdf = new PDF(out); some actual writing. pdf.flush(); out.close(); Now the question i have is after this step how do i actually get handle to the created pdf above and attach it to an email ? Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, Apr 20, 2010 at 1:52 PM, Patou patou.de.saint.ste...@gmail.comwrote: Hello In App Engine, You can't write a file to the file system. Otherwise the save method can't be used in GAE. Use this code to send the pdf to the navigator : pdf.wrap(); String fileName = Example_03.pdf; resp.setContentType(application/pdf); resp.setHeader(Content-Disposition, attachment; filename=\ + fileName + \); ServletOutputStream outs = resp.getOutputStream(); pdf.getData().writeTo(outs); Or to save to the datastore : new Blob(pdf.getData().toByteArray()); Bests Regards Patrice On Apr 20, 4:18 am, jeno jeno...@gmail.com wrote: Hi François , Thanks for your help. I have used PDFjet (PDFJet.jar version 2.72) PDF class missing save method So i cant call pdf.save(d.pdf) method. Cheers jeno On Apr 19, 6:48 pm, François Masurel fm2...@mably.com wrote: Hi Jeno, You can try the PDFjet Open Source Edition : http://pdfjet.com/os/edition.html François On 19 avr, 01:55, jeno jeno...@gmail.com wrote: Hi Guys, Anyone know open source java pdf engine for GAE. Thanks Jeno -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-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-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-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-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
Re: [appengine-java] Re: open source pdf engine for GAE
I think the problem is not with pdfJet it about sending pdf as an attachment via mail api on app engine Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, May 17, 2011 at 6:45 PM, Nichole nichole.k...@gmail.com wrote: You could try iText: http://groups.google.com/group/google-appengine-java/browse_thread/thread/7dfdf19cfdd410d6/ee7024dd040ba6eb?lnk=gstq=pdf#ee7024dd040ba6eb http://code.google.com/appengine/docs/java/mail/usingjavamail.html On May 16, 7:11 pm, Vik vik@gmail.com wrote: Hie Trying to send a pdf created using pdfJet throws the exception class javax.mail.SendFailedException:Send failure (javax.mail.MessagingException: Converting attachment data failed) The code is like: MimeBodyPart htmlPart = new MimeBodyPart(); htmlPart.setFileName(whatever.pdf); htmlPart.setContent(out.toByteArray(), application/pdf); mp.addBodyPart(htmlPart); logged issuehttp:// code.google.com/p/googleappengine/issues/list?cursor=1764upda... does not seems to help. Please advise. Thankx and Regards Vik Founderhttp://www.sakshum.orghttp://blog.sakshum.org On Sun, May 15, 2011 at 8:26 PM, Erick Fleming er...@sudogs.com wrote: You can use ByteArrayOutputStream [1 http://download.oracle.com/javase/6/docs/api/java/io/ByteArrayOutputS.. .], then attach that to your mail message. If you are using low-level api, then Attrachment [2 http://code.google.com/appengine/docs/java/javadoc/com/google/appengi...] has a constructor for this. [1] http://download.oracle.com/javase/6/docs/api/java/io/ByteArrayOutputS. .. [2] http://code.google.com/appengine/docs/java/javadoc/com/google/appengi. .. On Sun, May 15, 2011 at 9:16 AM, Vik vik@gmail.com wrote: Hie Just a little question. I am using this pdfJet thing. The requirement for us is to create a pdf and then mail it to a user. So i am done with pdf creation part and at then end i have the code like: OutputStream out = resp.getOutputStream(); PDF pdf = new PDF(out); some actual writing. pdf.flush(); out.close(); Now the question i have is after this step how do i actually get handle to the created pdf above and attach it to an email ? Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, Apr 20, 2010 at 1:52 PM, Patou patou.de.saint.ste...@gmail.comwrote: Hello In App Engine, You can't write a file to the file system. Otherwise the save method can't be used in GAE. Use this code to send the pdf to the navigator : pdf.wrap(); String fileName = Example_03.pdf; resp.setContentType(application/pdf); resp.setHeader(Content-Disposition, attachment; filename=\ + fileName + \); ServletOutputStream outs = resp.getOutputStream(); pdf.getData().writeTo(outs); Or to save to the datastore : new Blob(pdf.getData().toByteArray()); Bests Regards Patrice On Apr 20, 4:18 am, jeno jeno...@gmail.com wrote: Hi François , Thanks for your help. I have used PDFjet (PDFJet.jar version 2.72) PDF class missing save method So i cant call pdf.save(d.pdf) method. Cheers jeno On Apr 19, 6:48 pm, François Masurel fm2...@mably.com wrote: Hi Jeno, You can try the PDFjet Open Source Edition : http://pdfjet.com/os/edition.html François On 19 avr, 01:55, jeno jeno...@gmail.com wrote: Hi Guys, Anyone know open source java pdf engine for GAE. Thanks Jeno -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-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-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-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
[appengine-java] Re: UserService.getCurrentUser() returning null sometimes
No, I don't think so. This issue never occurred for me. I also spoke to my customer about the gmail logout. He said he has not logged out. The worst part is, you try the same operation by refreshing the browser or sending the same RPC, the RPC is successful. I can see these RPC success and errors logs. -Aswath On Tue, May 17, 2011 at 4:38 PM, nacho vela.igna...@gmail.com wrote: If the user logins in your app and then in another tab logout from gmail (for example) you will get null when you do UserService.getCurrentUser() Could this be your trouble? -- 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] migrating Axis 1.4 client app to GAE
Hi, I have a webservices client app that was created using Axis 1.4 which I am trying to migrate to GAE. 1) I was trying to use the example http://code.google.com/appengine/articles/soap.html and create a clinet app. I was parsing our WSDL file using wsimport tool. I got below error. Hence couldn't generate STUBs. parsing WSDL... [WARNING] src-resolve: Cannot resolve the name 'soapenc:Array' to a(n) 'type definition' component. line 24 of http://x.x.x.x:8080/axis/services/GetNameById?wsdl#types?schema2 [ERROR] undefined simple or complex type 'soapenc:Array' line 24 of http://x.x.x.x:8080/axis/services/GetNameById?wsdl [ERROR] undefined attribute 'soapenc:arrayType' line 25 of http://x.x.x.x:8080/axis/services/GetNameById?wsdl part of WSDL file that is being parsed where error is occuring: - schema targetNamespace=http://x.x.x.x:8080/axis/services/GetNameById; xmlns=http://www.w3.org/2001/XMLSchema; import namespace=urn:BeanService / import namespace=http://schemas.xmlsoap.org/soap/encoding/; / - complexType name=ArrayOfArrayOf_xsd_string - complexContent - restriction base=soapenc:Array attribute ref=soapenc:arrayType wsdl:arrayType=xsd:string[][] / /restriction /complexContent /complexType /schema 2)Since parsing is not working, I was trying to compile the source package generated by Axis 1.4. I couldn't compile source files and BUILD my web app in Eclipse as STUBS generated were using java.net.rmi package which is is not supported by GAE. Does any one has any suggestion to solve this issue. Thanks. -Rao -- 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] Disappearance of Entities
In the last two weeks I have seem to have lost 60 entities. The weird thing was that those entities were children of other entities which exists in the Data-Store. I determine they were lost due to the fact that there isn't any application logic that can delete them and they are tightly coupled to their parents in a transaction manner. I am concerned. My application is a production one, and I am paying for 3 instances only to make sure that data reliability/consistency will be part of the features I get. My application is not mission critical, and the traffic is rather low, so should I encounter issues like data reliability? I recently read about the high replication option, should I migrate my data to there? will it be more reliable? In addition I am making backups on a weekly basis, is there ability to view the backed up data? (besides uploading all of it to my application or a new one) -- 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] Queries and Indexes inquiry
at this link http://code.google.com/appengine/docs/java/datastore/queries.html i found that you can return query result with an easy way and add filter and so on and to get the result list : ListEntity results = datastore.prepare(query).asList(FetchOptions.Builder.withDefaults()); my question is here : i have java bean class called Offer how to cast result to be listOffer not listEntity how can i do this step ?? -- 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] Test accounts for App Engine applications
Hi, Is there a procedure to create test accounts for app engine app? I needed at least 4 google account test various roles. Creating 4 google account seems not logical, is there any approach? 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] Datastore viewer server error
Hi, I am browsing the entities using Data store viewer in my app admin. It thew error while browning one entity, what I found is there null value for email field. Any work around please ? -- 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: SpringMVC RESTful + JSP + GAE/J .. 404 not found on JSPs..
Quick question, do you have error.jsp in your /WEB-INF/view/jsp/ folder? Also, in your first method (TestController.testStringResult()) you misspelled redirect, which will also result in 404. Also, take off the leading / for the testModelAndView() and testString()...you're effectively looking for / WEB-INF/view/jsp//error.jsp (which should still resolve, but is not necessary and clouds up the code a bit) Mike! On May 15, 9:09 pm, jlc488 jlc...@gmail.com wrote: I've implemented a site using SpringMVC RESTful approaches. I did not need any view such as JSP or Velocity and stuff at that time. For some reason, I needed views using JSPs. Somehow It is showing 404 not found on JSPs or any views include HTMLs on Google AppEngine. My requirements are 1) It should work as RESTful approach which means It returns JSON formats of results according to the request. -- working like charm 2) It should be able to show the JSP result pages on such requests like clicking User status confirmation link. -- 404 not found. I suspect this would be the ViewResolver problems but I have no clue about which resolver and how to use it properly. My configurations are below. --- start of restTask-servlet.xml - context:annotation-config / bean class=org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandl erAdapter property name=messageConverters list ref bean=jsonHttpMessageConverter / ref bean=stringHttpMessageConverter / ref bean=formHttpMessageConverter / /list /property /bean bean id=jsonHttpMessageConverter class=org.springframework.http.converter.json.MappingJacksonHttpMessageCon verter/ bean id=stringHttpMessageConverter class=org.springframework.http.converter.StringHttpMessageConverter / bean id=formHttpMessageConverter class=org.springframework.http.converter.FormHttpMessageConverter / bean class=com.otuls.task.view.json.MyContentNegotiatingViewResolver property name=mediaTypes map entry key=html value=text/html / entry key=text value=text/plain / entry key=json value=application/json / /map /property property name=defaultContentType value=application/json / property name=defaultViews list bean class=com.otuls.task.view.json.JsonView / /list /property /bean bean class=org.springframework.web.servlet.view.InternalResourceViewResolver property name=order value=2 / property name=prefix value=/WEB-INF/view/jsp/ / property name=suffix value=.jsp / /bean - end of restTask-servlet.xml --- - start of JsonView Class --- public class JsonView extends AbstractView{ public static final String DEFAULT_CONTENT_TYPE = application/json; private ObjectMapper objectMapper = new ObjectMapper(); private JsonEncoding encoding = JsonEncoding.UTF8; private boolean prefixJson = false; private SetString renderedAttributes; public JsonView() { setContentType(DEFAULT_CONTENT_TYPE); } public void setObjectMapper(ObjectMapper objectMapper) { Assert.notNull(objectMapper, 'objectMapper' must not be null); this.objectMapper = objectMapper; } public void setEncoding(JsonEncoding encoding) { Assert.notNull(encoding, 'encoding' must not be null); this.encoding = encoding; } public void setPrefixJson(boolean prefixJson) { this.prefixJson = prefixJson; } /** * Sets the attributes in the model that should be rendered by this view. When set, all other model attributes will be * ignored. */ public void setRenderedAttributes(SetString renderedAttributes) { this.renderedAttributes = renderedAttributes; } @Override protected void prepareResponse(HttpServletRequest request, HttpServletResponse response) { response.setContentType(getContentType()); response.setCharacterEncoding(encoding.getJavaName()); } @Override protected void renderMergedOutputModel(MapString, Object model, HttpServletRequest request, HttpServletResponse response) throws Exception { model = filterModel(model); JsonGenerator generator = objectMapper.getJsonFactory().createJsonGenerator(response.getWriter()); if (prefixJson) {
Re: [appengine-java] Re: JSP page as Warmup Servlet
JSPs are compiled into servlet class files during deployment, not in each instance. Warmup requests are GET requests, so doGet() will be called. We recommend that you override service() instead, as the default implementation of doGet() calls it, but you can do either. And yes, warmup servlets can have admin auth-constraints, which will be bypassed automatically for legitimate warmup requests. On Tue, May 17, 2011 at 12:52 AM, Anders i...@blabline.com wrote: The documentation doesn't mention it (as far as I could see), but I take it that warmup servlets can be given admin auth-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-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.
Re: [appengine-java] Simple Google App Engine Datastore operation taking too long: causing DeadlineExceededException/DatastoreTimeoutException
I use JDO but I don't use the built in relationship handling. I manage my own relationships and use JDO just for the property/entity mapping part of it. It seems to make life a lot simpler when trying to get around these types of situations. If you can make the Orders not be children of the Account class and manage your own relationships that will make your life a lot easier in the long run even if it's more work initially and your code much faster and efficient, IMHO. Also, you might want to take a look Objectify. Others here seem to like it a lot. On Tue, May 17, 2011 at 1:38 AM, Ashley Schroder ashley.schro...@gmail.com wrote: Quick update: The query interface works. I was able to run the query across all the entities and start iterating over them (so it must lazy load when iterating). However I could not do a size() on the collection returned, so there must be too many items in the collection now. I can work around the now redundant relationship of account.getOrders() by querying. Now to figure out the best way to add a child object without accessing the parent's collection of children. Maybe I should switch to JDO+MySQL before I get in too deep - is this a completely wrong application of GAE? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Getting class cast exception in BackendServersFilter after 1.5 sdk update
I understand what's going on now. No need to send me more war files, but my thanks to Nischal for a great test case. Struts2 wraps the request with StrutsRequestWrapper, and apparently modifies getAttribute() calls to check XWork's ValueStack if there is no attribute with the specified name. XWork uses OGNL, and OGNL is trying to interpret the attribute name as an expression. We have some internal headers (e.g. X-AppEngine-BackendName) that we are also using as request attributes in some cases. As far as I can tell, this is allowed by the servlet spec. However, OGNL is interpreting the minus signs as subtraction and the unknown strings as 0 and returning a BigDecimal. Weird. Since XWork is returning a non-null value for one of our backend-related attributes we think this is a request that should be redirect to a backend, so we're going through some new code in 1.5 that isn't relevant in your application. However, we later fail because the attributes were of the wrong type. I will get this fixed in the next release, but I've been unable to find an easy workaround for you folks. There appears to be no way to disable the use of OGNL in Struts2. My best guess is that you can use the struts.valueStackFactory constant to register a custom ValueStackFactory that either does not use OGNL, or short-circuits this particular case. If you're not feeling very adventurous, I recommend that you remain on the 1.4.3 SDK for testing until 1.5.1 is released. On Mon, May 16, 2011 at 4:29 PM, Shashank sharma shash...@ebeedu.comwrote: @Don I am getting the same error. Also using struts 2.0 and also noticed this after upgrading to 1.5. Should i send you the war or has someone else already sent it to you? On May 17, 2:13 am, Don Schwarz schwa...@google.com wrote: This is very strange. Can one of you send me your war directory? On Mon, May 16, 2011 at 12:14 PM, Nischal Shetty nischalshett...@gmail.comwrote: @Sean Let's hope someone from the GAE team helps us. They've been super busy the entire last week. Hoping someone helps us out soon. If you come across a possible solution please do update this thread, I'll do the same. On 16 May 2011 00:11, svoeller sean.voel...@gmail.com wrote: I'm experiencing the same issue - stack trace is identical. Also using struts 2.0 and also noticed this after attempting to upgrade to 1.5. On May 13, 11:32 am, Nischal nischalshett...@gmail.com wrote: GAE team, need your help here. -- 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. -- -Nischal +91-9920240474 twitter: NischalShetty http://twitter.com/nischalshetty facebook: Nischal http://facebook.com/nischal http://www.justunfollow.com http://www.buffr.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send 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] Re: Getting class cast exception in BackendServersFilter after 1.5 sdk update
@Don Happy to know you could find the problem. I'll stick to the previous sdk till you guys get 1.5.1 out (the wait is gonna be harder considering all the goodness packed into 1.5). Once again, thanks a lot for looking into this. On 17 May 2011 22:05, Don Schwarz schwa...@google.com wrote: I understand what's going on now. No need to send me more war files, but my thanks to Nischal for a great test case. Struts2 wraps the request with StrutsRequestWrapper, and apparently modifies getAttribute() calls to check XWork's ValueStack if there is no attribute with the specified name. XWork uses OGNL, and OGNL is trying to interpret the attribute name as an expression. We have some internal headers (e.g. X-AppEngine-BackendName) that we are also using as request attributes in some cases. As far as I can tell, this is allowed by the servlet spec. However, OGNL is interpreting the minus signs as subtraction and the unknown strings as 0 and returning a BigDecimal. Weird. Since XWork is returning a non-null value for one of our backend-related attributes we think this is a request that should be redirect to a backend, so we're going through some new code in 1.5 that isn't relevant in your application. However, we later fail because the attributes were of the wrong type. I will get this fixed in the next release, but I've been unable to find an easy workaround for you folks. There appears to be no way to disable the use of OGNL in Struts2. My best guess is that you can use the struts.valueStackFactory constant to register a custom ValueStackFactory that either does not use OGNL, or short-circuits this particular case. If you're not feeling very adventurous, I recommend that you remain on the 1.4.3 SDK for testing until 1.5.1 is released. On Mon, May 16, 2011 at 4:29 PM, Shashank sharma shash...@ebeedu.comwrote: @Don I am getting the same error. Also using struts 2.0 and also noticed this after upgrading to 1.5. Should i send you the war or has someone else already sent it to you? On May 17, 2:13 am, Don Schwarz schwa...@google.com wrote: This is very strange. Can one of you send me your war directory? On Mon, May 16, 2011 at 12:14 PM, Nischal Shetty nischalshett...@gmail.comwrote: @Sean Let's hope someone from the GAE team helps us. They've been super busy the entire last week. Hoping someone helps us out soon. If you come across a possible solution please do update this thread, I'll do the same. On 16 May 2011 00:11, svoeller sean.voel...@gmail.com wrote: I'm experiencing the same issue - stack trace is identical. Also using struts 2.0 and also noticed this after attempting to upgrade to 1.5. On May 13, 11:32 am, Nischal nischalshett...@gmail.com wrote: GAE team, need your help here. -- 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. -- -Nischal +91-9920240474 twitter: NischalShetty http://twitter.com/nischalshetty facebook: Nischal http://facebook.com/nischal http://www.justunfollow.com http://www.buffr.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send 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. -- -Nischal +91-9920240474 twitter: NischalShetty http://twitter.com/nischalshetty facebook: Nischal http://facebook.com/nischal http://www.justunfollow.com http://www.buffr.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to
Re: [appengine-java] DeadlineExceededException on Jetty session loading
On Tue, May 17, 2011 at 4:08 AM, Francois Masurel f.masu...@gmail.comwrote: Hey Googlers, Do you know why we get these DeadlineExceededException when Jetty's trying to load session data from the datastore ? It looks like a bug as there is only Google App Engine code being executed here (see stacktrace below). Any given entity in the datastore may be unavailable periodically, so this doesn't necessarily indicate a bug unless it occurs frequently. However, the High Replication datastore is far less sensitive to unavailability in any given data center so I would strongly recommend that you switch to it if you're sensitive to datastore latency outliers. And (still haven't got an answer about that) why does it have to kill and restart the instance when such exceptions occurs ? Doesn't seem to be optimal in threadsafe mode. Yes, it is sub-optimal, but as we are currently using Thread.stop() it is really unsafe to continue using the same Java VM for subsequent requests. We're considering having an additional deadline mechanism, perhaps based on Thread.interrupt(), which you could opt into that would let us avoid this. Feel free to file a bug about that if you're uncomfortable with the current level of JVM shutdowns for your application. -- 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.
Re: [appengine-java] Re: JSP page as Warmup Servlet
Ok. Excellent. -- 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.
Re: [appengine-java] DeadlineExceededException on Jetty session loading
Hi Don, Thanx for your answer. Actually I'm testing an HR application and I get these errors quite often on load increase. Could you explain why datastore entity are unavailable periodically ? And why we have to wait 30s to know that these entities are unavailable ? What is really annoying is that when an instance is restarted all pending requests/threads are also stopped which results in a lot of additionnal errors. And when you had only one instance running, all further requests throw 500 errors while we are waiting for a new instance to be started. I really hope you'll find a more optimal way to manage DeadlineExceededException. I've filed a bug : http://code.google.com/p/googleappengine/issues/detail?id=5066 Thanx again for your help. Francois -- 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.
Re: [appengine-java] Backend instance and CPU hours
Because the datastore is a network of servers separate from your backend process, we still charge for the CPU usage that your API calls incur on those servers. We do not, however, charge for CPU cycles (or RAM) consumed by your backend process itself. This should become more clear in the future. On Tue, May 17, 2011 at 5:41 AM, Laurent Pellegrino laurent.pellegr...@gmail.com wrote: Hi all, I have create a backend instance and I use it in order to load data into the datastore. It works very well. However, from the Dashboard I have seen that the CPU time resource increase whereas only my backend instance is running. Is it a correct behavior? I was thinking the purpose of backends was to remove the CPU and memory restrictions (according to the backend class). Is it not true? Kind Regards, Laurent -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: Vs: Re: Vs: Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?
Ok. My change to PMF.java to synchronize the get of the PersistenceManager did NOT correct the problem. Going to fallback to synchronizing every usage of the PersistenceManager (reads and writes). sigh/ Will update this issue with any further results. On May 17, 1:54 am, Stephen Johnson onepagewo...@gmail.com wrote: Ah, I missed the point about it being tasks and didn't realize the threadsafe only applied to user requests and not tasks. If indeed that was the case. On Mon, May 16, 2011 at 10:44 PM, Juha K juha.kosk...@gmail.com wrote: The datanucleus issue has a comment Then, when my tasks run in parallel, initialisation has already been done and the problem doesn't appear any more., so before the threadsafe property, only tasks were run in parallel. Probably that's why I didn't see this error before, I didn't have tasks doing db access. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Change where Deploy is built
It seems that whenever I deploy, the build files are all being saved to my local settigns/Temp folder. Is there a way to change where these files are saved? My C folder is very full and building to this folder takes a long time. I think I could deploy much faster if these files were written to the same folder the project is saved in or at least the same drive. -- 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.
Re: [appengine-java] Re: open source pdf engine for GAE
Hie I am doing exact same. Here is the code: log.info(start of PDFTest:); //OutputStream out = resp.getOutputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream(); PDF pdf; try { pdf = new PDF(out); log.info(#1); pdf.setTitle(Using TextColumn and Paragraph classes); pdf.setSubject(Examples); pdf.setAuthor(Innovatics Inc.); log.info(#2); String fileName = images/share_facebook.png; Image image1 = new Image(pdf, new BufferedInputStream( getClass().getResourceAsStream(fileName)), ImageType.PNG); log.info(#3); Font f1 = new Font(pdf, new BufferedInputStream(getClass().getResourceAsStream( fonts/DroidFonts/DroidSerif-Regular.otf)), CodePage.UNICODE, Embed.YES); Page page = new Page(pdf, Letter.PORTRAIT); f1.setSize(10); image1.setPosition(90, 35); image1.scaleBy(0.75); image1.drawOn(page); TextColumn column = new TextColumn(f1); column.setLineBetweenParagraphs(false); Paragraph p1 = new Paragraph(); p1.setAlignment(Align.CENTER); p1.add(new TextLine(f1, Switzerland)); Paragraph p2 = new Paragraph(); p2.add(new TextLine(f1, Introduction)); Paragraph p4 = new Paragraph(); p4.add(new TextLine(f1, Economy)); Paragraph p5 = new Paragraph(); p5.setAlignment(Align.JUSTIFY); text = new TextLine(f1); column.setSize(470, 100); Point point1 = new Point(90, 300); // TextColumn start point Point point2 = column.sizeOn(page); // TextColumn end point Line line = new Line( point1.getX(), point1.getY() + point2.getY(), point1.getX() + point2.getX(), point1.getY() + point2.getY()); line.drawOn(page); column.drawOn(page); pdf.flush(); Multipart mp = new MimeMultipart(); MimeBodyPart htmlPart = new MimeBodyPart(); htmlPart.setFileName(whatever.pdf); log.info(#7); htmlPart.setContent(out.toByteArray(), application/pdf); mp.addBodyPart(htmlPart); log.info(#8); Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); Message msg = new MimeMessage(session); msg.setContent(mp); msg.setFrom(new InternetAddress(vik@gmail.com)); msg.addRecipient(Message.RecipientType.TO, new InternetAddress(vik@gmail.com)); msg.setSubject(testing PDF system); Transport.send(msg); System.out.println(Sucessfully Sent mail to All Users); Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, May 17, 2011 at 9:30 PM, Stephen Johnson onepagewo...@gmail.comwrote: Vik, Post your code where you're creating the ByteArrayOutputStream and creating the PDF with it. It'll be more helpful then what you've posted. I'm a little concerned you still don't have this part correct since you're still using out as a variable name. You're code should be similar to: ByteArrayOutputStream baos = new ByteArrayOutputStream(); /* this part is from your previous email. I don't use PDFJet so I can't validate this code for you */ PDF pdf = new PDF(baos); some actual writing. pdf.flush(); /* taken from docs */ Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); String msgBody = ...; try { Message msg = new MimeMessage(session); msg.setFrom(new InternetAddress(ad...@example.com, Example.com Admin)); msg.addRecipient(Message.RecipientType.TO, new InternetAddress(u...@example.com, Mr. User)); msg.setSubject(Your Example.com account has been activated); msg.setText(msgBody); Multipart mp = new MimeMultipart(); // Get the PDF data byte[] attachmentData = baos.toByteArray(); MimeBodyPart attachment = new MimeBodyPart(); attachment.setFileName(manual.pdf); attachment.setContent(attachmentData, application/pdf); mp.addBodyPart(attachment); message.setContent(mp); Transport.send(msg); } catch (AddressException e) { // .. } catch (MessagingException e) { // ... } On Tue, May 17, 2011 at 6:19 AM, Vik vik@gmail.com wrote: I think the problem is not with pdfJet it about sending pdf as an attachment via mail api on app engine Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, May 17, 2011 at 6:45 PM, Nichole nichole.k...@gmail.com wrote: You could try iText:
Re: [appengine-java] Re: open source pdf engine for GAE
Try not adding the image or the font. Just try to get as simple a PDF working as possible. On Tue, May 17, 2011 at 9:47 PM, Vik vik@gmail.com wrote: Hie I am doing exact same. Here is the code: log.info(start of PDFTest:); //OutputStream out = resp.getOutputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream(); PDF pdf; try { pdf = new PDF(out); log.info(#1); pdf.setTitle(Using TextColumn and Paragraph classes); pdf.setSubject(Examples); pdf.setAuthor(Innovatics Inc.); log.info(#2); String fileName = images/share_facebook.png; Image image1 = new Image(pdf, new BufferedInputStream( getClass().getResourceAsStream(fileName)), ImageType.PNG); log.info(#3); Font f1 = new Font(pdf, new BufferedInputStream(getClass().getResourceAsStream( fonts/DroidFonts/DroidSerif-Regular.otf)), CodePage.UNICODE, Embed.YES); Page page = new Page(pdf, Letter.PORTRAIT); f1.setSize(10); image1.setPosition(90, 35); image1.scaleBy(0.75); image1.drawOn(page); TextColumn column = new TextColumn(f1); column.setLineBetweenParagraphs(false); Paragraph p1 = new Paragraph(); p1.setAlignment(Align.CENTER); p1.add(new TextLine(f1, Switzerland)); Paragraph p2 = new Paragraph(); p2.add(new TextLine(f1, Introduction)); Paragraph p4 = new Paragraph(); p4.add(new TextLine(f1, Economy)); Paragraph p5 = new Paragraph(); p5.setAlignment(Align.JUSTIFY); text = new TextLine(f1); column.setSize(470, 100); Point point1 = new Point(90, 300); // TextColumn start point Point point2 = column.sizeOn(page); // TextColumn end point Line line = new Line( point1.getX(), point1.getY() + point2.getY(), point1.getX() + point2.getX(), point1.getY() + point2.getY()); line.drawOn(page); column.drawOn(page); pdf.flush(); Multipart mp = new MimeMultipart(); MimeBodyPart htmlPart = new MimeBodyPart(); htmlPart.setFileName(whatever.pdf); log.info(#7); htmlPart.setContent(out.toByteArray(), application/pdf); mp.addBodyPart(htmlPart); log.info(#8); Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); Message msg = new MimeMessage(session); msg.setContent(mp); msg.setFrom(new InternetAddress(vik@gmail.com)); msg.addRecipient(Message.RecipientType.TO, new InternetAddress(vik@gmail.com)); msg.setSubject(testing PDF system); Transport.send(msg); System.out.println(Sucessfully Sent mail to All Users); Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, May 17, 2011 at 9:30 PM, Stephen Johnson onepagewo...@gmail.com wrote: Vik, Post your code where you're creating the ByteArrayOutputStream and creating the PDF with it. It'll be more helpful then what you've posted. I'm a little concerned you still don't have this part correct since you're still using out as a variable name. You're code should be similar to: ByteArrayOutputStream baos = new ByteArrayOutputStream(); /* this part is from your previous email. I don't use PDFJet so I can't validate this code for you */ PDF pdf = new PDF(baos); some actual writing. pdf.flush(); /* taken from docs */ Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); String msgBody = ...; try { Message msg = new MimeMessage(session); msg.setFrom(new InternetAddress(ad...@example.com, Example.com Admin)); msg.addRecipient(Message.RecipientType.TO, new InternetAddress(u...@example.com, Mr. User)); msg.setSubject(Your Example.com account has been activated); msg.setText(msgBody); Multipart mp = new MimeMultipart(); // Get the PDF data byte[] attachmentData = baos.toByteArray(); MimeBodyPart attachment = new MimeBodyPart(); attachment.setFileName(manual.pdf); attachment.setContent(attachmentData, application/pdf); mp.addBodyPart(attachment); message.setContent(mp); Transport.send(msg); } catch (AddressException e) { // .. } catch (MessagingException e) { // ... } On Tue, May 17, 2011 at 6:19 AM, Vik vik@gmail.com wrote: I think the problem is not with pdfJet it about sending pdf as an attachment via mail api on app engine
[appengine-java] grails project does not work
I deployed a very simple grails project. but it does not work. Here is the error. Please help! [s~yaodongyi/1.350490081779577768].stdout: 2011-05-18 04:55:01,567 [pool-4-thread-1] ERROR context.ContextLoader - Context initialization failed org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NoClassDefFoundError: Could not initialize class org.grails.appengine.AppEngineEntityManagerFactory at org.codehaus.groovy.grails.web.context.GrailsContextLoader.createWebApplicationContext(GrailsContextLoader.java:87) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:191) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:168) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:123) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:260) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$2.handleRequest(RuntimePb.java:9669) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:439) at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:573) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448) at com.google.tracing.TraceContext.runInContext(TraceContext.java:688) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NoClassDefFoundError: Could not initialize class org.grails.appengine.AppEngineEntityManagerFactory at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:97) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058) at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1070) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) at groovy.lang.Closure.call(Closure.java:282) at groovy.lang.Closure.call(Closure.java:277) at grails.spring.BeanBuilder.invokeBeanDefiningClosure(BeanBuilder.java:723) at grails.spring.BeanBuilder.beans(BeanBuilder.java:573) at grails.spring.BeanBuilder.invokeMethod(BeanBuilder.java:519) at org.codehaus.groovy.grails.plugins.DefaultGrailsPlugin.doWithRuntimeConfiguration(DefaultGrailsPlugin.java:600) at org.codehaus.groovy.grails.plugins.AbstractGrailsPluginManager.doRuntimeConfiguration(AbstractGrailsPluginManager.java:107) at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:153) at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:124) at org.codehaus.groovy.grails.web.context.GrailsConfigUtils.configureWebApplicationContext(GrailsConfigUtils.java:120) at org.codehaus.groovy.grails.web.context.GrailsContextLoader.createWebApplicationContext(GrailsContextLoader.java:73) ... 23 more Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.grails.appengine.AppEngineEntityManagerFactory at com.google.appengine.runtime.Request.process-50966ffebed3abee(Request.java) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:109) at AppEngineGrailsPlugin$_closure4.class$(AppEngineGrailsPlugin.groovy) at