datanucleus

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")

Using JDO Persistent classes from a separate module with datanucleus maven plugin

こ雲淡風輕ζ 提交于 2019-12-12 07:27:05
问题 I have a working application that persists to a database using JDO - I want to use a PersistenceCapable class that's in a second java module. Although the app compiles a simple test gives the error: The class "com.hello.world.Foo" is not persistable This means that it either hasnt been enhanced, or that the enhanced version of the file is not in the CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data/annotations for the class are not found. Ok, so the enhancer plugin is not

Duplicate entry Exception using GoogleAuthorizationCodeFlow with JdoCredentialStore and DataNucleus

可紊 提交于 2019-12-12 05:32:11
问题 I have a problem with the GoogleAuthorizationCodeFlow ( Java ). I am trying to build a Google Calender connection for my web project using Google's "OAuth 2.0 for Web Server Applications". Therefore you are able to use Google's Java api libraries. I use Google's AuthorizationCallbackServlet to recieve an access and refresh token. GoogleAuthorizationCodeFlow persists the created Credential with GoogleAuthorizationCodeFlow and their JdoCredentialStore. As a JDO implementation I am using

Datanucleus Mongodb with authentication

泪湿孤枕 提交于 2019-12-12 05:12:12
问题 I am using datanucleus for JPA on Heroku with mongodb (mongolabs). Even when I set these properties: datanucleus.ConnectionPassword=YYYYY datanucleus.ConnectionUserName=XXXXX I get PersistenceException: Authentication of the connection failed for datastore heroku_app2765673 with user XXXXXXX Does datanucleus support connecting to mongodb with a password? It seems to know my username, so I assume so. What am I doing wrong? 回答1: Removing and readding my mongolabs account seems to have fixed

Roo 1.1.5 super basic application is buggy

落爺英雄遲暮 提交于 2019-12-12 03:04:38
问题 I'm using Roo 1.1.5, with Eclipse STS, here is what I do: I create a new Spring Roo Project from Eclipse, and in the Roo Shell, I type the following: persistence setup --provider DATANUCLEUS --database H2_IN_MEMORY entity --class ~.domain.Task field string --fieldName description --notNull --sizeMin 3 --sizeMax 512 field boolean --fieldName completed --notNull controller all --package ~.controller A more verbose description is in my blog, but what reported above is basically what I do. In a

Datanucleus JDO Retrieve newly generated primary key

守給你的承諾、 提交于 2019-12-12 01:35:43
问题 I am using datanucleus and jdo in a GWT project. How can I retrieve the generated primary key after adding an element to the database with makePersistent() Edit We use annotations, here is the primary key: @PrimaryKey @Column(name = "id_bla", allowsNull = "false") @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY, extensions = { @Extension(vendorName = "datanucleus", key = "strategy-when-notnull", value = "false") }) private Long idBla; I am not the one who did the mapping and I don't

ArrayList of super class type

别来无恙 提交于 2019-12-12 01:09:49
问题 I use mongodb-datanucleus in my project. I configure my jdoconfig.xml as follow : <persistence-manager-factory name="mongodb-factory"> <property name="javax.jdo.PersistenceManagerFactoryClass" value="org.datanucleus.api.jdo.JDOPersistenceManagerFactory" /> <property name="javax.jdo.option.ConnectionURL" value="mongodb:localhost/test" /> <property name="javax.jdo.option.Mapping" value="mongodb" /> <property name="javax.jdo.option.ConnectionUserName" value="username" /> <property name="javax

Roo 1.2.0 basic application with datanucleus still buggy

╄→гoц情女王★ 提交于 2019-12-11 22:45:33
问题 A few days ago, I posted Roo 1.1.5 super basic application is buggy, and just recently on Dec 17, 2011, Spring Roo 1.2.0 has been released. I created the equivalent project: project --topLevelPackage task --java 6 --projectName Task jpa setup --provider DATANUCLEUS --database H2_IN_MEMORY entity jpa --class ~.domain.Task field string --fieldName description --notNull --sizeMin 3 --sizeMax 512 field boolean --fieldName completed --notNull web jsf setup controller all --package ~.controller

Persisting user type with DataNucleus

丶灬走出姿态 提交于 2019-12-11 20:16:55
问题 I'm using datanucleus with mongodb. I want to persist my own type (which extends java.util.Set) but not able to. It throws exception. What should I be doing? Here is the code: My custom object which is part of my object which I want to persist - CustomSet.java import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.Set; public class CustomSet<E> implements Set<E> { private final Set<E> hashSet = new HashSet<E>(); @Override public int size() { return

Flaky Loading of 1-N Relationships with DataNucleus 3.x

丶灬走出姿态 提交于 2019-12-11 18:44:19
问题 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 UPDATE : This problem also occurred with version 3.1 and is related to DataNucleus' Level2 cache. See my answer below for a workaround. The class that I am trying to load is as