JDO explicitly supports persistence of static inner classes, but not
non-static inner classes.

If you're ever referring to static inner classes in JDO metadata, use
the "$" delimiter when specifying an inner class.

Example:
package com.example.model;
public class Foo { public static class Bar { /* ... */ } /* ... */ }

In JDO metadata (XML), use "com.example.model.Foo$Bar" to refer to the
static inner class Bar.  Just "Foo$Bar" when enclosing scope permits.

HTH,
Matthew

On Oct 19, 3:06 am, Didier Durand <durand.did...@gmail.com> wrote:
> Hi Paul,
>
> from its name "model.User", it seems that your class is an inner
> class: I had problems with JDO in the past because of inner classes. I
> could not get good explanations about what's possible with inner
> classes and jdo or not.
>
> As a consequence, I don't try to persist inner classes with JDO
> anymore
>
> Can you try to make your class a regular one and see what happens?
>
> regards
> didier
>
> On Oct 19, 10:01 am, Paul <pgronkiew...@gmail.com> wrote:
>
>
>
> > Hi,
>
> > I suddenly started getting that error and I have no idea why. I have
> > not changed my code really - certainly did not touch anything DB
> > related.
> > I only upgraded mvn-gae-plugin from 0.5.6 to 0.7.2 [so it could accept
> > 1.3.7 instead of reversing to 1.3.1 all the time] and deployed without
> > problems. Later I also upgraded maven-datanucleus-plugin from 1.1.4 to
> > 2.1.0 and I think that it worked afterwards. Anyways, some time later
> > I started getting this error:
>
> > Caused by:
> > org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException:
> > The class "The class "model.User" 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." 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 for the class is not
> > found.
> > NestedThrowables:
> > org.datanucleus.exceptions.ClassNotPersistableException: The class
> > "model.User" 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.
> >         at
> > org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(Nuc­leusJDOHelper.java:
> > 241)
> >         at
> > org.datanucleus.jdo.JDOPersistenceManager.newObjectIdInstance(JDOPersistenc­eManager.java:
> > 1571)
> >         at
> > org.datanucleus.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManag­er.java:
> > 1767)
> >         at
> > org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManager.getObjec­tById(Datasto
>
> > I have reversed both plugin changes and got back to old versions. It
> > runs on 1.3.1 SDK now. I have cleaned and recompiled the project.
> > Updated all dependencies and plugins. Rebuilt the project few times.
> > And nothing helped. So what's the solution? Where can the problem be?- Hide 
> > quoted text -
>
> - Show quoted text -

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

Reply via email to