Yes, to use JDO your going to have to annotate the class and have the DataNucleus enhancer run over the classes. If you use the low-level API then you can just query for the Entity object itself.
On Wed, Jan 26, 2011 at 3:09 PM, Marc Herber <[email protected]>wrote: > Thanks for your hint. Meanwhile I debugged the code and found the reason of > the NullPointerException. > > The method getObjectById is implemented by the class > DatastoreJDOPersistenceManager. Within this method there is > *EntityUtils.idToInternalKey(getObjectManager(), > cls, key, false);*. This methods ends (obviously) in the class > EntityUtils. Within this class and method you call *determineKind(cmd, > om);*. But the parameter cmd is alrady null. A few methods later there is > the follwoing line: *if (acmd.getTable() != null) {...}* et voila -> > NullPointerException. > > The reason why acmd is null is because of this line within the EntityUtils > class (method idToInternalKey): > *AbstractClassMetaData cmd = > om.getMetaDataManager().getMetaDataForClass(cls, > om.getClassLoaderResolver());* > Within the method getMetaDataForClass there is the following check: > *if (isClassWithoutPersistenceInfo(c.getName())){ return null;}* > > So, does anybody know what this means? > Yes - my entity class does not have any annotation but I thought this isn't > necessary at all?! Should I have to include such kind of informations to my > class? > > -- > 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]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://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.
