[appengine-java] Re: Datanucleus initialization performance
Thats over 5 seconds to initialize 5 persistent classes. Actually no. That is the time taken to load up plugin capabilities (so we know what we can allow the user to do), create you an EMF and its cache(s), and load all metadata for your classes (since JPA requires that all classes are known at the start). Split the timings down :- 06.482 - 07.289 - plugin registration 07.289 - 08.570 - who knows since you don't provide log at debug level. likely registering supported types etc 08.570 - 11.013 - generate metadata from classes and their annotations. No specific timing can be taken as accurate since it is affected by any other process running at that time, so can only be used as a ballpark guide. The only way the metadata time can be changed is to provide a serialisation process that writes it to disk after loading (the first time), and then just (re)loads from serialised afterwards - you then have to deal with knowing when the class was changed so to dump the serialised metadata. Whether that would have a big impact is unknown. There is no flexibility to multithread things at startup since GAE/J doesn't allow that. Obviously Google or anyone else could contribute that handling since DataNucleus is an open source project, or they could sponsor that work. There is no flexibility to multithread things at startup since GAE/J doesn't allow that. -- 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: Purge _ah_SESSION ???
Where should I look for this sessionCleanupServlet? On Jan 7, 6:01 am, m seleron seler...@gmail.com wrote: Hi, Though it is likely already to have tried. You might solve the problem by examining sessionCleanupServlet. thanks. On 1月7日, 午後1:18, Jorge athenas...@gmail.com wrote: Is there a way to delete old _ah_SESSION entities? I found a post about deleting all sessions, both from the datastore and from memcache, but I am looking a clean way to delete past sessions and preserve the active ones. Thanks, Jorge Gonzalez -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: How can I test my java app behind proxy ?
This is not working yet. There is a bug for this, so you may want to star it: http://code.google.com/p/googleappengine/issues/detail?id=544 On Jan 5, 11:20 am, 008 outlookwo...@gmail.com wrote: As title, my network is behind a proxy. I add the following text to appengine-web.xml property name=http.proxyHost value=10.1.1.1/ property name=http.proxyPort value=8080/ property name=https.proxyHost value=10.1.1.1/ property name=https.proxyPort value=8080/ and, the appcfg.cmd file is as follow (I use windows XP and jdk 1.6): @java -cp -Dhttp.proxyHost=10.1.1.1 -Dhttp.proxyPort=8080 - Dhttps.proxyHost=10.1.1.1 -Dhttps.proxyPort=8080 %~dp0\..\lib \appengine-tools-api.jar com.google.appengine.tools.admin.AppCfg %* but, my application throws an IOException. my code is: URL url = new URL(http://i-plaza.appspot.com/ index.html); InputStream inputStream; HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.connect(); inputStream = connection.getInputStream(); //... It does work in anywhere without proxy. Would you kindly help me ? -- 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: Purge _ah_SESSION ???
Hi, I am sorry for not understanding easily. I retrieved this Group Is this thread useful http://groups.google.com/group/google-appengine-java/browse_thread/thread/4f0d9af1c633d39a/875921846a160b52?lnk=gstq=sessionCleanupServlet+%23875921846a160b52pli=1 You may find more useful information . Please look for it. Thanks. Where should I look for this sessionCleanupServlet? On Jan 7, 6:01 am, m seleron seler...@gmail.com wrote: Hi, Though it is likely already to have tried. You might solve the problem by examining sessionCleanupServlet. thanks. On 1月7日, 午後1:18, Jorge athenas...@gmail.com wrote: Is there a way to delete old _ah_SESSION entities? I found a post about deleting all sessions, both from the datastore and from memcache, but I am looking a clean way to delete past sessions and preserve the active ones. Thanks, Jorge Gonzalez -- 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: Datanucleus initialization performance
I'm not trying to say anything datanucleus does is wrong. 5 seconds to initialize an ORM layer is plenty quick in my book. Most enterprisey apps I deal with in my day job take well over 3 minutes to get moving. Really I was just wondering if there was any known way to speed it up that I was missing... Which doesn't seem to be the case, and even the suggestions you provide would be difficult because of GAE/J limitations. The real issue is that GAE/J in that it shuts down inactive apps after what I consider a relatively short period of time. Not a discussion for this thread. Thanks for your input Andy. I know the product is open-source, and I still am planning on running a profiler to hopefully discover any hotspots and create performance patches. On Jan 7, 4:10 am, datanucleus andy_jeffer...@yahoo.com wrote: Thats over 5 seconds to initialize 5 persistent classes. Actually no. That is the time taken to load up plugin capabilities (so we know what we can allow the user to do), create you an EMF and its cache(s), and load all metadata for your classes (since JPA requires that all classes are known at the start). Split the timings down :- 06.482 - 07.289 - plugin registration 07.289 - 08.570 - who knows since you don't provide log at debug level. likely registering supported types etc 08.570 - 11.013 - generate metadata from classes and their annotations. No specific timing can be taken as accurate since it is affected by any other process running at that time, so can only be used as a ballpark guide. The only way the metadata time can be changed is to provide a serialisation process that writes it to disk after loading (the first time), and then just (re)loads from serialised afterwards - you then have to deal with knowing when the class was changed so to dump the serialised metadata. Whether that would have a big impact is unknown. There is no flexibility to multithread things at startup since GAE/J doesn't allow that. Obviously Google or anyone else could contribute that handling since DataNucleus is an open source project, or they could sponsor that work. There is no flexibility to multithread things at startup since GAE/J doesn't allow that. -- 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: Datanucleus initialization performance
Only other thing is, do you specify class names explicitly in persistence.xml ? If not then it will have to scan the classpath below the persistence-unit, hence taking some time to find the classes to load annotations for. The log info you provide doesn't show if it is this that takes the time - the log at debug would likely help. Either way, i'd suggest you raise an issue on http://code.google.com/p/datanucleus-appengine/ so its registered -- 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: Datanucleus initialization performance
You could setup a cron job to hit a servlet every minute to keep your container alive. That way your app is always fresh (unless you get so much traffic that new instances need to spawn up for scaling purposes). david On Jan 5, 2:52 pm, Todd Lindner todd.lind...@gmail.com wrote: Since Google App Engine will power down the app if there aren't any requests for ~10 minutes, it has to re-initialize your application often. Not a problem I was able to trim my app init down to about 1.5 seconds, so its reasonable, but datanucleus itself takes about 5 seconds on top of that (and I only have 5 persistent entities!). This is a real drag on my app and I almost want to keep it awake with a pinger... Any way to speed up initialization? I'm using JPA. Thanks -Todd -- 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: Datanucleus initialization performance
Andy, where should I configure class names in configuration file? Is there any documentation where I can take a look? Thanks, Peter On Jan 7, 4:12 pm, datanucleus andy_jeffer...@yahoo.com wrote: Only other thing is, do you specify class names explicitly in persistence.xml ? If not then it will have to scan the classpath below the persistence-unit, hence taking some time to find the classes to load annotations for. The log info you provide doesn't show if it is this that takes the time - the log at debug would likely help. Either way, i'd suggest you raise an issue onhttp://code.google.com/p/datanucleus-appengine/ so its registered -- 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: Datanucleus initialization performance
Andy, where should I configure class names in configuration file? Is there any documentation where I can take a look? Peter, these are standards were using here, so everything is documented ;-) For JPA, try this http://www.datanucleus.org/products/accessplatform_2_0/jpa/persistence_unit.html with particular reference to exclude-unlisted-classes at the bottom -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Maven
They seem to ignore the maven question completely (there has been a request for this since end of dawn). One of the factors which limits GAE in widespreading... 2010/1/6 Marcel Overdijk marceloverd...@gmail.com Is GAE 1.3.0 available in central maven repo? Would be nice if Google GAE team could create a subpage on the GAE docs homepage with information for maven. Many users would appreciate this. Thanks, Marcel -- 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%2bunsubscr...@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] Error while deploying GWT application on google app engine.
Hi all, I have simply created a new GWT project (standard StockWatcher application) and trying to deploy it on google app server. But I am getting an error while deploying it. Error says -An internal error occurred during: Deploying StockWatcher to Google.Received IOException parsing the input stream for C:/Documents and Settings/ smartGWT/StockWatcher/war\WEB-INF/web.xml I am able to compile it and run it locally.But getting error while deploying it on google app server. Can you please help me 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-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] Blog Implementation on GAE?
Hi all, I'm looking to implement a blog, and WordPress won't run on GAE. Does anyone know of any Java blog implementations on GAE? Thanks, Joe -- 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] Adding customize attributes to an feed via the Java API
Hi, I'm using the GoogleBaseData JavaClient API to upload my products to a google base feed. I can't insert my custom attributs like spring deflection or others via the api. Can anyone help me. A litte cutout of my code: private static PairGoogleBaseEntry, Integer creatGoogleBaseEntry (int index) throws UnsupportedEncodingException { GoogleBaseEntry entry = new GoogleBaseEntry(); entry.setTitle(TextConstruct .plainText(TEST + index)); entry.setId(345-033828); entry.addLink(itemLink); entry .addHtmlLink( http://www.tolstych.de/p/345-033828/ test.html? PageID=FG-252-033828, null, null); entry.setContent(TextConstruct.plainText(TEST 1234 TEST + index)); entry.setUpdated(DateTime.now()); float price = (float) 35.41 + index; entry.getGoogleBaseAttributes().addFloatAttribute(preis, price); entry.getGoogleBaseAttributes().addTextAttribute(id, 345-033828 + index); entry.getGoogleBaseAttributes().addTextAttribute(marke, Plantronics); entry.getGoogleBaseAttributes().addTextAttribute(mpn, 78094-05); entry.getGoogleBaseAttributes().addTextAttribute(ean, 5033588012345 + index); entry.getGoogleBaseAttributes().addTextAttribute (zahlungsmethode, Lastschrift); entry.getGoogleBaseAttributes().addTextAttribute(preisart, fixed); entry.getGoogleBaseAttributes().addTextAttribute(zustand, neu); entry.getGoogleBaseAttributes().addTextAttribute(produktart, neu); entry.getGoogleBaseAttributes().addTextAttribute(Farbe, schwarz); entry.getGoogleBaseAttributes().setItemType(Produkte); entry.getGoogleBaseAttributes().addTextAttribute (item_language, de); entry.getGoogleBaseAttributes().addTextAttribute (target_country, DE); entry.getGoogleBaseAttributes().addTextAttribute(spring deflection, 15 mm); entry.getGoogleBaseAttributes().addTextAttribute(key, value); entry.getGoogleBaseAttributes().addBooleanAttribute (no_api_syndication, true); entry.getGoogleBaseAttributes().addShipping(new Shipping(null, null, price, null)); Integer byteLength = entry.toString().getBytes (UTF-8).length; return Pair.make(entry, byteLength); } -- 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: Exception When Uploading Application To AppEngine
The issue is disappeared with no changes from my side. I am able to upload the version that was failed previously. Maybe something was wrong with server that is hosting my site because I don't see any downtime notification in the official group. Everything is working and this is good news for me. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: java.lang.NullPointerException cannot be cast to javax.servlet.ServletException
This problem still exists. On Dec 16 2009, 9:42 pm, polyurethan vette...@googlemail.com wrote: Hey there, I still get this ClassCastException. When will the JVM be fixed? It's Dec and the issue was raised in Jul. Is there any progress? Thanks, Alexander On Oct 22, 10:13 am, Marc Guillemot mguille...@yahoo.fr wrote: Don, I've tried to produce a unit test to open an issue for Jasper... and failed. I'm now quite sure that this is a bug in the JVM used for GAE. The JavaDoc of AccessController.doPrivileged (which is a native method) says that it propagates unchecked exceptions and throws a PrivilegedActionException only if a *checked* exception was thrown. Therefore Jasper code is correct not to await a RuntimeException as a PrivilegedActionException can't contain a NullPointerException and GAE's JVM is buggy here. Cheers, Marc. Don Schwarz a écrit : Ah, you're right actually. I hadn't looked closely enough at that bug. We'll have to get the Jasper guys to fix that and then upgrade. Thanks, Don On Mon, Oct 19, 2009 at 10:39 AM, Marc Guillemot mguille...@yahoo.fr mailto:mguille...@yahoo.fr wrote: This seems to be a really old issue that relates to something different... or do you mean that GAE uses a 5 years old version of Jasper? I've just look at the current sources of PageContextImpl http://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/jasper/r... and it seems to me that the problem still exists there. Cheers, Marc. Don Schwarz a écrit : Yes, this is: https://issues.apache.org/bugzilla/show_bug.cgi?id=31171 We need to bundle a later version of Jasper with the App Engine SDK to fix this. On Mon, Oct 19, 2009 at 10:24 AM, Marc Guillemot mguille...@yahoo.fr mailto:mguille...@yahoo.fr mailto:mguille...@yahoo.fr mailto:mguille...@yahoo.fr wrote: Hi, any progress on this issue? Is it possible that it comes from a bug in Jasper, not able to recognize RuntimeException occurring in a PrivilegedExceptionAction? // org.apache.jasper.runtime.PageContextImpl public void handlePageException(final Throwable t) throws IOException, ServletException { if (t == null) throw new NullPointerException(null Throwable); if (SecurityUtil.isPackageProtectionEnabled()) { try { AccessController.doPrivileged( new PrivilegedExceptionActionVoid() { public Void run() throws Exception { doHandlePageException(t); return null; } }); } catch (PrivilegedActionException e) { Exception ex = e.getException(); if (ex instanceof IOException) { throw (IOException) ex; } else { throw (ServletException) ex; -- here? } } } else { doHandlePageException(t); } } Cheers, Marc. Toby Reyelts a écrit : There's an outstanding issue in the version of Jasper App Engine is currently using that can cause exceptions escaping a JSP to be incorrectly cast to ServletException. As a temporary workaround, you can wrap the body of your JSP in a try-catch block to get the actual exception. On Thu, Jul 30, 2009 at 1:13 PM, Blessed Geek blessedg...@gmail.com mailto:blessedg...@gmail.com mailto:blessedg...@gmail.com mailto:blessedg...@gmail.com mailto:blessedg...@gmail.com mailto:blessedg...@gmail.com mailto:blessedg...@gmail.com mailto:blessedg...@gmail.com wrote: http://cuckooberra.blessed-are-the-geek.com/TableMgr/TableMgr.jsp Any idea what this error log means? LoggedIn.jsp is a rather simple jsp, getting a temp authtoken and exchanging it for a permanent one. My app runs fine on local eclipse plugin, but on deployment this error resulted. 07-30 07:30AM 49.848 /TableMgr/LoggedIn.jsp java.lang.ClassCastException: java.lang.NullPointerException cannot be cast to javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException (PageContextImpl.java:754) -- You received this message because you are
[appengine-java] Re: File path in App Engine
Hello, I have tried this but I always get a java.security.AccessControlException: access denied (java.io.FilePermission /names.txt read) Anyone know how to resolve this? Thanks, Finbarr On Jan 7, 3:32 am, m seleron seler...@gmail.com wrote: Hi, It might be solved by this though is not a direct answer. Follow this thread:http://groups.google.co.jp/group/google-appengine-java/browse_thread/... Please Try. thanks. Hello, I have recently started using App Engine for a project I am working on, and I have a simple question. I have a file in the war/WEB-INF directory of my app filename.txt. When I try BufferedReader b = new BufferedReader(new FileReader(new File(filename.txt))); I get a FileNotFoundException. What path should I use when trying to access files in the war/WEB-INF directory? I have tried what seem to me to be the obvious ones and I have read the faq on this (which just tells you to put files in that directory). Thanks, Finbarr -- 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] GAE/J application tier performance numbers?
Can folks share their experience with best-case and worst-case request times for the GAE/J application tier? I think its useful to isolate the application tier performance as there is a lot of good info on datastore performance and how to optimize it (e.g. use of Memcache, etc...) The worst case would be the initial request from a cold start. If the worst case is greater than the deadline, please include any estimate on what percentage of cold starts exceed the deadline. The best case would be for everything loaded. I may have missed existing summaries in my search so a link to that may be the answer... Here is a list of performance profiles that could be useful to track: - best and worst case for pure static request that makes it to the Google Front End. This provides the best case baseline. - best and worst case for pure Servlet/JSP request doing Hello World. This provides a baseline for isolating the low level application tier processing. - best and worst case for a pure Java framework like Wicket doing Hello World . - best and worst case for a lean dynamic language framework like Gaelyk doing Hello World. - best and worst case for a heavy dynamic language framework like Grails and JRuby on Rails doing Hello World. Thoughts on how to deal with the worst-case response time are already being discussed (http://googleappengine.blogspot.com/2009/12/request- performance-in-java.html) and include pre-compilation, optimization of the start-up of the dynamic language runtimes and the use of keep- awake pings. This thread will hopefully allow people to share specific performance data that can motivate those efforts. Best regards, Gabe -- 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: Unexpected error during precommit, with owned relation, if childList is null
is there any solution for this problem? On Thu, Dec 31, 2009 at 8:46 PM, Kemal Dogan kemal.m...@gmail.com wrote: hi, I have two entity with owned relation. Order is master entity and OrderItem is child entity. When I have to persist Order without OrderItem, but it gives an exception (javax.jdo.JDOException: Unexpected error during precommit) at commit line. But if I add an OrderItem instance to orderItemChilds, then it works. My sample code is at below, how can I solve this problem. Please help. Kemal Dogan. --- My Codes: Master Entity: @PersistenceCapable(identityType = IdentityType.APPLICATION, table = T_Order, detachable = true) @Inheritance(customStrategy = complete-table) public class Order extends MasterEntityImpl { �...@persistent(mappedBy = order) �...@element(dependent = true) �...@javax.jdo.annotations.order(extensions = @Extension(vendorName = datanucleus, key = list-ordering, value = pk asc)) private ListOrderItem orderItemChilds = new ArrayList(); ... Child Entity: @PersistenceCapable(identityType = IdentityType.APPLICATION, table = T_OrderItem, detachable = true) public class OrderItem extends ChildEntityImplOrder { �...@persistent private Order order; ... DAO code: public void test_With_ERROR() { OrderDAO orderDAO = DAOFactory.getInstance().getOrderDAO(); Order order= new Order(); orderDAO.persist(order); } public void test_With_NO_ERROR() { OrderDAO orderDAO = DAOFactory.getInstance().getOrderDAO(); Order order= new Order(); ListOrderItem orderItems= (ListOrderItem) order.getOrderItemChilds(); OrderItem item= new OrderItem(); orderItems.add(item); orderDAO.persist(order); } . Other abtract classes. @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = true) @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE) public abstract class MasterEntityImpl implements MasterEntityKey { �...@primarykey �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY, column = F_PK) private Key pk; ... @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = true) @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE) public abstract class ChildEntityImplT extends MasterEntity implements ChildEntityT,Key { �...@primarykey �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY, column = F_PK) private Key pk; ... -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: A server error has occurred. message in GAE console
http://code.google.com/p/googleappengine/issues/detail?id=2620 - corresponding issue. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] com.google.gdata.data.contacts.GroupMembershipInfo and the hasDeleted() method
Background: I'm trying to write a web app to sync-up my contacts between my different Gmail accounts. Problem: hasDeleted() will return true when a contact has been removed from a group but if that contact gets added back to that group again, hasDeleted() still returns true. Unless I'm missing something, there's no way of knowing the current situation of that contact in regard to that group (unlike ContactEntry or ContactGroupEntry that can be queried with the 'showDeleted' parameter). Please help. -- 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: com.google.gdata.data.contacts.GroupMembershipInfo and the hasDeleted() method
I forgot to add that I am setting 'showDeleted=true' on the query to get the ContactEntryFeed. I would speculate that it's why an older deletion on a contact within that feed would cause hasDeleted() to ALWAYS return true from that point on. On Jan 7, 4:40 pm, Tb tho...@bertranfamily.com wrote: Background: I'm trying to write a web app to sync-up my contacts between my different Gmail accounts. Problem: hasDeleted() will return true when a contact has been removed from a group but if that contact gets added back to that group again, hasDeleted() still returns true. Unless I'm missing something, there's no way of knowing the current situation of that contact in regard to that group (unlike ContactEntry or ContactGroupEntry that can be queried with the 'showDeleted' parameter). Please help. -- 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: File path in App Engine
I tried a little. I put the file(names.txt) in /WEB-INF directly The following are sources that I tested. String FileName = names.txt; File file = new File(FileName); BufferedReader bufferedReader = new BufferedReader(new FileReader (file)); The processing seems in my test for normality. I might not correctly understand the content of the question or There is a possibility it is not in the cause for the source code not to be able to read a file but in the cause with the environment, too. Please Confirm. thanks. Hello, I have tried this but I always get a java.security.AccessControlException: access denied (java.io.FilePermission /names.txt read) Anyone know how to resolve this? Thanks, Finbarr On Jan 7, 3:32 am, m seleron seler...@gmail.com wrote: Hi, It might be solved by this though is not a direct answer. Follow this thread:http://groups.google.co.jp/group/google-appengine-java/browse_thread/... Please Try. thanks. Hello, I have recently started using App Engine for a project I am working on, and I have a simple question. I have a file in the war/WEB-INF directory of my app filename.txt. When I try BufferedReader b = new BufferedReader(new FileReader(new File(filename.txt))); I get a FileNotFoundException. What path should I use when trying to access files in the war/WEB-INF directory? I have tried what seem to me to be the obvious ones and I have read the faq on this (which just tells you to put files in that directory). Thanks, Finbarr -- 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: File path in App Engine
I got it to work by just using a File. Didn't change anything, it just seemed to start working of its own accord. Finbarr On Jan 7, 10:46 am, Ftaylor finbarrtay...@googlemail.com wrote: Hello, I have tried this but I always get a java.security.AccessControlException: access denied (java.io.FilePermission /names.txt read) Anyone know how to resolve this? Thanks, Finbarr On Jan 7, 3:32 am, m seleron seler...@gmail.com wrote: Hi, It might be solved by this though is not a direct answer. Follow this thread:http://groups.google.co.jp/group/google-appengine-java/browse_thread/... Please Try. thanks. Hello, I have recently started using App Engine for a project I am working on, and I have a simple question. I have a file in the war/WEB-INF directory of my app filename.txt. When I try BufferedReader b = new BufferedReader(new FileReader(new File(filename.txt))); I get a FileNotFoundException. What path should I use when trying to access files in the war/WEB-INF directory? I have tried what seem to me to be the obvious ones and I have read the faq on this (which just tells you to put files in that directory). Thanks, Finbarr -- 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: Purge _ah_SESSION ???
The /_ah/sessioncleanup servlet works ok, but it cleans only 100 expired sessions at a time, so one needs to run it often enough to avoid expired sessions to accumulate and no so often that it won't have too few sessions to purge. Kind of complicated!! Someone knows of a better solution? Jorge Gonzalez On Jan 7, 4:13 am, m seleron seler...@gmail.com wrote: Hi, I am sorry for not understanding easily. I retrieved this Group Is this thread usefulhttp://groups.google.com/group/google-appengine-java/browse_thread/th... You may find more useful information . Please look for it. Thanks. Where should I look for this sessionCleanupServlet? On Jan 7, 6:01 am, m seleron seler...@gmail.com wrote: Hi, Though it is likely already to have tried. You might solve the problem by examining sessionCleanupServlet. thanks. On 1月7日, 午後1:18, Jorge athenas...@gmail.com wrote: Is there a way to delete old _ah_SESSION entities? I found a post about deleting all sessions, both from the datastore and from memcache, but I am looking a clean way to delete past sessions and preserve the active ones. Thanks, Jorge Gonzalez -- 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: Error while deploying GWT application on google app engine.
Hi Reena, It looks like you have a problem with your web.xml file. I believe I had a similar issue where I can run locally, even with a slightly invalid web.xml file. You might want to doublecheck that your war/WEB-INF/web.xml file is syntactically correct. If you're curious what a clean one looks like, you can always just create a new project using the Eclipse plugin, and generate a new app with both GWT and GAE checkboxes checked. You could then compare and contrast between the two. Hope that helps, -Chris (Google) On Jan 7, 1:49 am, reena libranre...@gmail.com wrote: Hi all, I have simply created a new GWT project (standard StockWatcher application) and trying to deploy it on google app server. But I am getting an error while deploying it. Error says -An internal error occurred during: Deploying StockWatcher to Google.Received IOException parsing the input stream for C:/Documents and Settings/ smartGWT/StockWatcher/war\WEB-INF/web.xml I am able to compile it and run it locally.But getting error while deploying it on google app server. Can you please help me 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-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: Web based application in java.
Hi Yadav, I would recommend stepping through the Getting Started tutorial on the main docs pages for App Engine. In addition to providing some basic getting started info, you get to build a simple guestbook application that updates and queries data from the Datastore. http://code.google.com/appengine/docs/java/gettingstarted/introduction.html Hope this helps, -Chris On Jan 5, 1:22 am, yadav au.su...@gmail.com wrote: Hi.. I am trying to develop a small application in java on google apps.it is mainly depends on data base.my question is how to create entities and how to retrieve the data from it. -- 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: One To Many. JDO. Error while save data.
Here's some ideas to try... I see that you have a if statement in your JSP.. if(request.getContentLength() 0) { ... Are you sure this condition is true in your case? Otherwise the JSP will never attempt to save the object. If that's not it, you could always create a new JSP and just drop the exact servlet code into the page via a scriptlet and work backwards from there. Hope this helps.. -Chris (Google) On Jan 3, 2:50 am, webus webus...@gmail.com wrote: Hi to all! I have problem. I have JDO objects: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class MenuButton { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long uid; @Persistent private String name; @Persistent(mappedBy=menuButton) private ListTopic topicSets; @Persistent private boolean isEnabled; @Persistent private String toURL; public Long getUid() { return uid; } public void setUid(Long uid) { this.uid = uid; } public String getName() { return name; } public void setName(String name) { this.name = name; } public ListTopic getTopicSets() { return topicSets; } public void setTopicSets(ListTopic topicSets) { this.topicSets = topicSets; } public boolean isEnabled() { return isEnabled; } public void setEnabled(boolean isEnabled) { this.isEnabled = isEnabled; } public String getToURL() { return toURL; } public void setToURL(String toURL) { this.toURL = toURL; } } @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Topic { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key uid; @Persistent private MenuButton menuButton; @Persistent private String topicTheme; @Persistent private Text topicText; public Key getUid() { return uid; } public void setUid(Key uid) { this.uid = uid; } public MenuButton getMenuButton() { return menuButton; } public void setMenuButton(MenuButton menuButton) { this.menuButton = menuButton; } public String getTopicTheme() { return topicTheme; } public void setTopicTheme(String topicTheme) { this.topicTheme = topicTheme; } public Text getTopicText() { return topicText; } public void setTopicText(Text topicText) { this.topicText = topicText; } } I have Manager class to help me save or update data. public class Manager { PersistenceManager pm = null; public Manager() { pm = PMF.get().getPersistenceManager(); } public PersistenceManager getPersistenceManager(){ return pm; } public boolean Save(Object obj) { Transaction tx = null; try { tx = pm.currentTransaction(); tx.begin(); pm.makePersistent(obj); tx.commit(); System.out.println(õÓÐÅÛÎÏ ÓÏÈÒÁÎÉÌÉ ÔÒÁÎÚÁËÃÉÀ!); return true; } catch(Exception ex) { System.out.println(ex.getMessage()); System.out.println(ex.getLocalizedMessage()); if(tx.isActive()) tx.rollback(); System.out.println(ïÔËÁÔÉÌÉ ÔÒÁÎÚÁËÃÉÀ ÐÏ ÉÓËÌÀÞÅÎÉÀ); return false; } } public boolean Delete(Object obj){ Transaction tx = null; try { tx = pm.currentTransaction(); tx.begin(); pm.deletePersistent(obj); tx.commit(); return true; } catch(Exception ex){ System.out.println(ex.getMessage()); return false; } finally { if(tx.isActive()) tx.rollback(); } } public Object getObjects(Object obj) { Query query = pm.newQuery(obj.getClass()); Object reObj = query.execute(); return
[appengine-java] multiple contains() clauses on the same table
Basically i have 3 fields in the same table to select by using .contains() clauses - one is the primary key field so :keyList (java.util.SetKey) , :feedTypes (java.util.SetInteger) :contentTypes(java.util.SetInteger) with values i need to select with. The Feed object (and the relevant fields) is @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Feed { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; ... @Persistent private int typeFeed ; @Persistent private int typeContent = CONTENT_TYPE_NOTCHECKED; } so i try this Query query1 = pm.newQuery(Feed.class); query1.setFilter(:keyList.contains(id) :feedTypes.contains (typeFeed) :contentTypes.contains(typeContent)); query1.setRange(0,500); MapString, Collection paramsf = new HashMapString, Collection(); paramsf.put(keyList, feedIds); paramsf.put(feedTypes, feedTypes); paramsf.put(contentTypes, contentTypes); feeds = (ListFeed) query1.executeWithMap(paramsf); and i get javax.jdo.JDOFatalUserException: Batch lookup by primary key is only supported if no other filters and no sort orders are defined. Is there any way around it - from other posts it looks like subqueries an the IN syntax arent supported. -- 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: Session problem
Is the object you're trying to save onto the session serializable? Does it implement serializable? (although just making the class implement serializable will not always work) I believe that you can have a class bypass validation for this when running locally - so you may not be seeing the serialization error because of this. In any case, I would definitely make sure you can actually serialize the object that you're saving. -Chris On Jan 5, 7:41 am, avdhesh avdhesh.ya...@gmail.com wrote: I got following exception wehn i deploy a application to google apps engineEverything works fine with EclipsePlugin...May be EclipsePlugin not able to catch this.. I filed a Bug report... http://code.google.com/p/googleappengine/issues/detail?id=2606 java.lang.RuntimeException: java.io.NotSerializableException: com.google.apphosting.utils.jetty.AppEngineWebAppContext $AppEngineServletContext at com.google.apphosting.runtime.jetty.SessionManager.serialize (SessionManager.java:361) at com.google.apphosting.runtime.jetty.SessionManager.createEntityForSession (SessionManager.java:341) at com.google.apphosting.runtime.jetty.SessionManager $AppEngineSession.save(SessionManager.java:162) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter (SaveSessionFilter.java:41) 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.serviceReques t (JettyServletEngineAdapter.java:135) at com.google.apphosting.runtime.JavaRuntime.handleRequest (JavaRuntime.java:235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5233) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest (BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 363) at com.google.net.rpc.impl.Server$2.run(Server.java:838) at com.google.tracing.LocalTraceSpanRunnable.run (LocalTraceSpanRunnable.java:56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan (LocalTraceSpanBuilder.java:536) at com.google.net.rpc.impl.Server.startRpc(Server.java:793) at com.google.net.rpc.impl.Server.processRequest(Server.java:368) at com.google.net.rpc.impl.ServerConnection.messageReceived (ServerConnection.java:448) at com.google.net.rpc.impl.RpcConnection.parseMessages (RpcConnection.java:319) at com.google.net.rpc.impl.RpcConnection.dataReceived (RpcConnection.java:290) at com.google.net.async.Connection.handleReadEvent(Connection.java: 466) at com.google.net.async.EventDispatcher.processNetworkEvents (EventDispatcher.java:759) at com.google.net.async.EventDispatcher.internalLoop (EventDispatcher.java:205) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java: 101) at com.google.net.rpc.RpcService.runUntilServerShutdown (RpcService.java:251) at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run (JavaRuntime.java:394) at java.lang.Thread.run(Unknown Source) -- 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
[appengine-java] Adding boolean / int field to data model impossible ?
Hello, I have encountered a problem with adding additional field to my datamodel. I understood that existing entites get null values on added field, but null is not allowed on boolean and int for example? GAE won't even let me iterate entities to update these fields. Well in this case I had about 20 entities, so I created String field instead, than in Datastore Viewer changed field Type of each entity, but that is UGLY way. Is there any other solution? -- 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] handling com.google.apphosting.api.ApiProxy$RequestTooLargeException: The request to API call datastore_v3.Put() was too large.
hi, com.google.apphosting.api.ApiProxy$RequestTooLargeException: The request to API call datastore_v3.Put() was too large. was thrown while saving an entity to datastore. I want to handle this exception but I am not getting which exception to catch. Please help me out... 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Adding boolean / int field to data model impossible ?
Use the object types instead of the primitive types; that is, use Boolean instead of boolean, and Integer instead of int. They can be null. Then in your getter for them, check to see if they're null and if so, set them to whatever default value you've chosen, and then return it, unboxed (for example, return myBoolean.booleanValue() and myInteger.intValue()). Szymon Malok wrote: Hello, I have encountered a problem with adding additional field to my datamodel. I understood that existing entites get null values on added field, but null is not allowed on boolean and int for example? GAE won't even let me iterate entities to update these fields. Well in this case I had about 20 entities, so I created String field instead, than in Datastore Viewer changed field Type of each entity, but that is UGLY way. Is there any other solution? -- 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.