I am getting the following error:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name \'org.springframework.transaction.interc
This error can happen if you have a hibernate mapped class with relations with another non-mapped class, a solution is to check the relation item as @transient (hibernate will ignore it, use this just to check if this is the error, and later map the related class). Example:
@Entity
public class City {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private int id;
private String name;
@Transient
private State state;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public State getState() {
return state;
}
public void setState(State state) {
this.state = state;
}
}
And this is the non-mapped class which may give the error:
public class State {
private String name;
}