jdo

Why do I get “Persistence Manager has been closed” exception [closed]

只谈情不闲聊 提交于 2019-12-14 03:34:23
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . My application various pieces occasionaly throw following exception Javax.jdo.JDOFatalUserException: Persistence Manager has been closed at org.datanucleus.jdo.JDOPersistenceManager.assertIsOpen

Need help in deciding java framework, libraries

不想你离开。 提交于 2019-12-13 19:44:14
问题 I am planning to develop open source java application to work on google app engine as well as normal rdbms system, so please help me in choosing MVC Framework - Struts / Spring MVC ? ORM - JDO / JPA ? I am considering performance as a key factor. 回答1: For app engine you will want a lightweight framework, both for persistance and application stuff. Google is changing their pricing model so you might want to consider how this will impact your plans as well. There is an interesting discussion on

DatastoreJDOPersistenceManagerFactory class not found exception when configuring JDO on Appengine

大憨熊 提交于 2019-12-13 19:18:27
问题 I am trying to configure JDO on Appengine but every time I try to persist something I get an java.lang.ClassNotFoundException: org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory Searching for this error I only got that I could have an error in my jdoconfig.xml But I explicitly declare that I want to use this class my jdoconfig.xml, which I posted below. <?xml version="1.0" encoding="utf-8"?> <jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig" xmlns:xsi="http:/

JDO basics: List or array won't retrieve or return with GWT RPC

寵の児 提交于 2019-12-13 10:47:42
问题 I've been using Objectify up till now, but now I have to deal with some code using JDO. I'm having problems with basic stuff that is easy with Objectify, specifically: if an object has either a List or an array as a member, I can't get that to persist. I have a class FileInfoBatch (code indents lost here, don't know why) containing a List of FileInfo: @PersistenceCapable public class FileInfoBatch implements Serializable{ private static final long serialVersionUID = 1L; @PrimaryKey

App Engine JDO Transaction on multiple many-to-one

只愿长相守 提交于 2019-12-13 04:12:43
问题 I have a simple domain model as follows Driver - key(string), run-count, unique-track-count Track - key(string), run-count, unique-driver-count, best-time Run - key(?), driver-key, track-key, time, boolean-driver-update, boolean-track-updated I need to be able to update a Run and a Driver in the same transaction; as well as a Run and a Track in the same transaction (obviously to make sure i don't update the statistics twice, or miss out on an increment counter) Now I have tried assigning as

JDO unique fields in Google App Engine

孤街浪徒 提交于 2019-12-13 02:27:21
问题 According to this, Google App Engine's JDO implementation does not support JDO @Unique annotation. Is this still so? For example, I have this class: @PersistenceCapable public class User { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private String email; @Persistent private String sessionToken; ... } Obviously the key is unique, but I also wanted to have unique email and sessionToken . If @Unique is not supported, what's the best way to

Different classloaders cause ClassCastException when persisting data via Spring

回眸只為那壹抹淺笑 提交于 2019-12-12 12:08:28
问题 I'm creating an MVC Spring webapp. Using: Jetty (servlet container), DataNucleus (dao platform), DB4O (embedded datastore). When I persist an object (done from within a Spring Controller) using JDO from DataNucleus, it stores to the DB fine. @PersistenceCapable public class Test { @Persistent private String testString; //getter-setters implemented } When I do a simple query for the objects I previously added I get a ClassCastException on my Test class (can't cast a.b.c.Test to a.b.c.Test ).

JDO Exception: “Query requires 1 parameters, yet 2 values have been provided.”

被刻印的时光 ゝ 提交于 2019-12-12 10:57:59
问题 Despite the fact that my JDO query contains TWO declareParameters statements, the code below produces an error claiming only one parameter is accepted : Query requires 1 parameters, yet 2 values have been provided. The two parameters are amountP and taxP : javax.jdo.Query query= pm.newQuery(Main.class); query.setFilter("amount == amountP && tax < taxP"); query.declareParameters("int amountP"); query.declareParameters("int taxP"); List<Main> results = (List<Main>)query.execute (amountP, taxP);

Generate JDO objects from existing database

允我心安 提交于 2019-12-12 09:04:01
问题 Is there a tool to generate JDO objects from an existing database? I prefer a awesome looking Eclipse plugin which i could use to generate and maintain the object but it seems that this is currently not existing. Are other, simple tools to generate the database objects? 回答1: JDO objects are not simple wrappers around database rows (although you can implement your JDO objects as simple wrappers around database rows if that is what you wish). As such, most automated tools will not know how the

Inconsistent Fetch From Google App Engine Datastore

二次信任 提交于 2019-12-12 08:38:53
问题 I have an application deployed in Google app engine. I am getting inconsistent data when i fetch an entity by id immediately after updating that entity. I'm using JDO 3.0 to access the app engine datastore. I have an entity Employee @PersistenceCapable(detachable = "true") public class Employee implements Serializable { /** * */ private static final long serialVersionUID = -8319851654750418424L; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY, defaultFetchGroup = "true")