Hi,

I have tried all ways I known to delete some schema changing caused
error Entities and failed.

1. Delete on Data Viewer on the console.
Data Viewer shows "No Data Yet."

2. Delete by code
Below is part of the codes:
        Query q = pm.newQuery(CDKFingerprint.class);
        List<CDKFingerprint> results2;
        results2 = (List<CDKFingerprint>) q.execute();
        pm.deletePersistentAll(results2);
But that cause server error:
java.lang.NullPointerException: Datastore entity with kind
CDKFingerprint and key CDKMol(c=cc=cc=c)/CDKFingerprint(1) has a null
property named bits_count.  This property is mapped to
cdkhelper.CDKFingerprint.bits_count, which cannot accept null values.
...
at org.datanucleus.jdo.JDOPersistenceManager.deletePersistentAll
(JDOPersistenceManager.java:795)
...

3. Assign values to the NULL field then delete
The code
        for(CDKFingerprint r: results2) {
                r.bits_count = 0;
                pm.makePersistent(r);
        }
And server error again
java.lang.NullPointerException: Datastore entity with kind
CDKFingerprint and key CDKMol(c=cc=cc=c)/CDKFingerprint(1) has a null
property named bits_count.  This property is mapped to
cdkhelper.CDKFingerprint.bits_count, which cannot accept null values.
...
at org.datanucleus.store.appengine.query.StreamingQueryResult
$AbstractListIterator.hasNext(StreamingQueryResult.java:205)
...

Having no idea and hoping help.

Regards,
Charlie

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to