I have programmatically created two data objects, which I have validated
through the admin tool, and then attempt to delete them using this code:
try
{
pm.currentTransaction ().begin ();
List<StreamingMetaData> list = (List<StreamingMetaData>) pm.newQuery
(query).execute ();
if (!list.isEmpty ())
{
int real_count = 0;
int count = list.size ();
for (StreamingMetaData d : list)
{
long id = d.getID ();
if (id > 0)
{
pm.deletePersistent (d);
real_count++;
}
}
}
pm.currentTransaction ().commit ();
}
catch (Exception e)
...
but when it gets to the second object, the following JDO code throws an
"internal error" exception. Any thoughts?
/**
* JDO Convenience method to wrap any DataNucleus exceptions for the
deletePersistent process.
* @param obj The object to delete
* @throws JDOUserException thrown if the object could not be deleted
*/
private void jdoDeletePersistent(Object obj)
{
try
{
objectMgr.deleteObject(obj);
}
catch (NucleusException jpe)
{
// Convert any DataNucleus exceptions into what JDO expects
throw NucleusJDOHelper.getJDOExceptionForNucleusException(jpe);
}
}
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.