[appengine-java] JDO - Add a child - Error
Hi! I have a problem when add a class Equipo(child) one Torneo(parent). The code: Transaction tx = pm.currentTransaction(); try { tx.begin(); unTorneo.agregarEquipo(unEquipo); //pm.makePersistent(unEquipo); Torneo tor = (Torneo) pm.detachCopy(unTorneo); pm.makePersistent(tor); tx.commit(); System.out.println(persistioTorneoConEquipo); } finally { //pm.close(); if (tx.isActive()) { tx.rollback(); } } } The exception: INTERNAL_SERVER_ERROR Caused by: java.lang.NullPointerException at org.datanucleus.store.appengine.DatastorePersistenceHandler.deleteObject(DatastorePersistenceHandler.java: 581) at org.datanucleus.store.appengine.DatastoreFKListStoreSpecialization.removeAt(DatastoreFKListStoreSpecialization.java: 145) at org.datanucleus.store.mapped.scostore.FKListStore.removeAt(FKListStore.java: 525) at org.datanucleus.store.mapped.scostore.AbstractListStore.remove(AbstractListStore.java: 318) at org.datanucleus.sco.backed.List.remove(List.java:907) at org.datanucleus.sco.SCOListIterator.remove(SCOListIterator.java: 145) at org.datanucleus.sco.SCOUtils.updateListWithListElements(SCOUtils.java: 828) at org.datanucleus.sco.simple.List.attachCopy(List.java:232) at org.datanucleus.store.fieldmanager.AttachFieldManager.storeObjectField(AttachFieldManager.java: 205) at org.datanucleus.state.AbstractStateManager.providedObjectField(AbstractStateManager.java: 1037) at model.Torneo.jdoProvideField(Torneo.java) at model.Torneo.jdoProvideFields(Torneo.java) at org.datanucleus.state.JDOStateManagerImpl.provideFields(JDOStateManagerImpl.java: 2715) at org.datanucleus.state.JDOStateManagerImpl.internalAttachCopy(JDOStateManagerImpl.java: 4055) at org.datanucleus.state.JDOStateManagerImpl.attachCopy(JDOStateManagerImpl.java: 3987) at org.datanucleus.ObjectManagerImpl.attachObjectCopy(ObjectManagerImpl.java: 1778) at org.datanucleus.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.java: 1260) at org.datanucleus.ObjectManagerImpl.persistObject(ObjectManagerImpl.java: 1175) at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java: 669) at org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java: 694) at controllers.ControladorTorneo.agregarEquipoConTorneo(ControladorTorneo.java: 135) at struts.action.NuevoEquipo.execute(NuevoEquipo.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) -- 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] Roadmap plans
I have noticed three issues that have been continually mentioned but the date for projected fix (if at all) is unclear. Does anyone know of availability or projected availability. The three are: 1. EL2.2 support for JSF 2. This will allow parameters to be used with action method calls. The issue has been there since summer 2010. 2. Servlets 3.0 3. SQL availability with Appengine for Business (originally 3rd quarter of 2010) Dave -- 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: JSP runtime errors in Eclipse plugin
Hi Rich I Got jsp error in The Guestbook from samples GAE r5(last release) running java 6 build 23 (last one ) in Windows vista. What versions you have? /cygdrive/c/users/juan/desktop/ndk/ndk5.0/android-ndk-r5 $ bash ndk-build platforms/android-9 Android NDK: Could not find application project directory ! Android NDK: Please define the NDK_PROJECT_PATH variable to point to it. /cygdrive/c/users/juan/desktop/ndk/ndk5.0/android-ndk-r5/build/core/ build-local. mk:85: *** Android NDK: Aborting. Stop. -- 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] Best way to approach templating?
I'm new to the Java App Engine and I've been searching for a way to have a general template or theme for my site. I have a header, menu, and side bar that will stay the same for all pages, so why not manage it through one single jsp file? My thought was to have a jsp:include for the actual content of a page. Such as when a user goes to mysite.com/aboutus, the servlet gives the template, and the template includes aboutus.jsp. I think I've found you can't have dynamic includes though. I tried this: In the aboutus doGet() : req.setAttribute(page, aboutus); req.getRequestDispatcher(/template.jsp).include(req, resp); in the template.jsp: jsp:include file=%= request.getAttribute(page) %.jsp/ but always get errors. Any thoughts on the best practices for templates in GAE/java? -- 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] countEntities problem
Hi, I'm using the low level API, and noticed something strange: If I call : service.prepare( new Query(USER_KIND).addFilter(active, FilterOperator.EQUAL, Boolean.TRUE) .addFilter(registrationDate, FilterOperator.GREATER_THAN_OR_EQUAL, date).setKeysOnly()) .countEntities(FetchOptions.Builder.withDefaults()) it returns 0. However If I call: service.prepare( new Query(USER_KIND).addFilter(active, FilterOperator.EQUAL, Boolean.TRUE) .addFilter(registrationDate, FilterOperator.GREATER_THAN_OR_EQUAL, date).setKeysOnly()) .asList(FetchOptions.Builder.withDefaults()).size() it returns 3 - in this case this is the correct answer. I'm very curious what happens here. Is there a problem with the indexes? But if I not correctly configured my indexes, I guess, the second query should fail similarly with returning 0 entity. Any thought ? Is it a bug in the datastore ? BR Zsombor -- 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] countEntities problem
Try adding a limit to the count query On Sun, Dec 19, 2010 at 6:35 PM, Zsombor gzsom...@gmail.com wrote: Hi, I'm using the low level API, and noticed something strange: If I call : service.prepare( new Query(USER_KIND).addFilter(active, FilterOperator.EQUAL, Boolean.TRUE) .addFilter(registrationDate, FilterOperator.GREATER_THAN_OR_EQUAL, date).setKeysOnly()) .countEntities(FetchOptions.Builder.withDefaults()) it returns 0. However If I call: service.prepare( new Query(USER_KIND).addFilter(active, FilterOperator.EQUAL, Boolean.TRUE) .addFilter(registrationDate, FilterOperator.GREATER_THAN_OR_EQUAL, date).setKeysOnly()) .asList(FetchOptions.Builder.withDefaults()).size() it returns 3 - in this case this is the correct answer. I'm very curious what happens here. Is there a problem with the indexes? But if I not correctly configured my indexes, I guess, the second query should fail similarly with returning 0 entity. Any thought ? Is it a bug in the datastore ? BR Zsombor -- 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. -- Guit: Elegant, beautiful, modular and *production ready* gwt applications. http://code.google.com/p/guit/ -- 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: Entity relationship designing - best practice
I am not expert in dataStore this is just what I would do: Add new entity with fields: ID OrderID UserID ExamID PageID QuestionID AnswerID Yes it is a lot of redundant data, but simple. When user starts new Exam, all data are created with AnswerID set to general answer unAnswer. After that you just update AnswerID. What are obstacle in design like this? Best, M -- 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] What does Memcache put: Error setting single item mean?
Hello, I'm having a trouble when I use memcached. When I use put method of memcached, I occasionally have a MemcacheServiceException. It says that MemcacheServiceException memcache put: Error setting single item ([memcache key name]) It happens NOT always. I think it maybe happens when I put large data in memcached. Could you tell me Memcache put: Error setting single item means? Thenks for your answer Shinohara -- 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] What sort of indexes does GAE use for queries that use only equality and ancestor filters?
Documentation says: App Engine provides automatic indexes for the following forms of queries: queries using only equality and ancestor filters For implementation of this feature GAE uses single-property indexes or composite indexex or something else? If composite indexexes then how many indexes are used (for example: all possible permutations for properties)? -- 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: Persist child - Problem
Is the child annotated as @persistence capable? Is it serializable? It also depends on the type of keys used and key generator strategy. Show us the code defining each class and we'll let you know. Quizas asi te ayudamos a poner tu equipo en primera divisiĆ³n! :-) -- 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.