What's "utente"? In any case, you don't say where the exception is, but for whatever reason your DAO isn't getting a user (if that's where the exception is).
d. --- slideharmony <[EMAIL PROTECTED]> wrote: > > Hello, > I have a problem saving a bean User. I use the > following code: > > UserDao dao = new UserDao(); > User user = new User(); > Service.populate(user); > dao.save(utente); > if(user != null){ > return SUCCESS; > } > > here is the dao.save method: > > > public User save(User user){ > Utente newuser = null; > begin(); > newuser = (User)getSession().save(user); > commit(); > close(); > return newuser; > } > > this code throws a ClassCastException: > java.lang.Long > I have mapped all correctly, i have the same code > that works perfectly in > struts, but I get that exception with struts2. Can > anybody help me? > -- > View this message in context: > http://www.nabble.com/ClassCastException-tf4821639.html#a13794339 > Sent from the Struts - User mailing list archive at > Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]