Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unavailable annotations should be handled gracefully - re-open #11

Closed
GoogleCodeExporter opened this issue Aug 8, 2015 · 3 comments
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

Create @Persistent @Embedded members for an AppEngine application.

What is the expected output? 

Do not expect runtime errors

What do you see instead?

Errors at at 
com.gwtent.gen.reflection.GeneratorHelper.addAnnotation(GeneratorHelper.jav
a:151)

because Annotation type field is null and the GWT ENT code calls:

annotation.annotationType().getName()

If AppEngine is not generating the right stuff, then I suppose this error 
is correct. However, if it is possible for annotation to not have a type, 
then annotations with the null type should just be ignored.

What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by syblackw...@gmail.com on 16 Aug 2009 at 9:00

@GoogleCodeExporter
Copy link
Author

Hi, syblackwell, Can you give me the sample code? Thanks

Original comment by JamesLuo...@gmail.com on 19 Aug 2009 at 12:20

@GoogleCodeExporter
Copy link
Author

Thnaks for responding to my initial post. I am using gwtEnt 0.5 because .6 
generates 
a massive number of errors due to GWT source not found issues. Although these 
are 
unrelated to gwtEnt code that I use and don't prevent my code from running, it 
creates a lot of debug noise. It would be helpful if you provided more separate 
jar 
files.

Here is my usage of gwtEnt (assume "property" is a String name of a valid class 
member and "bean" is a valid Object implementing Reflection:

            ClassType classType = 
TypeOracle.Instance.getClassType(bean.getClass());
            String gettername = "get" + 
property.substring(0,1).toUpperCase() + property.substring(1);
            Method getter = classType.findMethod(gettername, new 
Type[]{});
            Type returntype = getter.getReturnType();
            return returntype.getClass();

Here is a sample class:

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Goal implements Serializable,BeanModelTag,Reflection {

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true")
    public String uid;

    @Persistent(embedded="true")
    private TimeFrame timeFrame = new TimeFrame();

    @Persistent
    private String name = "";


    public Goal() { 
        }

    public String getName() { return name;  }

    public void setName(String name) { this.name = name; }

        public TimeFrame getTimeFrame() {
        return timeFrame;
    }
    public void setTimeFrame(TimeFrame data) {
        timeFrame.set(data);
    }
}



Original comment by syblackw...@gmail.com on 22 Aug 2009 at 10:03

@GoogleCodeExporter
Copy link
Author

Hi,syblackwell, I made that change, now GWTENT only print an log to log tree and
continue the work. thanks

Original comment by JamesLuo...@gmail.com on 15 Sep 2009 at 5:36

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant