datanucleus

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

人盡茶涼 提交于 2019-12-01 13:28:00
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 running on the classes in the second module. I'm not sure what i need to do to point the enhancer at that

Datanucleus JPA 2 Level 2 cache in Google AppEngine

时光怂恿深爱的人放手 提交于 2019-12-01 09:44:22
What am I missing in the following configuration that my Datanucleus JPA 2 Level 2 cache is not using Google App Engine Memcache service? I am using the GAE 1.7.2 SDK. In the persistence.xml: <persistence-unit name="transactions-optional"> <provider>org.datanucleus.api.jpa.PersistenceProviderImpl</provider> <properties> <property name="datanucleus.NontransactionalRead" value="true"/> <property name="datanucleus.NontransactionalWrite" value="true"/> <property name="datanucleus.ConnectionURL" value="appengine"/> <property name="datanucleus.appengine.datastoreReadConsistency" value="EVENTUAL" />

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

Multiple unique constraints in JPA

喜夏-厌秋 提交于 2019-11-29 19:55:48
Is there a way to specify using JPA that there should be multiple unique constraints on different sets of columns? @Entity @Table(name="person", uniqueConstraints=@UniqueConstraint(columnNames={"code", "uid"})) public class Person { // Unique on code and uid public String code; public String uid; // Unique on username public String username; public String name; public String email; } I have seen a hibernate specific annotation but I am trying to avoid vendor specific solutions as we are still deciding between hibernate and datanucleus. The @Table 's attribute uniqueConstraints actually accepts

one to many relationship in java google ap engine caused error ?

只谈情不闲聊 提交于 2019-11-29 18:03:06
i have implement a system to save information about user . So i have aggregation at my class so the user class has list from contact class ...etc in the first page "test it's just for register the user just by phone number " that must save the user in database but this cause error when i deploye my project in Google app engine < 500 server error > and the other page for update the exist user who previously has been registered, so at this will add to the list which the user object has . user class @PersistenceCapable public class User implements Serializable{ @PrimaryKey @Persistent

The command line is too long Standard error from the DataNucleus tool

本秂侑毒 提交于 2019-11-29 11:38:22
I am getting this error The command line is too long. mvn install Standard error from the DataNucleus tool org.datanucleus.enhancer.DataNucleusEnhancer The command line is too long. If you is using datanucleus-maven-plugin in windows simply set fork property as false in configuration of plugin as follow: <plugins> ... <plugin> <groupId>org.datanucleus</groupId> <artifactId>datanucleus-maven-plugin</artifactId> <version>3.3.0-release</version> <configuration> <verbose>true</verbose> <fork>false</fork> <!-- Solve windows line too long error --> </configuration> </plugin> ... </plugins> See the

Apache spark Hive, executable JAR with maven shade

心已入冬 提交于 2019-11-29 10:38:20
I'm building apache-spark application with Apache Spark Hive. So far everything was ok - I've been running tests and whole application in Intellij IDEA and all tests together using maven. Now I want to run whole application from bash and let it run with local single-node cluster. I'm using maven-shade-plugin to build single executable JAR. Application crashes when it tries to create new HiveContext out of SparkContext. Thrown exception tells me that hive can't create metastore because there is some problem with datanucleus and its plugin system. I tried to follow several questions how to run

How to turn off DataNucleus Enhancer while working with Google App Engine

你说的曾经没有我的故事 提交于 2019-11-28 22:58:38
问题 I am working in Eclipse on a Google AppEngine Java code. Every time I save a java file, the DataNucleus Enchancer starts off "Enhancement of Classes". Its quite irritating since it takes away focus when you are in full screen mode. Anybody knows how I can turn it off? If I turn it off, will it affect my ability to deploy my application to App Engine from within Eclipse? 回答1: You can restrict which classes DataNucleus watches for changes so that it only re-runs the enhancement when your model

Datanucleus, JDO and executable jar - how to do it?

删除回忆录丶 提交于 2019-11-28 10:23:41
I am developing a desktop app with Datanucleus and JDO for embedded H2 database. It all works fine when I run it from Eclipse, but it stops working when I try to make executable jar out of it. I get a following error: org.datanucleus.exceptions.NucleusUserException: Persistence process has been specified to use a ClassLoaderResolver of name "jdo" yet this has not been found by the DataNucleus plugin mechanism. Please check your CLASSPATH and plugin specification. Of course it shows that I have not configured something properly - what am I missing? If I was missing something big, it wouldn't

How can I run DataNucleus Enhancer from Gradle?

家住魔仙堡 提交于 2019-11-28 08:42:57
Is there a gradle plugin for running DataNucleus Enhancer? As I can see from documentation you can run it only from Maven or Ant: http://www.datanucleus.org/products/datanucleus/jpa/enhancer.html I searched and found no plugin for running the DataNucleus Enhancer from Gradle. But there is a way of doing this by using the DataNucleus Enhancer Ant task. I added the following in my build.gradle . task datanucleusEnhance { description "Enhance JPA model classes using DataNucleus Enhancer" dependsOn compileJava doLast { // define the entity classes def entityFiles = fileTree(sourceSets.main.output