further to my last post, I have managed to get logj4 working and hense better debugging. The last line is where the fun begins, why is it bombing out?
18:14:14,489 DEBUG Cascades:497 - processing cascades for: test.User
18:14:14,491 DEBUG Cascades:506 - done processing cascades for: test.User
18:14:14,507 DEBUG Cascades:497 - processing cascades for: test.User
18:14:14,509 DEBUG Cascades:506 - done processing cascades for: test.User
18:14:14,510 DEBUG JDBCTransaction:59 - commit
18:14:14,512 DEBUG SessionImpl:2193 - flushing session
18:14:14,518 DEBUG Cascades:497 - processing cascades for: test.User
18:14:14,520 DEBUG Cascades:506 - done processing cascades for: test.User
18:14:14,521 DEBUG SessionImpl:2321 - Flushing entities and processing referenced collections
18:14:14,564 DEBUG WrapVisitor:76 - Wrapped collection in role: test.User.ArtistChoice
Exception in Hibernate:exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of test.User.setArtistChoice
My code is:
User2 usr2 = new User2();
Date newDate = new Date();
User usr = new User();
usr.setID(1);
usr.setFirstName("C");
usr.setLastName("M");
usr.setAddress1("1 trump towers");
usr.setAddress2("france");
usr.setAddress3("wewew");
usr.setPostCode("wewewe");
usr.setCountry("England");
usr.setEmail("
[email protected]");
usr.setHomeTel("00000");
usr.setHomeMob("00000");
usr.setDateJoined(newDate);
usr.setUserName("kings");
usr.setUserPassword("queens");
usr2.add(usr);
The User class is:
public class User{
.....................
private Vector ArtistChoice = new Vector();
....................
public Vector getArtistChoice() {
return ArtistChoice;
}
public void setArtistChoice(Vector newArtistChoice) {
this.ArtistChoice = newArtistChoice;
}
}