Tuesday, August 16, 2011

[WARN] Candidate class for JDOQL single-string query (User) could not be resolved User


Problème :

[WARN] Candidate class for JDOQL single-string query (User) could not be resolved User

Solution :

I have not instantiate my User class because I call it with a static method :
User.myMethod();

And in my Method, I make the following request :
PersistenceManager pm = PMF.get().getPersistenceManager();
Query query = pm.newQuery(User.class);

To resolve the problem, I do the following :

User myUser = new User();
myUser.myMethod(); // myMethod n'est plus statique

No comments:

Post a Comment