So I'm trying again now...
After setting the (hopefully) proper strategy I get different
exception from the Enhancer:
--
27.5.2010 2:51:42 org.datanucleus.enhancer.DataNucleusEnhancer main
SEVERE: DataNucleus Enhancer completed with an error. Please review
the enhancer log for full details. Some classes may have been enhanced
but some caused errors
Errors were encountered when loading the specified MetaData files and
classes. See the nested exceptions for details
org.datanucleus.exceptions.NucleusUserException: Errors were
encountered when loading the specified MetaData files and classes. See
the nested exceptions for details
...
...
Caused by: java.lang.IllegalStateException: Unknown type: I
--

And this is what the header of my abstract class looks like:
--
@PersistenceCapable
@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
public abstract class EntityIndex<E extends HasKey, I extends Object>
    extends HasKey
...
--

Can you see what am I doing wrong this time, please?


I have been able to find only one thread where this error-message
occurs: 
http://groups.google.com/group/google-appengine-java/browse_thread/thread/b022faa2210603e
...but I wasn't able to take anything from that conversation. :(

On May 18, 1:47 pm, Didier Durand <[email protected]> wrote:
> Hi,
>
> Did you correctly parametrize the storage strategy for inheritance at
> the root level of your hierarchy tree:
> checkhttp://www.datanucleus.org/products/accessplatform/jdo/orm/inheritanc...
> andhttp://code.google.com/appengine/docs/java/datastore/dataclasses.html...
>
> I remember having such a problem before defining correct storage
> strategy.
>
> Let us know if it helps
>
> didier
>
> On May 18, 12:42 pm, Jaroslav Záruba <[email protected]>
> wrote:
>
>
>
>
>
> > Hello
>
> > Following is what I get after adding new field to my class:
> > --
> > org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException: The
> > class "net.jzaruba.appengine1.Article" 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.
> > --
>
> > Until now the Article got persisted without any issues.
> > The newly added field has generic type as its supertype.
> > Is there anything suspicious in my code?
>
> > Article:
>
> > @PersistenceCapable(detachable="true")
> > public class Article
> >         extends HasKey
> > {
> >         // ...
>
> >         @Persistent(defaultFetchGroup = "true")
> >         @Extension(vendorName = "datanucleus", key = "gae.unindexed", 
> > value="true")
> >         private ArticleCategoryIndex tagIndex = null;
> >         // has getter and setter below (gets assigned and populated only 
> > when
> > non-empty)
>
> >         // getters, setters, ...
>
> > }
>
> > ArticleCategoryIndex:
>
> > @PersistenceCapable
> > public class ArticleCategoryIndex
> >         extends EntityIndex<Article, Category>
> > {
> >         ArticleCategoryIndex(Article article)
> >         {
> >                 super(article);
> >         }
>
> > }
>
> > EntityIndex:
>
> > @PersistenceCapable
> > public abstract class EntityIndex<E extends HasKey, I extends Object>
> > {
> >         @PrimaryKey
> >         @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> >         private Key key;
>
> >         @Persistent
> >         @Extension(vendorName="datanucleus", key="gae.parent-pk", 
> > value="true")
> >         private Key parentKey;
>
> >         @Persistent
> >         private List<I> items = new LinkedList<I>();
>
> >         public EntityIndex(E entity)
> >         {
> >                 setParentKey(entity.getKey());
> >         }
>
> >         // getters, setters, ...
>
> > }
>
> > Could anyone tell me what I am doing wrong here, please?
>
> > Regards
> >   J. Záruba
>
> > --
> > 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 [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/google-appengine-java?hl=en.

-- 
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 [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-appengine-java?hl=en.

Reply via email to