datanucleus

DN 2.0.0 & Eclipse 3.4.2

Tried to install DN 2.0.0 from scratch on Eclipse RCP 3.4.2 development env. org.datanucleus.ide.eclipse_2.0.1 was installed via eclipse updates datanucleus-core-2.0.0-release.jar datanucleus-enhancer-2.0.0-release.jar datanucleus-rdbms-2.0.0-release.jar were added to the CLASSPATH. HERE is the project MAN...

Entity to DTO conversion with JPA

I'm using DataNucleus as a JPA implementation to store my classes in my web application. I use a set of converters which all have toDTO() and fromDTO(). My issue is, that I want to avoid the whole DB being sent over the wire: If I lazy load, the converter will try to access ALL the fields, and load then (resulting in very eager l...

How to activate datanucleus java-type extensions for JPA?

I have a simple JPA @Entity that has a property of type java.util.Locale. When I try and persist this, I get the following error: java.lang.IllegalArgumentException: locale: java.util.Locale is not a supported property type. at com.google.appengine.api.datastore.DataTypeUtils.checkSupportedSingleValue( DataTypeUtils.java:174...

persistence.xml ignores Hibernate and chooses DataNucleus

Hi, I'm toying around with GWT (dunno if this matters) and Hibernate. I've created a a file persistence.xml in META-INF with (amoung) other configuration the line: org.hibernate.ejb.HibernatePersistence But when I startup the EntityManager it chooses DataNucleus instead of Hibernate (which later fails because it isnt installed (jar are ...

Google App Engine - org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed

Why does the code below result in org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed? The exception appears to be thrown at query.getResultList(). public final void removeUserTokens(final String username) { final Query query = entityManager.createQuery( "SELECT p FROM PersistentLogin p WHERE user...

Empty list in appengine datastore: java vs python

I have the following java model class in AppEngine: public class Xyz ... { @Persistent private Set<Long> uvw; } When saving an object Xyz with an empty set uvw in Java, I get a "null" field (as listed in the appengine datastore viewer). When I try to load the same object in python (through remote_api), as defined by the follow...

Google App Engine - can't operate on multiple entity groups in a single transaction

Why am I receiving the exception below if the type of both entities is PersistentLogin? I thought that would mean they are in the same entity group, but I guess that is an incorrect assumption. Any ideas how to fix this? This is the code: // the class is marked with @Transactional @Override public final void removeUserTokens(final Stri...

DataNucleus Enhancer, JDO and Specifying Column Names

I'm working with DataNucleus as part of a Google App Engine project and I'm having a bit of trouble with columns in persistence. @PrimaryKey(column = "user_id") @Column(name = "user_id") @Persistent(name = "user_id", column = "user_id", valueStrategy = IdGeneratorStrategy.IDENTITY) private Key m_id; @Column(name = "user_name") @Persist...

Store java.util.Calendar field into one column

How to store java.util.Calendar field into one column with Datanucleus JDO. By default it is stored into two columns (millisecs, Timezone) with following JDO metadata. field name="startDate" serialized="true" embedded="true" persistence-modifier="persistent" What need to be changed in metadata to sto...

JPA and GWT failing.

I'm trying to use JPA with GWT. My serviceImpl calls UserDAO.exists(user); When I run a test case, which calls the same method, with the same parameters, it runs ok. When I do the RPC call, if fails horribly (error at the end). When I rename persistence.xml to someothername.xml, I get the SAME error, so I'm inclined to think that GW...

Is there any advantage for using a library other than Hibernate for JPA?

Hi, I've been using JPA for some time now and been in projects where we've used both Hibernate Annotations and Toplink Essentials. AFAIK the project leader chose Toplink because Netbeans had it integrated and seemed to be the easy thing to do. However when looking for help, most of the literature seemed to assume that you are using Hi...

Can Hibernate be used as the JPA provider in Google App Engine

Can Hibernate 3.5.x be used as the JPA provider instead of the default provider in the latest version of Google App Engine (1.3.2) ...

Maven building for GoogleAppEngine, forced to include JDO libraries?

Hi, I'm trying to build my application for GoogleAppEngine using maven. I've added the following to my pom which should "enhance" my classes after building, as suggested on the DataNucleus documentation <plugin> <groupId>org.datanucleus</groupId> <artifactId>maven-datanucleus-plugin</artifactId> ...

Datanucleus 2.x AND Eclipse RCP 3.4

Hi, ANYONE using Datanucleus (http://www.datanucleus.org/) with ECLIPSE RCP? Eclipse DOES NOT recognize Datanucleus has a PLUGIN, with versions of DN newer than 1.1.0m3 :-( The JARS i currently use, and the LAST ONES being recognized has plugins by eclipse (copied directly to \eclipse\plugins folder) are from datanucleus-accessplatfor...

JDOQL (datanucleus) query compiling error in GregorianCalendar field

Following query gives a NullPointerException when complie it. Query query = pm.newQuery(Festival.class); query.setFilter("this.startDate == sDate"); query.declareImports("import java.util.GregorianCalendar"); query.declareParameters("GregorianCalendar sDate"); query.compile(); Class: public class Festival{ ... private G...

How can I turn an Eclipse GWT/GAE app into an Eclipse Tomcat/mySQL app?

Hi Everyone. Sorry in advance for the long post but the problem I am facing here is quite crucial for me, so here we go... I have a Eclipse GWT (2.0) Web Application using the the GAE and making transactions with its datastore. On the other hand I would like to make sure that I can also deploy this web application on another infrastruc...

Java: JDOQL startsWith query, case sensitive

I'm using the .startsWith() filter in a JDOQL query but it's case sensitive. So startsWith("ab") doesn't return "Abc" result and so on. Will I need to use a SQL query to avoid this ? ...

Maven problems using GAE and DataNucleus

I'm having trouble retrieving 2 artifacts in my Maven/Java/Google App Engine project: com.google.appengine.orm:datanucleus-appengine:jar:1.0.7.final com.google.appengine:appengine-api-1.0-sdk:jar:1.3.4 There's a similar question posted, but each answer brings me back to the same error message. More detail I don't know if it is re...

Declarative JDOQL vs Single-String JDOQL : performance

When querying with JDOQL is there a performance difference between using the declarative version and the Single-String version: Example from the JDOQL doc: //Declarative JDOQL : Query q = pm.newQuery(org.jpox.Person.class, "lastName == \"Jones\" && age < age_limit"); q.declareParameters("double age_limit"); List results = (List)q.execu...

How to iterate JPA collections in Google App engine

Hi I use Google App Engine with datanucleus and JPA. I'm having a real hard time grasping how I'm supposed to read stuff from data store and pass it to JSP. If I load a list of POJOs with entitymanager and pass it to JSP, it crashes to org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed. I understand why thi...