Muchas gracias por la respuesta!!
El fallo debe de estar en la clase User (que fué la que estuve tocando...) en ReservaHabitacion aparecen errores porque utiliza la clase User.
Y aparentemente está bien...
Código PHP:
package com.springsource.marshall.domain;
import org.springframework.roo.addon.dbre.RooDbManaged;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.persistence.Column;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Random;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.json.RooJson;
import org.springframework.security.authentication.encoding.MessageDigestPasswordEncoder;
@RooJavaBean
@RooToString
@RooJpaActiveRecord(table = "user", finders = { "findUsersByEmailAddress", "findUsersByActivationKeyAndEmailAddress" })
@RooJson
public class User implements Serializable{
/**
*
*/
private static final long serialVersionUID = 636540962607507061L;
@NotNull
@Size(min = 1)
private String firstName;
@Size(min = 1)
private String lastName;
@NotNull
@Column(unique = true)
@Size(min = 1)
private String emailAddress;
@NotNull
@Size(min = 1)
private String password;
@Temporal(TemporalType.TIMESTAMP)
@DateTimeFormat(style = "S-")
private Date activationDate;
private String activationKey;
private Boolean enabled;
private Boolean locked;
public static User findPorMail(String email) {
if(entityManager().createQuery("SELECT COUNT(o) FROM User o where o.emailAddress='"+email+"'", Long.class).getSingleResult() > 0){
return entityManager().createQuery("SELECT o FROM User o where o.emailAddress='"+email+"'", User.class).getSingleResult();
}else{
return null;
}
}
public static String crearPasswordAleatorio (int longitud){
String cadenaAleatoria = "";
long milis = new java.util.GregorianCalendar().getTimeInMillis();
Random r = new Random(milis);
int i = 0;
while ( i < longitud){
char c = (char)r.nextInt(255);
if ( (c >= '0' && c <='9') || (c >='A' && c <='Z') ){
cadenaAleatoria += c;
i ++;
}
}
return cadenaAleatoria;
}
}