![]() |
![]() |
|
| Index | Recent Threads | Unanswered Threads | Who's Online | User List | Help |
|
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 3
|
|
| Author |
|
|
Newbie US Joined: Feb 2, 2010 Post Count: 2 Status: Offline |
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 Thank you very much. The referenced code is below: @EntityAnd, 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.getMetaDataForClass(AbstractAnnotation Reader.java:159) at org.datanucleus.metadata.annotations.AnnotationManagerImpl.getMetaDataForClass(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.getMetaDataForClass(AbstractAnnotation Reader.java:159) at org.datanucleus.metadata.annotations.AnnotationManagerImpl.getMetaDataForClass(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) |
||
|
|
Expert UK Joined: Mar 13, 2004 Post Count: 5233 Status: Offline |
Rename the method to be something else (e.g getXXX). Annotations code had some check on a method being a Java bean getter, checking if it started "get", but neglected to check if it was longer than that. SVN code works, but that won't help you until Google bother updating their plugin to use DN 2.0 ---------------------------------------- -Andy ![]() ![]() |
||
|
|
Newbie US Joined: Feb 2, 2010 Post Count: 2 Status: Offline |
Thank you very much Andy. I appreciate the response. Unfortunately I can't rename the method because I am implementing an external interface (GXT's ModelBean). Oh well, I'll just hope that GAE updates their plugin soon. Again, thanks. |
||
|
|
|
|
|
Current timezone is GMT Mar 14, 2010 8:20:12 AM |