Hi,
I have an interface
@PersistenceCapable
public interface MyInterface {
public abstract String getName();
public abstract void setName(String name);
}
The persistence layer uses JDO. The JDO implementation is DataNucleus. Now I want to query for any instances of that interface with JDOQL.
Query query = getPersistence...
Hello SO,
I have a JPA Query I am executing on the Google App-Engine datastore.
I am building the query using parameters.
After all parameters have been inputted, I wish to view the Query String.
That is, I wish to view the actual query being executed by the datastore.
Is that even possible?
It would really help me in debugging.
To SOL...
I have DN 2.x on Eclipse RCP (currently Helios).
I'm having trouble Turning the DN LOG on.
I use log4j.properties, where i define all the DataNucleus Categories LOG levels.
It LOGS fine with the "external" enhancer (i just pass the argument on the "VM Arguments" of the RUN configurations -Dlog4j.configuration=file:"...\log4j.propertie...
I have a basic java-maven-wicket project and need a persistence layer. I want to start with something fairly simple and low maintenance so I can concentrate on the business logic. I've been using db4o directly but have been having some issues and would like to move to using datanucleus as it supports both db4o or regular rdbms. Unfortuna...
Hello all,
Let's say an Owner has a collection of Watch(es).
I am trying to create Watches and add the newly created Watches to an existing Owner's collection of watches (an arraylist).
My method is as follows:
public void add(String ownerName, String watchName) {
Owner o = new OwnerDAO().retrieve(ownerName); //retrieves owner o...
I have two classes, Truck and Tweeter, where every Truck must have a Tweeter and every Tweeter can have any number of Trucks associated with it. All I want is to be able to store a reference of the associated Tweeter in all my Truck objects so I can access it without having to explicitly look it up. Given a Tweeter, I don't need to kno...
I am getting below error whilst trying to persist an object that has a collection of interfaces which I want to hold a couple of different types of objects. Seems to be happening almost randomly. Sometimes after restarting it works ok ( I might be doing something wrong though).
class CommentList {
@Persistent
@Join
ArrayList<IComment> ...
I cant imagine any more methods to solve my problem. Here's a thread I made yesterday that describes the parent and child class in detail: http://stackoverflow.com/questions/3800450/many-to-one-unidirectional-gae-jdo-relationship-amongst-entities
I'm trying to add a Truck and persist it, but the persistence manager insists that the p...
I'm trying to construct a JDOQL query (using datanucleus) that will search for matches of a parent class based on criteria in an owned one-to-many child class. The query looks like this:
Query lQ = lPm.newQuery("select from "+Module.class.getName()+
" where moduleMappings.contains(m)" +
" && showNameParam.ma...
Datanucleus supports some pool manager options:
http://www.datanucleus.org/products/accessplatform_2_2/rdbms/connection_pooling.html
DBCP plugin
C3P0 plugin
Proxool plugin
And recently
BoneCP plugin
I've tried EVERYONE of them, with NO success, because of OSGI (i'm under ECLIPSE RCP)
The closest i've been to succeed was with DBCP...
Started getting errors with SQL Server 2005
This is the first time i've tested our app with Datanucleus 2.x (last test was made with DN 1.x)
I use Eclipse RCP.
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The ntext data type cannot be selected as DISTINCT because it is not comparable.
at com.microsoft.sqlserver.jdbc.SQL...
I just tested the H2 datastore (with Datanucleus 2.x)
The performance is VERY slow. 1/3 of Postgres and 1/10 of MySQL (aprox.)
I was very pleased by the "specs" but i cannot see them in "real usage".
http://www.h2database.com/html/performance.html
Is there any performance tuning that i might be missing?
NOTE: even when accessing "our...
I'm successfully pulling back my objects however, I would like for them to already be sorted by a field in the object.
I have this working:
new Ajax.Request("/dn/com.emooney.meeting.beans.Meeting?groupName=='"+name+"'"
But I want to do something like this:
new Ajax.Request("/dn/com.emooney.meeting.beans.Meeting?groupName=='"+name+"...
I'm on windows XP using eclipse and the datanucleus enhancer for a gwt + gae app. When I run the enhancer, I get an error:
Error
Thu Oct 21 16:33:57 CDT 2010
Cannot run program "C:\Program Files\Java\jdk1.6.0_18\bin\javaw.exe" (in directory "C:\ag\dev"): CreateProcess error=87, The parameter is incorrect
java.io.IOException: Cannot r...
I'm trying to follow these instructions to configure the DataNucleus enhancer:
If using Eclipse you need to edit your
project properties. Go to Java
Compiler -> Annotation Processing and
enable the project specific settings
and enable annotation processing. Then
go to Java Compiler -> Annotation
Processing -> Factory Path...
I tried using the following query:
Query q = getPersistenceManager().newQuery(
getPersistenceManager().getExtent(ICommentItem.class, false)
);
but got:
org.datanucleus.exceptions.NoPersistenceInformationException: The class
"com.sampleapp.data.dataobjects.ICommentItem" is required to be persistable yet no Meta -Data/Annotations c...
I've created a simple webapp using Spring & Jetty, and am creating a hello world JDO test using DataNucleus & DB4O.
I can persist a class no problem, but when I go to query for the class I get a ClassCastException, can't cast a.b.c.MyClass to a.b.c.MyClass.
When I examine the classloader of the original object I created, it's [WebAppCl...
I have the following data model class defined:
@PersistenceCapable
public class TestSerializableModelObj {
@Persistent(serialized="true", defaultFetchGroup="true")
private MyPOJO myField;
@Persistent(serialized="true", defaultFetchGroup="true")
private Collection<MyPOJO> myCollection;
// getter/setters
}
MyPOJO i...
I'm using the datastore of the Google App Engine (DataNucleus). I have two classes, one Chat and one Rating. A chat can be rated more then ones so I created an one-many relationship by adding a list to the Chat class.
Now I want to know the number of unrated chats, so I did the following:
int numberOfChatsInStock = 0;
for(Chat chat : ...
Just the basics: I'm using DataNucleus backed with an embedded DB4O database.
If I do this simple test:
PersistenceManager pm1 = persistenceManagerFactory.getPersistenceManager();
PersistenceManager pm2 = persistenceManagerFactory.getPersistenceManager();
pm1.makePersistent(t1);
pm2.makePersistent(t2);
I get a file l...