jdo

NullPointerException running DataNucleus Enhancer 3.1.0-release

♀尐吖头ヾ 提交于 2019-12-01 21:23:18
I am running DataNucleus enhancer from DOS as follows: java -cp C:\Users\Chania\workspace\myproject\war\WEB-INF\classes\;C:\repo\datanucleus-full-3.1.0-release\lib\datanucleus-enhancer-3.1.0-release.jar;C:\repo\datanucleus-full-3.1.0-release\lib\datanucleus-core-3.1.0-release.jar;C:\repo\datanucleus-full-3.1.0-release\deps\jdo-api-3.1-SNAPSHOT-20110926.jar;C:\repo\datanucleus-full-3.1.0-release\lib\datanucleus-api-jdo-3.1.0-release.jar;C:\repo\datanucleus-full-3.1.0-release\deps\log4j-1.2.14.jar;C:\repo\datanucleus-full-3.1.0-release\deps\asm-4.0.jar -Dlog4j.configuration=file:C:\repo

Where do I set TransactionOptions with JDO / Google App Engine?

眉间皱痕 提交于 2019-12-01 19:17:43
问题 I use JDO within GAE to batch persist objects using the following method: public void makePersistent(PersistenceManager pm, List<Regeling> makePersistent) { Transaction tx = pm.currentTransaction(); try { // Start the transaction tx.begin(); // Persist to the datastore // pm.makePersistentAll(makePersistent); for (int i = 0; i < makePersistent.size(); i += BATCH_SIZE) { int last = i + BATCH_SIZE; last = last > makePersistent.size() ? makePersistent.size() : last; pm.makePersistentAll

Where do I set TransactionOptions with JDO / Google App Engine?

試著忘記壹切 提交于 2019-12-01 18:22:16
I use JDO within GAE to batch persist objects using the following method: public void makePersistent(PersistenceManager pm, List<Regeling> makePersistent) { Transaction tx = pm.currentTransaction(); try { // Start the transaction tx.begin(); // Persist to the datastore // pm.makePersistentAll(makePersistent); for (int i = 0; i < makePersistent.size(); i += BATCH_SIZE) { int last = i + BATCH_SIZE; last = last > makePersistent.size() ? makePersistent.size() : last; pm.makePersistentAll(makePersistent.subList(i, last)); pm.flush(); System.out.println("Made "+last+" items persistent."); } //

Error HBASE-ZOOKEEPER : Too many connections

可紊 提交于 2019-12-01 18:03:58
问题 I am using Hbase-Hadoop combination for my application along with Data Nucleus as the ORM. When I am trying to access hbase via several threads at a single time. It throws exceptions as : Exception in thread "Thread-26" javax.jdo.JDODataStoreException org.apache.hadoop.hbase.ZooKeeperConnectionException: HBase is able to connect to ZooKeeper but the connection closes immediately. This could be a sign that the server has too many connections (30 is the default). Consider inspecting your ZK

Google App Engine JDO enhancement is failing

拈花ヽ惹草 提交于 2019-12-01 08:25:41
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"> <fileset dir="war"> <includes name="**/*.xml" /> </fileset> <lib dir="war/WEB-INF/lib" /> <classes dir="war

How do you properly add/manipulate thousands of children in an entity group?

坚强是说给别人听的谎言 提交于 2019-11-30 16:40:12
This further to my previous question on handling large numbers of objects in BigTables/JDO. Assuming a TransactionAccount could end up with as many as 10,000 objects in its transactions list, how does this work with Goodle app engine? How do you add objects to such a large list without the whole list being loaded into memory? (The assumption is that 10,000 objects shouldn't be loaded into memory?) I am not trying to ask you how to do my homework, I just have no idea where to start to solve this, the app engine documentation and google searching is not helping :( // example only, not meant to

XSD Schema - JAXB marshaling - Datastore(JPA/JDO) Roundtrip

拟墨画扇 提交于 2019-11-30 14:57:30
I'm trying to find a way to accomplish a xsd schema to datastore roundtrip, with minimum effort. I used jaxb to build my object model from schemas, now I would like to store these objects based on JPA (or JDO or something else?). Is it possible, to auto enhance the objects with the missing annotations based on the JAXB Annotations? Is it desirable? Thanks You have several options for this use case. Option #1 - Hyperjaxb3 I have not used this myself, but Hyperjaxb3 is supposed to generate both JAXB and JPA annotations on the model: http://confluence.highsource.org/display/HJ3/Home Option #2 -

Google App Engine, JDO, and equals/hashCode

混江龙づ霸主 提交于 2019-11-30 08:56:47
I've got an app in Google App Engine that was working fine. I realized that one on of my JDO-enhanced objects that I forgot to implement equals and hashCode (I need to use the object in a set). So I did. I didn't really do anything special in these implementations, in fact I just used Eclipse to generate them. Like so: @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent private String appleId; @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((appleId == null) ? 0 : appleId.hashCode()); return

Configuring JDO in Spring 3.1?

时光毁灭记忆、已成空白 提交于 2019-11-30 07:32:12
问题 I used to have all my DAOs extend the JdoDaoSupport class which is now deprecated in Spring 3.1. I've made my own AbstractJdoDao class which wraps the PersistenceManagerFactory and all the DAOs extend from there. Is that the way I should be doing? Also in the documentation on JDO, it seems that the direct instantiation of PersistenceManagerFactory is not the default option, but to use LocalPersistenceManagerFactoryBean wrapped in a TransactionAwarePersistenceManagerFactoryProxy . How to

How do you use list properties in Google App Engine datastore in Java?

六眼飞鱼酱① 提交于 2019-11-30 07:31:59
问题 An object to be placed in the datastore will have a set of tags. public class Model { List<String> tagList ... } In Python, the Google App Engine has the notion of list properties. What is the equivalent notion in Java (if it exists) and how would you use list properties in Java, in JPA and/or in JDO? 回答1: See my blog post exactly on this: Efficient Keyword Search with Relation Index Entities and Objectify for Google Datastore. It talks about implementing search with list properties using