Joe,

I copied your class, and get the same exception. One thing I see
you're doing is attempting to annotate a method, when you should be
annotating properties. I also see you don't have an @Id, or @Basic
property annotations. I'm know to this, too, but I hope it helps.

Guser

On Feb 2, 2:58 pm, Joe Hudson <joe...@gmail.com> wrote:
> Hello,
>
> I am using the Google App Engine Eclipse plugin and get an error when
> I save a Java class with a get(String) method.
>
> The enhancer is throwing a NullPointerException. I have added the
> transient annotation and don't know what else I can do to avoid this
> issue. Can anyobody please give me some advice?
>
> I am using datanucleus-jpa-1.1.5.jar
>
> I also posted this to the datanucleus forum but there doesn't seem to
> be too much activity there so I was hoping I would get some ideas here
> as well.  http://www.jpox.org/servlet/forum/viewthread_thread,5954#31824
>
> Thank you very much.
>
> The referenced code is below:
>
> @Entity
> public class TestEntity implements Serializable {
>
>         private String dummyProperty;
>
>         public String getDummyProperty() {
>                 return dummyProperty;
>         }
>
>         public void setDummyProperty(String dummyProperty) {
>                 this.dummyProperty = dummyProperty;
>         }
>
>         @Transient
>         public Object get(String key) {
>                 return null;
>         }
>
> }
>
> And, here is the stack trace:
>
> DataNucleus Enhancer (version 1.1.4) : Enhancement of classes
> Errors were encountered when loading the specified MetaData files and
> classes. See the nested exceptions for details
> Feb 2, 2010 1:45:24 PM 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
> at org.datanucleus.metadata.MetaDataManager.loadClasses
> (MetaDataManager.java:426)
> at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput
> (DataNucleusEnhancer.java:743)
> at org.datanucleus.enhancer.DataNucleusEnhancer.enhance
> (DataNucleusEnhancer.java:545)
> at org.datanucleus.enhancer.DataNucleusEnhancer.main
> (DataNucleusEnhancer.java:1252)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:
> 57)
> at com.google.appengine.tools.enhancer.Enhance.<init>(Enhance.java:60)
> at com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:41)
> Caused by: java.lang.NullPointerException
> at
> org.datanucleus.jpa.metadata.JPAAnnotationReader.processMemberAnnotations
> (JPAAnnotationReader.java:8
> 53)
> at
> org.datanucleus.metadata.annotations.AbstractAnnotationReader.getMetaDataFo 
> rClass
> (AbstractAnnotation
> Reader.java:159)
> at
> org.datanucleus.metadata.annotations.AnnotationManagerImpl.getMetaDataForCl 
> ass
> (AnnotationManagerImpl
> .java:136)
> at org.datanucleus.metadata.MetaDataManager.loadAnnotationsForClass
> (MetaDataManager.java:2278)
> at org.datanucleus.metadata.MetaDataManager.loadClasses
> (MetaDataManager.java:385)
> ... 10 more
> Nested Throwables StackTrace:
> DataNucleus Enhancer completed with an error. Please review the
> enhancer log for full details. Some classes may have been enhanced but
> some caused errors
> java.lang.NullPointerException
> DataNucleus Enhancer completed and no classes were enhanced. Consult
> the log for full details
> at
> org.datanucleus.jpa.metadata.JPAAnnotationReader.processMemberAnnotations
> (JPAAnnotationReader.java:8
> 53)
> at
> org.datanucleus.metadata.annotations.AbstractAnnotationReader.getMetaDataFo 
> rClass
> (AbstractAnnotation
> Reader.java:159)
> at
> org.datanucleus.metadata.annotations.AnnotationManagerImpl.getMetaDataForCl 
> ass
> (AnnotationManagerImpl
> .java:136)
> at org.datanucleus.metadata.MetaDataManager.loadAnnotationsForClass
> (MetaDataManager.java:2278)
> at org.datanucleus.metadata.MetaDataManager.loadClasses
> (MetaDataManager.java:385)
> at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput
> (DataNucleusEnhancer.java:743)
> at org.datanucleus.enhancer.DataNucleusEnhancer.enhance
> (DataNucleusEnhancer.java:545)
> at org.datanucleus.enhancer.DataNucleusEnhancer.main
> (DataNucleusEnhancer.java:1252)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:
> 57)
> at com.google.appengine.tools.enhancer.Enhance.<init>(Enhance.java:60)
> at com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:41)

-- 
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