datanucleus

No persistence providers available for “transactions-optional” after trying the following discovered implementations:

喜夏-厌秋 提交于 2020-01-15 06:12:05
问题 I am trying to create a Google App Engine - GAE with JPA 2.0, I have followed all I need to, putting the correct jars in classpath and making sure my Entities are enhanced. But I am having problems creating my EntityManager. My persistence.xml looks like this: <?xml version="1.0" encoding="UTF-8" ?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml

No persistence providers available for “transactions-optional” after trying the following discovered implementations:

喜你入骨 提交于 2020-01-15 06:11:28
问题 I am trying to create a Google App Engine - GAE with JPA 2.0, I have followed all I need to, putting the correct jars in classpath and making sure my Entities are enhanced. But I am having problems creating my EntityManager. My persistence.xml looks like this: <?xml version="1.0" encoding="UTF-8" ?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml

How to set loglevel of the Appengine DataStore in Java

ε祈祈猫儿з 提交于 2020-01-14 13:37:28
问题 I have a logging.properties file in my Java AppEngine project (using java.util.logging ) that looks like this: # Set the default logging level for all loggers to WARNING .level = INFO # tighten logging on the DataNucleus Categories DataNucleus.JDO.level=WARN # - All messages general to JDO DataNucleus.JPA.level=WARN # - All messages general to JPA DataNucleus.Persistence.level=WARN # - All messages relating to the persistence process DataNucleus.Query.level=WARN # - All messages relating to

appengine 1.7.4 sdk and com.google.appengine.datanucleus.DatastoreManager not found

旧巷老猫 提交于 2020-01-07 04:00:22
问题 i have upgraded to appengine 1.7.4 and something is now broken. when deploying to local dev the appengine errors with the following. Class "com.google.appengine.datanucleus.DatastoreManager" was not found in the C LASSPATH. Please check your specification and your CLASSPATH. org.datanucleus.exceptions.ClassNotResolvedException: Class "com.google.appengin e.datanucleus.DatastoreManager" was not found in the CLASSPATH. Please check you r specification and your CLASSPATH. This is NOT a java.lang

Does the JPA optimistic locking specification support validating against a version supplied by a client

夙愿已清 提交于 2020-01-06 02:41:25
问题 Suppose I have an entity defined as follows: @Entity public class MyEntity { @Id @GeneratedValue private Integer id; @Column private String name; @Version int version; // Getters + setters } Suppose also I have a service (REST API or something similar) that allows a user to retrieve information about this entity. It returns the ID, the current name, and the current version. There is also another service that allows a user to update the name of an entity. It accepts the ID, update name, and

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

Got Null when querying datastore by key

拟墨画扇 提交于 2020-01-03 18:56:30
问题 I have two models, Book and Chapter, in a one-to-many relationship. I manually create the keys for both Book and Chapter. To persist, I create a book object then add an instance of chapter to it and then persist book. This works fine, as I see them in the datastore. Now when I try to fetch a chapter from the datastore by key, I get a null object. Here is how the keys look in the datastore: Under Book: name/id = 123 chapters = [Book(123)/Chapter("abc")] Under Chapter: name/id = abc I created

Add scala class to DataNucleus enhancer CLASSPATH

末鹿安然 提交于 2020-01-02 13:04:11
问题 I am writing a Google App Engine web app and wish to use Scala on the server side. I'm using Eclipse and the Google App Engine plugin. However, as soon as I add an empty Scala class source file to my project, the DataNucleus enhancer warns: SEVERE: Class "com.my.package.UserAccount" was not found in the CLASSPATH. Please check your specification and your CLASSPATH. I will eventually get round to making the class persistent but I want to get rid of this error first. So far I've added the Scala

How can I run DataNucleus Bytecode Enhancer from SBT?

非 Y 不嫁゛ 提交于 2020-01-02 07:10:38
问题 I've put together a proof of concept which aims to provide a skeleton SBT multimodule project which utilizes DataNucleus JDO Enhancer with mixed Java and Scala sources. The difficulty appears when I try to enhance persistence classes from SBT. Apparently, I'm not passing the correct classpath when calling Fork.java.fork(...) from SBT. See also this question: How can SBT generate metamodel classes from model classes using DataNucleus? Exception in thread "main" java.lang.NoClassDefFoundError: