[appengine-java] In an application using the High Replication Datastore, the blobstore is eventually consistent too?
Hi everyone, In an application using the High Replication Datastore, the blobstore is eventually consistent too or it is strongly consistent? or simply: it is possible that in the servlet called after uploading a blob this line: Image im = ImagesServiceFactory.makeImageFromBlob(blobKey); could try to create an Image from a blob not yet available (like when you try to get an entity you just put into the datastore)? 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/-/ZjFXJlUT-a0J. 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: Storing query results in memcache
Thanks for your help. I'll go with Ian's suggestion, storing arrays in the memcache. -- 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/-/8R5rRrRrb00J. 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: Storing query results in memcache
Hi Ian, Thanks for sharing your strategy.. I am not sure if I understand exactly how could I use your system to solve my problem. Actually, the memcache concept is working nice solving similar, but simpler situations. I think I explained poorly my situation. Here it is: An application manages contacts. It actually has thousands of them. On the GUI side we have a listview, an editview and a createview. The list view has 4 columns, and is paged (30 records per page) and by default is sorted ascending by the first column. I can search the listview by issuing queries serverside (I want the results always ordered and paged accordingly). Now, a user clicks on new contact. The application goes into createView. Data input then save. Application goes to list view. The contact should have been in the first page, but it isn't. After a few seconds, it appears. The previous example with phone numbers is kind of the same issue, but with simpler queries: User modifies a contact by adding some phone numbers. Hits save and goes to list view, then he remembers that one number was wrong and goes back to editing the same contact. The phone numbers inserted seconds ago aren't there. In this case, (since for other reasons I the phone numbers entities cannot be children of the contact entity) every phone number entity has a property called contactId that points to the father contact. The solution employed in this simple case is storing in the memcache the phone numbers by using contact-based keys so that for example [code] memcache.get(MEMCACHE_phones_contactId_1234) [/code] would give me an all the phone numbers for contact having id=1234. Somehow (too long and boring to explain how) I manage to keep this array always up to date so when the user returns lightning-fast to the editview the newly inserted phone number are there, only that they are read from the memcache. Analogically, how could this be done for the fore-mentioned listview situation, where the query is much more complex? Hope I didn't confused you more.. Thanks, Cristian -- 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/-/3kOA7GAMTQUJ. 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] Storing query results in memcache
Hi, I just moved my app to HRD and I am trying to use the memcache to overcome the eventual consistency problem.. When it comes to get-by-id queries the solution is very simple. The problem appears when I insert an entity and I want to appear in the results of more complex queries. Because using entity groups is not the answer in certain situations I had to use some sort of foreign keys.. So far I thought of a system that gets an unique id from the query based on its FilterPredicates (eg: MEMCACHE_PHONE_NUMBERS_contactId_12345) and then uses that to update or read the entities from there. I would build this system by doing my own implementation of the DatastoreService interface and attach the memcache management on the various put/delete/get methods. I don't want to reinvent the wheel. Is there anything already done that I could use? If anybody has any suggestions feel free to enlighten me ;) Thanks, Cristian. -- 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/-/kpbaU9bSK2YJ. 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] Payment Problem
Hi everyone, Since yesterday I saw that I owe to google 2.4$ and that the payment failed. When I go to Billing Settings I see this message: On this page you can set your weekly spend to any value at or below $0.00. If you want to raise the weekly spend above $0.00, you will have to adjust it once you have finished taking over as billing administrator. Also, there is another message: Since the last billing adminstrator had a payment fail, there isn't a billing administrator. What does it mean? It looks to me like a bug on appengine's side, because I double checked my credit card it is fully functional. I need to increase my daily budget because I want to move my application to the high replication datastore as the master/slave is slow and makes me losing 1-2 potential customers every day. Could someone please let me know something? appid: domodentweb Thank you very much and keep up the good work. Nicanor Cristian Babula. -- 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't deploy again despite fix announcement
Hi, Same situation here. AppID: domodentweb Regards, Cristian Babula. On 15 Nov, 10:30, Didier Durand durand.did...@gmail.com wrote: Hi, A fix was announced for the issue around appl deployment via console:http://groups.google.com/group/google-appengine-downtime-notify/brows... I still get errors and can't deploy. I get message Received IOException parsing the input stream for /war/WEB-INF/web.xml Can somebody from Google update us on the issue ? regards didier -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Timeout while deploying
Hi, Sure thing! appId: domodentweb and here is appengine.xml: [code] ?xml version=1.0 encoding=utf-8? appengine-web-app xmlns=http://appengine.google.com/ns/1.0; applicationdomodentweb/application version2g/version sessions-enabledtrue/sessions-enabled precompilation-enabledtrue/precompilation-enabled !-- Configure java.util.logging -- system-properties property name=java.util.logging.config.file value=WEB-INF/ logging.properties/ property name=com.google.gdata.DisableCookieHandler value=true/ /system-properties admin-console page name=Gestione account url=/admin/ / page name=Importazione treatments url=/admin/ importTreatments.jsp / /admin-console /appengine-web-app [/code] On 12 Nov, 21:38, Joakim Söderström joakim.soderst...@gmail.com wrote: Sure, here are the appengine-web.xml files of our two main apps. I hope this helps! //Joakim 2010/11/12 Ikai Lan (Google) ikai.l+gro...@google.comikai.l%2bgro...@google.com Do you guys have a sample appengine-web.xml and application IDs? -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger:http://googleappengine.blogspot.com Reddit:http://www.reddit.com/r/appengine Twitter:http://twitter.com/app_engine On Fri, Nov 12, 2010 at 2:00 AM, Didier Durand durand.did...@gmail.comwrote: Hi Same thing here: I noticed that the messages in the deploying script have changed a little bit. I guess that Google team has made / is making an update on the infrastructure and it brings some issues... Some patience will probably solve it ;-) didier On Nov 12, 10:43 am, nicanor.babula nicanor.bab...@gmail.com wrote: Hi, I am experiencing the same problem with my application ID: domodentweb com.google.apphosting.utils.config.AppEngineConfigException: Received IOException parsing the input stream for G:/eclipseWorkspaces/ workspace_jee_galileo/domodentweb/war\WEB-INF/web.xml at com.google.apphosting.utils.config.AbstractConfigXmlReader.getTopLevelNode( AbstractConfigXmlReader.java: 210) at com.google.apphosting.utils.config.AbstractConfigXmlReader.parse(AbstractCo nfigXmlReader.java: 228) at com.google.apphosting.utils.config.WebXmlReader.processXml(WebXmlReader.jav a: 142) at com.google.apphosting.utils.config.WebXmlReader.processXml(WebXmlReader.jav a: 22) at com.google.apphosting.utils.config.AbstractConfigXmlReader.readConfigXml(Ab stractConfigXmlReader.java: 111) at com.google.apphosting.utils.config.WebXmlReader.readWebXml(WebXmlReader.jav a: 73) at com.google.appengine.tools.admin.Application.init(Application.java: 105) at com.google.appengine.tools.admin.Application.readApplication(Application.ja va: 151) at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.createAppAdmin( AppEngineBridgeImpl.java: 204) at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngin eBridgeImpl.java: 265) at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(De ployProjectJob.java: 146) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorksp aceJob.java: 38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(UnknownSource) at sun.net.www.http.HttpClient.openServer(UnknownSource) at sun.net.www.http.HttpClient.init(Unknown Source) at sun.net.www.http.HttpClient.New(UnknownSource) at sun.net.www.http.HttpClient.New(UnknownSource) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source
[appengine-java] Re: Timeout while deploying
Hi, I am experiencing the same problem with my application ID: domodentweb com.google.apphosting.utils.config.AppEngineConfigException: Received IOException parsing the input stream for G:/eclipseWorkspaces/ workspace_jee_galileo/domodentweb/war\WEB-INF/web.xml at com.google.apphosting.utils.config.AbstractConfigXmlReader.getTopLevelNode(AbstractConfigXmlReader.java: 210) at com.google.apphosting.utils.config.AbstractConfigXmlReader.parse(AbstractConfigXmlReader.java: 228) at com.google.apphosting.utils.config.WebXmlReader.processXml(WebXmlReader.java: 142) at com.google.apphosting.utils.config.WebXmlReader.processXml(WebXmlReader.java: 22) at com.google.apphosting.utils.config.AbstractConfigXmlReader.readConfigXml(AbstractConfigXmlReader.java: 111) at com.google.apphosting.utils.config.WebXmlReader.readWebXml(WebXmlReader.java: 73) at com.google.appengine.tools.admin.Application.init(Application.java: 105) at com.google.appengine.tools.admin.Application.readApplication(Application.java: 151) at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.createAppAdmin(AppEngineBridgeImpl.java: 204) at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java: 265) at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java: 146) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java: 38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.init(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl $DTDDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source) at org.mortbay.xml.XmlParser.parse(XmlParser.java:230) at com.google.apphosting.utils.config.AbstractConfigXmlReader.getTopLevelNode(AbstractConfigXmlReader.java: 206) ... 12 more On 10 Nov, 08:38, Joakim S?derstr?m joakim.soderst...@gmail.com wrote: Since yesterday, I've been experiencing difficulty while trying to use appcfg to deploy a new version to App Engine. Sometimes I have to try something like 10 times before the upload is successful. The error that I get seems to be caused by a timeout. Complete stacktrace: Reading application configuration data... Nov 10, 2010 8:32:55 AM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml INFO: Successfully processed war/WEB-INF/appengine-web.xml 2010-11-10 08:32:55.723:INFO::Logging to STDERR via org.mortbay.log.StdErrLog Nov 10, 2010 8:33:16 AM com.google.apphosting.utils.config.AbstractConfigXmlReader getTopLevelNode SEVERE: Received IOException parsing the input stream for war/WEB-INF/web.xml java.net.ConnectException: Connection timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310 ) at
[appengine-java] Re: Recommended maximum number of entities in an entity group
Acually, I forgot about the fact that while a transaction is going on, all entities involved are locked. Therefore, I considered changing my database structure in order to get more, but smaller entity groups (every parentEntity will have at most 20-30 childs). That way, will be easier and faster to use transactions. On 22 Ott, 19:54, Ikai Lan (Google) ikai.l+gro...@google.com wrote: Cyrille is right: have an expectation of 1 transaction/second, though real world performance should be below this. App Engine favors a model of eventual consistency. You don't get to scale by locking a ton of entities at once. -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger:http://googleappengine.blogspot.com Reddit:http://www.reddit.com/r/appengine Twitter:http://twitter.com/app_engine On Fri, Oct 22, 2010 at 3:54 AM, Cyrille Vincey crll...@gmail.com wrote: From my experience : I do NOT expect a better write performance than 1 transaction/second when creating entities inside one given entity group (with 1 entity created in each transaction). In your case : if dataset creation is an offline process, you can rely on entity groups and parent/child data modelling, no matter how many child entities you want to store. But you will have to expect high datastore contention level. My suggestion : in your data model design, only use parent/child design when transactional features are REALLY required. If transactional requirement are not so high, prefer to break your data model into smaller entity groups. On 21/10/10 17:00, nicanor.babula nicanor.bab...@gmail.com wrote: Thank you all for your responses. @alesj No, I am not confusing entity group with the actual entities stored in the datastore. @Ian Marshall Actually no, because I already did that kind of analysis. I have to use transactions in order to maintain data consistency and therefore I have to define the right entity groups. I already thought of a solution, just that I have read in the docs that is not recommended to put too many entities in an entity group. So: What is the number of child entities a parent entity can have, past which the datastore becomes slow? Hundreds? Thousands? Millions? I also understand that all entities in an entity group are stored on the same node of the datastore's distributed system and therefore I understand that if the number of entities an entity group has is too big, the queries will become slow, because will be processed by a single node. Right? Again: Which is that number? Thanks and sorry if I bored you with my long email. ;) On 21 Ott, 14:59, Ian Marshall ianmarshall...@gmail.com wrote: How about my comments below? http://www.google.com/url?url=http://groups.google.com/g/f907f736/t/f. .. Do they help you? On Oct 20, 6:39 pm, nicanor.babula nicanor.bab...@gmail.com wrote: Hi everbody, I have a question regarding the datastore best-practices. The appengine's official documentation says that is not a good practice to put too many entities in the same entity group. What does too many mean in this case? Hundreds? Thousands? Milions? Thanks in advance, Cristian Babula. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2 bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Recommended maximum number of entities in an entity group
Thank you all for your responses. @alesj No, I am not confusing entity group with the actual entities stored in the datastore. @Ian Marshall Actually no, because I already did that kind of analysis. I have to use transactions in order to maintain data consistency and therefore I have to define the right entity groups. I already thought of a solution, just that I have read in the docs that is not recommended to put too many entities in an entity group. So: What is the number of child entities a parent entity can have, past which the datastore becomes slow? Hundreds? Thousands? Millions? I also understand that all entities in an entity group are stored on the same node of the datastore's distributed system and therefore I understand that if the number of entities an entity group has is too big, the queries will become slow, because will be processed by a single node. Right? Again: Which is that number? Thanks and sorry if I bored you with my long email. ;) On 21 Ott, 14:59, Ian Marshall ianmarshall...@gmail.com wrote: How about my comments below? http://www.google.com/url?url=http://groups.google.com/g/f907f736/t/f... Do they help you? On Oct 20, 6:39 pm, nicanor.babula nicanor.bab...@gmail.com wrote: Hi everbody, I have a question regarding the datastore best-practices. The appengine's official documentation says that is not a good practice to put too many entities in the same entity group. What does too many mean in this case? Hundreds? Thousands? Milions? Thanks in advance, Cristian Babula. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Recommended maximum number of entities in an entity group
Hi everbody, I have a question regarding the datastore best-practices. The appengine's official documentation says that is not a good practice to put too many entities in the same entity group. What does too many mean in this case? Hundreds? Thousands? Milions? Thanks in advance, Cristian Babula. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] [SOLVED] Re: Strange exception with my app
Solved. Looks like appengine sandbox banned sun.dc.* classes too. Changed the namespace and now it's up and running. On 14 Ott, 18:07, nicanor.babula nicanor.bab...@gmail.com wrote: Hi google appengine team, Since today, I have been getting continuously the exception reported below. Yesterday I am not sure, but the day before yesterday it worked for sure. I have more apps that use the same library and all of them keep throwing the same exception. You can reproduce it uploading this xsl file:http://www.4shared.com/file/uefUC7KX/simple.html on this servlet:http://almaoffice0.appspot.com/testPDF.jsp app id: almaoffice0 and domodentweb. In the development server, everything works fine (just like before). I need information about the issue pretty fast because the second app is a production one and I need to know what decision to take. Thanks in advance. Uncaught exception from servlet java.lang.NoClassDefFoundError: sun/dc/path/PathException at org.apache.xmlgraphics.java2d.GraphicContext.init(GraphicContext.java: 93) at org.apache.fop.render.intermediate.IFGraphicContext.init(IFGraphicContext .java: 42) at org.apache.fop.render.intermediate.IFRenderer.init(IFRenderer.java: 127) at org.apache.fop.render.RendererFactory.createRendererForDocumentHandler(Rend ererFactory.java: 313) at org.apache.fop.render.RendererFactory.tryIFDocumentHandlerMaker(RendererFac tory.java: 290) at org.apache.fop.render.RendererFactory.createRenderer(RendererFactory.java: 270) at org.apache.fop.area.RenderPagesModel.init(RenderPagesModel.java: 69) at org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java: 130) at org.apache.fop.area.AreaTreeHandler.init(AreaTreeHandler.java: 102) at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory. java: 359) at org.apache.fop.fo.FOTreeBuilder.init(FOTreeBuilder.java:105) at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:100) at org.apache.fop.apps.Fop.init(Fop.java:78) at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:254) at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:231) at cri.domodentweb.server.servlets.GenUserCalendarMemoPDF.doGet(GenUserCalenda rMemoPDF.java: 166) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlo bUploadFilter.java: 97) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionF ilter.java: 35) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans actionCleanupFilter.java: 43) 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.runtime.jetty.AppVersionHandlerMap.handle(AppVersionH andlerMap.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(RpcRequ estParser.java: 76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceReques t(JettyServletEngineAdapter.java: 135) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java: 261) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:8483) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:8481) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingAp
[appengine-java] Strange exception with my app
Hi google appengine team, Since today, I have been getting continuously the exception reported below. Yesterday I am not sure, but the day before yesterday it worked for sure. I have more apps that use the same library and all of them keep throwing the same exception. You can reproduce it uploading this xsl file: http://www.4shared.com/file/uefUC7KX/simple.html on this servlet: http://almaoffice0.appspot.com/testPDF.jsp app id: almaoffice0 and domodentweb. In the development server, everything works fine (just like before). I need information about the issue pretty fast because the second app is a production one and I need to know what decision to take. Thanks in advance. Uncaught exception from servlet java.lang.NoClassDefFoundError: sun/dc/path/PathException at org.apache.xmlgraphics.java2d.GraphicContext.init(GraphicContext.java: 93) at org.apache.fop.render.intermediate.IFGraphicContext.init(IFGraphicContext.java: 42) at org.apache.fop.render.intermediate.IFRenderer.init(IFRenderer.java: 127) at org.apache.fop.render.RendererFactory.createRendererForDocumentHandler(RendererFactory.java: 313) at org.apache.fop.render.RendererFactory.tryIFDocumentHandlerMaker(RendererFactory.java: 290) at org.apache.fop.render.RendererFactory.createRenderer(RendererFactory.java: 270) at org.apache.fop.area.RenderPagesModel.init(RenderPagesModel.java: 69) at org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java: 130) at org.apache.fop.area.AreaTreeHandler.init(AreaTreeHandler.java: 102) at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java: 359) at org.apache.fop.fo.FOTreeBuilder.init(FOTreeBuilder.java:105) at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:100) at org.apache.fop.apps.Fop.init(Fop.java:78) at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:254) at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:231) at cri.domodentweb.server.servlets.GenUserCalendarMemoPDF.doGet(GenUserCalendarMemoPDF.java: 166) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java: 97) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java: 35) 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 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.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: 261) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:8483) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:8481) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java: 24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 418) at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java: 572) at com.google.tracing.TraceContext$TraceContextRunnable $1.run(TraceContext.java:448) at
[appengine-java] Re: AuthSub InvalidToken problem
That's all the code that deals with google services in my whole application. The exception is raised on the following instruction: [code] CalendarEventFeed resultFeed = calendarService.query(myQuery, CalendarEventFeed.class); [/code] What about the environment? You are saying that I might have included jars that could interfere with auth sub? Are there any known conflictual libraries? I have simply included all the jars shipped with the gdata-samples package. On Mar 30, 4:51 am, seleronm seler...@gmail.com wrote: Hi, I was not able to have them reproduce behavior though I tried a little. (It was possible to execute it normally). Can post do you the source code further? I want to confirm behavior. Or, the environment might be a cause. thank. Come on! Anyone, anything? Thanks. On Mar 26, 12:54 pm, nicanor.babula nicanor.bab...@gmail.com wrote: Hi all, I am facing a strange problem in with my app in GAE and I can't seem to figure it up by myself, so I hope you'll help me.. Here we are: I do : [code] String authSubUrl = AuthSubUtil.getRequestUrl(nextUrl, http://www.google.com/calendar/feeds/default/private/full;, false, true); response.sendRedirect(authSubUrl); [/code] in my servlet in order to get an auth subtoken. And the servlet at nextUrl does: [code] String oneTimeUseToken = AuthSubUtil.getTokenFromReply(request.getQueryString()); if(oneTimeUseToken != null){ String sessionToken = AuthSubUtil.exchangeForSessionToken(oneTimeUseToken, null); // persist the sessiontoken} // redirect to the page using google services [/code] in order to retrieve and persist the sessiontokenalong with other user information. The problem is that when later I do: [code] URL feedUrl = new URL(http://www.google.com/calendar/feeds/default/ private/full); CalendarQuery myQuery = new CalendarQuery(feedUrl); CalendarService calendarService = new CalendarService(some-app- name); calendarService.setAuthSubToken(currentUser.authSubToken, null); CalendarEventFeed resultFeed = calendarService.query(myQuery, CalendarEventFeed.class); [/code] It says that thetokenisinvalid, and raises this exception: [code] cri.domodentweb.server.rpc.CalendarEventsServiceImpl getEventsDev: null com.google.gdata.util.AuthenticationException: OK HTML HEAD TITLETokeninvalid-InvalidAuthSubtoken./TITLE /HEAD BODY BGCOLOR=#FF TEXT=#00 H1Tokeninvalid-InvalidAuthSubtoken./H1 H2Error 401/H2 /BODY /HTML at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGData Request.java: 596) at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleG DataRequest.java: 563) at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataReques t.java: 550) at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java : 530) at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest. java: 535) at com.google.gdata.client.Service.getFeed(Service.java:1102) at com.google.gdata.client.Service.getFeed(Service.java:1044) at com.google.gdata.client.GoogleService.getFeed(GoogleService.java: 662) at com.google.gdata.client.Service.query(Service.java:1204) at com.google.gdata.client.Service.query(Service.java:1145) at cri.domodentweb.server.rpc.CalendarEventsServiceImpl.getEventsDev(CalendarE ventsServiceImpl.java: 133) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M ethod_ $1.run(Method_.java:165) at java.security.AccessController.doPrivileged(Native Method) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M ethod_.privilegedInvoke(Method_.java: 163) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M ethod_.invoke_(Method_.java: 124) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M ethod_.invoke(Method_.java: 43) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 562) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServi ceServlet.java: 188) at cri.domodentweb.server.rpc.BaseServiceImpl.processCall(BaseServiceImpl.java : 12) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServi ceServlet.java: 224
[appengine-java] Re: AuthSub InvalidToken problem
Come on! Anyone, anything? Thanks. On Mar 26, 12:54 pm, nicanor.babula nicanor.bab...@gmail.com wrote: Hi all, I am facing a strange problem in with my app in GAE and I can't seem to figure it up by myself, so I hope you'll help me.. Here we are: I do : [code] String authSubUrl = AuthSubUtil.getRequestUrl(nextUrl, http://www.google.com/calendar/feeds/default/private/full;, false, true); response.sendRedirect(authSubUrl); [/code] in my servlet in order to get an auth subtoken. And the servlet at nextUrl does: [code] String oneTimeUseToken = AuthSubUtil.getTokenFromReply(request.getQueryString()); if(oneTimeUseToken != null){ String sessionToken = AuthSubUtil.exchangeForSessionToken(oneTimeUseToken, null); // persist the sessiontoken} // redirect to the page using google services [/code] in order to retrieve and persist the sessiontokenalong with other user information. The problem is that when later I do: [code] URL feedUrl = new URL(http://www.google.com/calendar/feeds/default/ private/full); CalendarQuery myQuery = new CalendarQuery(feedUrl); CalendarService calendarService = new CalendarService(some-app- name); calendarService.setAuthSubToken(currentUser.authSubToken, null); CalendarEventFeed resultFeed = calendarService.query(myQuery, CalendarEventFeed.class); [/code] It says that thetokenisinvalid, and raises this exception: [code] cri.domodentweb.server.rpc.CalendarEventsServiceImpl getEventsDev: null com.google.gdata.util.AuthenticationException: OK HTML HEAD TITLETokeninvalid-InvalidAuthSubtoken./TITLE /HEAD BODY BGCOLOR=#FF TEXT=#00 H1Tokeninvalid-InvalidAuthSubtoken./H1 H2Error 401/H2 /BODY /HTML at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGData Request.java: 596) at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleG DataRequest.java: 563) at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataReques t.java: 550) at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java : 530) at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest. java: 535) at com.google.gdata.client.Service.getFeed(Service.java:1102) at com.google.gdata.client.Service.getFeed(Service.java:1044) at com.google.gdata.client.GoogleService.getFeed(GoogleService.java: 662) at com.google.gdata.client.Service.query(Service.java:1204) at com.google.gdata.client.Service.query(Service.java:1145) at cri.domodentweb.server.rpc.CalendarEventsServiceImpl.getEventsDev(CalendarE ventsServiceImpl.java: 133) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M ethod_ $1.run(Method_.java:165) at java.security.AccessController.doPrivileged(Native Method) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M ethod_.privilegedInvoke(Method_.java: 163) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M ethod_.invoke_(Method_.java: 124) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.M ethod_.invoke(Method_.java: 43) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 562) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServi ceServlet.java: 188) at cri.domodentweb.server.rpc.BaseServiceImpl.processCall(BaseServiceImpl.java : 12) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServi ceServlet.java: 224) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(Abstract RemoteServiceServlet.java: 62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlo bUploadFilter.java: 97) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionF ilter.java: 35) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans actionCleanupFilter.java: 43
[appengine-java] AuthSub InvalidToken problem
Hi all, I am facing a strange problem in with my app in GAE and I can't seem to figure it up by myself, so I hope you'll help me.. Here we are: I do : [code] String authSubUrl = AuthSubUtil.getRequestUrl(nextUrl, http:// www.google.com/calendar/feeds/default/private/full, false, true); response.sendRedirect(authSubUrl); [/code] in my servlet in order to get an auth sub token. And the servlet at nextUrl does: [code] String oneTimeUseToken = AuthSubUtil.getTokenFromReply(request.getQueryString()); if(oneTimeUseToken != null){ String sessionToken = AuthSubUtil.exchangeForSessionToken(oneTimeUseToken, null); // persist the session token } // redirect to the page using google services [/code] in order to retrieve and persist the session token along with other user information. The problem is that when later I do: [code] URL feedUrl = new URL(http://www.google.com/calendar/feeds/default/ private/full); CalendarQuery myQuery = new CalendarQuery(feedUrl); CalendarService calendarService = new CalendarService(some-app- name); calendarService.setAuthSubToken(currentUser.authSubToken, null); CalendarEventFeed resultFeed = calendarService.query(myQuery, CalendarEventFeed.class); [/code] It says that the token is invalid, and raises this exception: [code] cri.domodentweb.server.rpc.CalendarEventsServiceImpl getEventsDev: null com.google.gdata.util.AuthenticationException: OK HTML HEAD TITLEToken invalid - Invalid AuthSub token./TITLE /HEAD BODY BGCOLOR=#FF TEXT=#00 H1Token invalid - Invalid AuthSub token./H1 H2Error 401/H2 /BODY /HTML at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java: 596) at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java: 563) at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java: 550) at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java: 530) at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java: 535) at com.google.gdata.client.Service.getFeed(Service.java:1102) at com.google.gdata.client.Service.getFeed(Service.java:1044) at com.google.gdata.client.GoogleService.getFeed(GoogleService.java: 662) at com.google.gdata.client.Service.query(Service.java:1204) at com.google.gdata.client.Service.query(Service.java:1145) at cri.domodentweb.server.rpc.CalendarEventsServiceImpl.getEventsDev(CalendarEventsServiceImpl.java: 133) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_ $1.run(Method_.java:165) at java.security.AccessController.doPrivileged(Native Method) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.privilegedInvoke(Method_.java: 163) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke_(Method_.java: 124) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke(Method_.java: 43) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 562) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java: 188) at cri.domodentweb.server.rpc.BaseServiceImpl.processCall(BaseServiceImpl.java: 12) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java: 224) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java: 62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java: 97) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java: 35) 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 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at
[appengine-java] memcache and session on GAE
Hi everyone. How memcache works on GAE? Let me explain: Do I get one memcache instance per app instance or there is one memcache instance for all instastances of my app? My app uses google accounts to handle users. I am thinking that it might be faster reading the current user data from the memcache instead of calling userService.getCurrentUser(). It would be a good approach? Thanks, Cristian. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: images over http
Sorry for the delay, but I canceled my subscription to this group on nov 2 and therefore I saw your answer just now. Anyway, the problem is still present. I haven't solved this issue, as I preferred going on by implementing other functionalities and hoping that in a successive GAE release it would be solved. Here is an image URL that I am trying to fetch: http://almaoffice0.appspot.com/GetImage?id=32001 Here is the source code of the servlet serving the image. Maybe the error is there... You're the expert. [code] @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException{ long imageId = 1; OutputStream os = response.getOutputStream(); try{ try { imageId = Long.parseLong(request.getParameter(id)); } catch (Exception e){ return ; } FilesController c = new FilesController(); FileData imgData = c.selectById(imageId); response.setContentType(imgData.contentType); byte[] d = imgData.data.getBytes(); os.write(d); } catch (Exception e){ e.printStackTrace(out); } finally { os.close(); } } [/code] Thank you, Cristian Babula. On Nov 3, 12:03 am, Jason (Google) apija...@google.com wrote: Just to clarify: Your URL Fetch request for a given image on your server fails after 6 seconds even though you've configured the deadline to be the maximum 10 seconds, and you've tried serving the image from another App Engine servlet as well and saw the same issue. Is this right? Can you send me the image URL that you are trying to fetch? - Jason On Fri, Oct 30, 2009 at 2:11 AM, nicanor.babula nicanor.bab...@gmail.comwrote: First of all, thanks for your answer. I think further information is needed for you to understand my problem. The server which encounters this problem, practically takes as input some template pseudo-code, that contains references to images (like html img src=img url/), and generates some output based on that. In order to generate the output data, it has to download (via java.net.HTTPConnection) the images from the various urls and transform them. The problem is that already the first attempt to download an image times out under 10 secs, although I did setConnectTimeout(1). On Oct 29, 9:51 pm, Jason (Google) apija...@google.com wrote: Is the server on which your JPEG is hosted especially slow? The server where the JPEGs are hosted is not slow. In fact, as I mentioned above, I tried serving the images with an google app engine servlet, but the error still remains. I supposed than, that the issue is not on the server that serves the images. Note that the default timeout limit for URL Fetch requests is 5 seconds. You can increase this up to 10 by passing 1 (ms) into setConnectTimeout(). Already did that, but the browser's ends after 6 seconds. Also keep in mind that your image will have to be smaller than 1 MB if you're planning to use it with the Images service or store it in the datastore. As I already mentioned, that is not a problem, as I tried retrieving the images from an application engine servlet. Besides, I am very aware about the limits specified in the docs. - Jason On Wed, Oct 28, 2009 at 8:37 AM, nicanor.babula nicanor.bab...@gmail.comwrote: Hello everyone, I have somewhere on the net a servlet that serves jpeg images. In order to verify that it works I made a html page with: img src=http://myurl/servlet?id=123; / and the image is displayed well. Now, I am trying to create an GAE image object from the data arriving from that servlet. How can I do? So far I tried this code*[1], with a lot of variations, and I keep getting timeouts and The API call urlfetch.Fetch() took too long to respond and was cancelled. error message in my application's logs. Locally, in the development server, it works. I also tried storing this images in the datastore and serving them directly from GAE. Example of image url:http://almaoffice0.appspot.com/GetImage?id=24001 Any ideas? *[1]: the code: ImagesService imagesService = ImagesServiceFactory.getImagesService(); try { URL url = new URL(stringUrl); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod(GET); connection.setReadTimeout(0); connection.setRequestProperty(ContentType, image/ jpeg); connection.setDoInput(true); if(connection.getResponseCode
[appengine-java] Re: FOP support / workaround
I got FOP working. On Oct 19, 6:37 pm, Stakka henrik.lindqv...@gmail.com wrote: I've tried to get ApacheFOPworking on GAE, using java.awt.* classes from Harmony. I came to the conclusion it's just to much work. Problems: * Implement the required java.awt.* and javax.imageio.* classes. * Implement a complete Graphics2D in java. JVMs use the OS native drawing APIs. * Implement font management, atleast TrueType. Same problem here, JVMs use native. If there was aFOPengine using iText instead, it would be easier. iText uses alot less awt classes and got its own font manager. Good luck - please post if you getFOPworking. On Oct 19, 10:21 am, nicanor.babula nicanor.bab...@gmail.com wrote: Got that solved by ignoring external-graphics tags. Now I am stuck with another restricted class: Error for /TestFOP java.lang.NoClassDefFoundError: java.awt.geom.AffineTransform is a restricted class. Please see the Google App Engine developer's guide for more details. at com.google.apphosting.runtime.security.shared.stub.java.awt.geom.AffineTransform.clinit (AffineTransform.java) at org.apache.xmlgraphics.java2d.GraphicContext.init (GraphicContext.java:59) at org.apache.fop.render.intermediate.IFGraphicContext.init (IFGraphicContext.java:42) at org.apache.fop.render.intermediate.IFRenderer.init (IFRenderer.java:127) at org.apache.fop.render.RendererFactory.createRendererForDocumentHandler (RendererFactory.java:313) at org.apache.fop.render.RendererFactory.tryIFDocumentHandlerMaker (RendererFactory.java:290) at org.apache.fop.render.RendererFactory.createRenderer (RendererFactory.java:270) at org.apache.fop.area.RenderPagesModel.init(RenderPagesModel.java: 69) at org.apache.fop.area.AreaTreeHandler.setupModel (AreaTreeHandler.java:130) at org.apache.fop.area.AreaTreeHandler.init(AreaTreeHandler.java: 102) at org.apache.fop.render.RendererFactory.createFOEventHandler (RendererFactory.java:359) at org.apache.fop.fo.FOTreeBuilder.init(FOTreeBuilder.java:105) at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:100) at org.apache.fop.apps.Fop.init(Fop.java:78) at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:255) at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:232) at cri.almaitalia.AlmaOffice.server.Servlets.TestFOP.genPDF (TestFOP.java:90) at cri.almaitalia.AlmaOffice.server.Servlets.TestFOP.doPost (TestFOP.java:56) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1093) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter (SaveSessionFilter.java:35) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle (SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle (SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle (ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle (AppVersionHandlerMap.java:238) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete (HttpConnection.java:830) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable (RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest (JettyServletEngineAdapter.java:139) at com.google.apphosting.runtime.JavaRuntime.handleRequest (JavaRuntime.java:239) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5135) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5133
[appengine-java] Re: FOP support / workaround
Sure thing! http://nicanorcristian.blogspot.com/2009/11/apache-fop-on-google-application-engine.html On Dec 8, 5:57 pm, Toby Reyelts to...@google.com wrote: Neat! Care to elaborate? On Tue, Dec 8, 2009 at 11:44 AM, nicanor.babula nicanor.bab...@gmail.comwrote: I got FOP working. On Oct 19, 6:37 pm, Stakka henrik.lindqv...@gmail.com wrote: I've tried to get ApacheFOPworking on GAE, using java.awt.* classes from Harmony. I came to the conclusion it's just to much work. Problems: * Implement the required java.awt.* and javax.imageio.* classes. * Implement a complete Graphics2D in java. JVMs use the OS native drawing APIs. * Implement font management, atleast TrueType. Same problem here, JVMs use native. If there was aFOPengine using iText instead, it would be easier. iText uses alot less awt classes and got its own font manager. Good luck - please post if you getFOPworking. On Oct 19, 10:21 am, nicanor.babula nicanor.bab...@gmail.com wrote: Got that solved by ignoring external-graphics tags. Now I am stuck with another restricted class: Error for /TestFOP java.lang.NoClassDefFoundError: java.awt.geom.AffineTransform is a restricted class. Please see the Google App Engine developer's guide for more details. at com.google.apphosting.runtime.security.shared.stub.java.awt.geom.AffineTransform.clinit (AffineTransform.java) at org.apache.xmlgraphics.java2d.GraphicContext.init (GraphicContext.java:59) at org.apache.fop.render.intermediate.IFGraphicContext.init (IFGraphicContext.java:42) at org.apache.fop.render.intermediate.IFRenderer.init (IFRenderer.java:127) at org.apache.fop.render.RendererFactory.createRendererForDocumentHandler (RendererFactory.java:313) at org.apache.fop.render.RendererFactory.tryIFDocumentHandlerMaker (RendererFactory.java:290) at org.apache.fop.render.RendererFactory.createRenderer (RendererFactory.java:270) at org.apache.fop.area.RenderPagesModel.init(RenderPagesModel.java: 69) at org.apache.fop.area.AreaTreeHandler.setupModel (AreaTreeHandler.java:130) at org.apache.fop.area.AreaTreeHandler.init(AreaTreeHandler.java: 102) at org.apache.fop.render.RendererFactory.createFOEventHandler (RendererFactory.java:359) at org.apache.fop.fo.FOTreeBuilder.init(FOTreeBuilder.java:105) at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:100) at org.apache.fop.apps.Fop.init(Fop.java:78) at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:255) at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:232) at cri.almaitalia.AlmaOffice.server.Servlets.TestFOP.genPDF (TestFOP.java:90) at cri.almaitalia.AlmaOffice.server.Servlets.TestFOP.doPost (TestFOP.java:56) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1093) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter (SaveSessionFilter.java:35) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle (SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle (SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle (ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle (AppVersionHandlerMap.java:238) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete (HttpConnection.java:830) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable (RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381