jdo

Google App Engine JDO enhancement is failing

喜欢而已 提交于 2020-04-06 10:50:35
问题 I am trying to build my first Google App Engine WAR and am setting up my own external (outside of Eclipse) Ant build to be executed from the terminal. I'm trying to get the <enhance_war/> Ant macro working and am running into a bizarre NoSuchMethodError . Here's my Ant target: <target name="package" depends="gendocs"> <echo message="Enhancing WAR JDO classes." /> <enhance_war war="war" /> <echo message="Packaging the WAR file." /> <war destfile="gen/dist/myapp.war" webxml="war/web.xml">

Google App Engine JDO enhancement is failing

与世无争的帅哥 提交于 2020-04-06 10:50:21
问题 I am trying to build my first Google App Engine WAR and am setting up my own external (outside of Eclipse) Ant build to be executed from the terminal. I'm trying to get the <enhance_war/> Ant macro working and am running into a bizarre NoSuchMethodError . Here's my Ant target: <target name="package" depends="gendocs"> <echo message="Enhancing WAR JDO classes." /> <enhance_war war="war" /> <echo message="Packaging the WAR file." /> <war destfile="gen/dist/myapp.war" webxml="war/web.xml">

org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed

泪湿孤枕 提交于 2020-01-15 15:11:08
问题 I am getting the following error message: org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed I have read up on everything I could find on it but I still don't understand what is causing it. I am about to give up and switch to an SQL DB if I cannot resolve this simple issue. Yes I am closing the pm: static void persistAll(Object[] objs) { PersistenceManager pm = PMF.get().getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); for

org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed

醉酒当歌 提交于 2020-01-15 15:09:50
问题 I am getting the following error message: org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed I have read up on everything I could find on it but I still don't understand what is causing it. I am about to give up and switch to an SQL DB if I cannot resolve this simple issue. Yes I am closing the pm: static void persistAll(Object[] objs) { PersistenceManager pm = PMF.get().getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); for

How do I query a single field in AppEngine using JDO

江枫思渺然 提交于 2020-01-15 08:30:28
问题 I've got a Product POJO that looks like. @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Product extends AbstractModel { @Persistent private String name; @Persistent private Key homePage; @Persistent private Boolean featured; public String getName() { return name; } public void setName(String name) { this.name = name; } public Key getHomePage() { return homePage; } public void setHomePage(Key homePage) { this.homePage = homePage; } public boolean isFeatured() {

JDO - Querying/linking child by parent (Google App Engine)?

别来无恙 提交于 2020-01-07 04:51:09
问题 I've been trying to get JDO working with parent/child relationships, but I'm not having much success. Using the relationship setup as seen here and queries as seen here, I want to be able to link a child to a parent, then be able to query for all children of a given parent. Unfortunately, I don't seem to be querying the children correctly. I keep getting the error: Class Parent for query has not been resolved. Check the query and any imports/aliases specification Here's what my code looks

could not persist data of format map<string,Arraylist> in jdo

一个人想着一个人 提交于 2020-01-06 08:10:31
问题 iam trying to persist a Hashmap data in JDO. initially i created a Hashmap like Map<Integer,String> dat=new HashMap<Integer,String>(); and this worked perfectly and i was able to save data., but when i tried Map<Integer, ArrayList<String>> dat=new HashMap<Integer,ArrayList<String>>(); i got an error like this data: java.util.ArrayList is not a supported property type. am i using a non supported data type ?? is there a better alternative ?? i am just doing this for learning purpose ...so your

2d or 3d array in Google App Engine persistence?

谁都会走 提交于 2020-01-05 14:17:17
问题 Using JDO and Persistence, I'm able to successfully store an ArrayList field and retrieve it from a class later. Unfortunately, arrays like myobject[][][] are not supported, as stated in documentation. I tried ArrayList<ArrayList<myobject>> , but this gives many errors, and careful reading of the documentation would seem to suggest this may not be possible. Is it possible to persist an array of two or more dimensions? If so, what is the most correct way to do this? 回答1: If you want multiple

NullPointerException in JDOPersistenceManager.getObjectById() using DataNucleus 3.0.0-release

余生颓废 提交于 2020-01-05 07:17:24
问题 I am using DataNucleus 3.0.0-release JDO implementation to connect my Java app to MongoDB. The related JARs in my CLASSPATH are as follows: datanucleus-api-jdo-3.0.0-release.jar datanucleus-core-3.0.0-release.jar datanucleus-jdo-query-3.0.0-release.jar datanucleus-mongodb-3.0.0-release.jar mongo-java-driver-2.5.2.jar The class that I am persisting is as follows: @PersistenceCapable(detachable = "true") public class Record implements Serializable, Cacheable<String> { private static final long

NullPointerException in JDOPersistenceManager.getObjectById() using DataNucleus 3.0.0-release

狂风中的少年 提交于 2020-01-05 07:15:27
问题 I am using DataNucleus 3.0.0-release JDO implementation to connect my Java app to MongoDB. The related JARs in my CLASSPATH are as follows: datanucleus-api-jdo-3.0.0-release.jar datanucleus-core-3.0.0-release.jar datanucleus-jdo-query-3.0.0-release.jar datanucleus-mongodb-3.0.0-release.jar mongo-java-driver-2.5.2.jar The class that I am persisting is as follows: @PersistenceCapable(detachable = "true") public class Record implements Serializable, Cacheable<String> { private static final long