jouer.des exceptions.JavaExecutionException: id de charge est requis pour le chargement

J'obtiens une erreur à l'Utilisateur".findById(user_id)" n'a pas souvent mais des fois, je ne sais pas pourquoi. Quelles sont les causes de cette erreur?

Note : je suis en utilisant Jouer à la version 1.2.3

Grâce.

Fonction où throws exception;

public static void getMemberProfile(Long user _id){
       User sessionUser = getUser();
        User user = User.findById(user_id);

Message d'erreur ;

2012-02-12T13:06:42+00:00 app[web.1]: 
2012-02-12T13:06:42+00:00 app[web.1]: Execution exception (In /app/controllers/UserApi.java around line 470)
2012-02-12T13:06:42+00:00 app[web.1]: IllegalArgumentException occured : id to load is required for loading
2012-02-12T13:06:42+00:00 app[web.1]: 
2012-02-12T13:06:42+00:00 app[web.1]: play.exceptions.JavaExecutionException: id to load is required for loading
2012-02-12T13:06:42+00:00 app[web.1]:   at play.mvc.ActionInvoker.invoke(ActionInvoker.java:229)
2012-02-12T13:06:42+00:00 app[web.1]:   at Invocation.HTTP Request(Play!)
2012-02-12T13:06:42+00:00 app[web.1]: Caused by: java.lang.IllegalArgumentException: id to load is required for loading
2012-02-12T13:06:42+00:00 app[web.1]:   at org.hibernate.event.LoadEvent.<init>(LoadEvent.java:89)
2012-02-12T13:06:42+00:00 app[web.1]:   at org.hibernate.event.LoadEvent.<init>(LoadEvent.java:61)
2012-02-12T13:06:42+00:00 app[web.1]:   at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1002)
2012-02-12T13:06:42+00:00 app[web.1]:   at org.hibernate.impl.SessionImpl.get(SessionImpl.java:998)
2012-02-12T13:06:42+00:00 app[web.1]:   at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:614)
2012-02-12T13:06:42+00:00 app[web.1]:   at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:589)
2012-02-12T13:06:42+00:00 app[web.1]:   at play.db.jpa.JPQL.findById(JPQL.java:34)
2012-02-12T13:06:42+00:00 app[web.1]:   at models.User.findById(User.java)
2012-02-12T13:06:42+00:00 app[web.1]:   at controllers.UserApi.getMemberProfile(UserApi.java:470)
2012-02-12T13:06:42+00:00 app[web.1]:   at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:546)
2012-02-12T13:06:42+00:00 app[web.1]:   at play.mvc.ActionInvoker.invoke(ActionInvoker.java:500)
2012-02-12T13:06:42+00:00 app[web.1]:   at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:476)
2012-02-12T13:06:42+00:00 app[web.1]:   at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:471)
2012-02-12T13:06:42+00:00 app[web.1]:   at play.mvc.ActionInvoker.invoke(ActionInvoker.java:159)
Je ne sais pas Jouer, il suffit donc de les deviner, mais se pourrait-il que le user_id est nul (puisque vous êtes à l'aide d'une Longue-objet, et non un long primitive)?

OriginalL'auteur Gökhan Örün | 2012-02-12