Hibernate version:3.2.0.cr2
Mapping documents:Using annotations
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs: no exceptions, silent failure
Name and version of the database you are using: derby (via netbeans)
The generated SQL (show_sql=true): see log
Debug level Hibernate log excerpt: level at debug, log below
Hi All,
I'm having a bit of trouble using ejb 3 and annotations with hibernate. I have everything set up and working fine for one object, however for another object I get a silent failure (the transaction commits fine without exceptions, but there is no data in the table).
The following code in one of my servlets works fine (and the user is added):
Code:
try{
txn.begin();
String hashedPassword = hashSHA1("admin");
EntityManager manager = emf.createEntityManager();
User u = new User("Admin", "Admin", "admin", hashedPassword, "admin@test.com");
u.addOperation(Operation.CREATE_PROJECT);
manager.persist(u);
txn.commit();
request.getRequestDispatcher("/Login.jsp").forward(request, response);
}catch(Exception e){
log.error("Error creating administrator.", e);
try{
txn.rollback();
}catch(SystemException exc){ throw new ServletException(e); }
throw new ServletException(e);
}
In the above, the user object is added fine (user object below):
Code:
@Entity
@Table (name="FFUser")
public class User implements Serializable {
/**
* The id.
*/
@Id
@GeneratedValue
private Integer id;
/**
* The username.
*/
@Column(unique=true)
private String username;
/**
* The roles assigned to this user.
*/
@OneToMany
private Collection<Role> roles = new ArrayList<Role>();
/**
* The allowed operations assigned to this user.
*/
@CollectionOfElements
private Collection<Operation> allowedOperations = new ArrayList<Operation>();
/**
* The first name.
*/
@Column
private String firstName;
/**
* The second name.
*/
@Column
private String lastName;
/**
* The email address.
*/
@Column
private String emailAddress;
/**
* The password hash.
*/
@Column
private String passwordHash;
@Column
private double costPerHour;
@Column
private double plantCostsPerHour;
@Column
private double otherCostsPerHour;
/**
* Creates a new instance of User
*/
public User() {
}
/**
* Creates a new user.
*
* @param firstName The first name.
* @param lastName The last name.
* @param username The username.
* @param password The password.
*/
public User(String firstName, String lastName, String username, String passwordHash, String emailAddress){
this.firstName = firstName;
this.lastName = lastName;
this.username = username;
this.passwordHash = passwordHash;
this.emailAddress = emailAddress;
}
/**
* Gets the username.
* @return The username.
*/
public String getUsername(){
return username;
}
/**
* Sets the username.
*
* @param username The username.
*/
public void setUsername(String username){
this.username = username;
}
/**
* Gets the roles assigned to this user.
* @return The roles.
*/
public Collection<Role> getRoles() {
return roles;
}
/**
* Sets the roles assigned to this user.
*
* @param roles The roles.
*/
public void setRoles(Collection<Role> roles) {
this.roles = roles;
}
/**
* Gets the allowed operations for this user.
* @return The operations this user can execute.
*/
public Collection<Operation> getAllowedOperations() {
return allowedOperations;
}
/**
* Sets the allowed operations for this user.
*
* @param allowedOperations The operations this user can execute.
*/
public void setAllowedOperations(Collection<Operation> allowedOperations) {
this.allowedOperations = allowedOperations;
}
/**
* Gets the first name for this user.
* @return The first name.
*/
public String getFirstName() {
return firstName;
}
/**
* Sets the first name.
* @param firstName The first name.
*/
public void setFirstName(String firstName) {
this.firstName = firstName;
}
/**
* Gets the last name.
* @return The last name.
*/
public String getLastName() {
return lastName;
}
/**
* Sets the last name.
* @param lastName The last name.
*/
public void setLastName(String lastName) {
this.lastName = lastName;
}
/**
* Gets the email address.
* @return The email address.
*/
public String getEmailAddress() {
return emailAddress;
}
/**
* Sets the email address.
* @param emailAddress The email address.
*/
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
/**
* Gets the password hash.
* @return The password hash.
*/
public String getPasswordHash() {
return passwordHash;
}
/**
* Sets the password hash.
* @param passwordHash The password hash.
*/
public void setPasswordHash(String passwordHash) {
this.passwordHash = passwordHash;
}
/**
* Checks to see if this user can execute the supplied operation.
* @param operation The operation to check for.
* @return True if the user can execute the supplied operation, false otherwise.
*/
public boolean canExecute(Operation operation){
if(getAllowedOperations().contains(operation)) return true;
for(Role role : roles){
if(role.canExecute(operation)) return true;
}
return false;
}
/**
* Standard toString() implementation.
* @return A string representation of this object.
*/
@Override
public String toString() {
return lookupToString("User") + lookupToString("Spacer") + getUsername();
}
/**
* Equals method implementation.
* @param obj The object to test equality against.
* @return true if the two objects are equal, false otherwise.
*/
@Override
public boolean equals(Object obj){
try{
if(username == null)
return new EqualsBuilder()
.reflectionEquals(obj, this);
else return username == ((User)obj).getUsername();
}catch(ClassCastException e){
return false;
}
}
/**
* Hashcode method implementation.
* @return The hashcode for this object.
*/
public int hashCode(){
return new HashCodeBuilder().reflectionHashCode(this);
}
/**
* Gets the id.
*
* @returns The id.
*/
public int getId() {
return id;
}
/**
* Sets the id.
*
* @param id The id.
*/
public void setId(int id) {
this.id = id;
}
public void addOperation(Operation op){
getAllowedOperations().add(op);
}
}
so that's all fine, and you'll see in the log that user is inserted and the user is inserted into the database, however I have another object called Project and one called ActivityRecord (which is like an audit record):
Project
Code:
@Entity
public class Project implements Serializable {
/**
* The id.
*/
@Id
@GeneratedValue
private Integer id;
/**
* The project name.
*/
@Column(unique=true)
private String name;
/**
* The project description.
*/
@Column
private String description;
/**
* The teams that have been assigned to work on this project.
*/
@OneToMany
private Collection<Team> teams;
/**
* How often releases of this project are planned to be made.
*/
@Embedded
@AttributeOverrides( {
@AttributeOverride(name="cycle", column = @Column(name="RELEASECYCLE") ),
@AttributeOverride(name="type", column = @Column(name="RELEASECYCLETYPE") )
} )
private Frequency releaseCycle;
/**
* The expected life of the deliverables.
*/
@Embedded
@AttributeOverrides( {
@AttributeOverride(name="cycle", column = @Column(name="LIFECYCLE") ),
@AttributeOverride(name="type", column = @Column(name="LIFECYCLETYPE") )
} )
private Frequency deliverableExpectedLife;
/**
* The payback reporting cycle.
*/
@Embedded
@AttributeOverrides( {
@AttributeOverride(name="cycle", column = @Column(name="PAYBACKCYCLE") ),
@AttributeOverride(name="type", column = @Column(name="PAYBACKCYCLETYPE") )
} )
private Frequency paybackReportingCycle;
/**
* The stakeholders.
*/
@OneToMany
private Collection<User> stakeholders = new ArrayList<User>();
/**
* Creates a new project with no name or description.
*/
public Project() {
}
/**
* Creates a new project with a given name and description.
*
* @param name The project name.
* @param description The project description.
*/
public Project(String name, String description){
this.name = name;
this.description = description;
}
/**
* Creates a new project with a given name and description.
*
* @param name The project name.
* @param description The project description.
* @param releaseCycle The anticipated release cycle.
* @param expectedLife The expected life.
* @param payback The payback.
*/
public Project(String name, String description, Frequency releaseCycle, Frequency expectedLife, Frequency payback){
this(name, description);
this.releaseCycle = releaseCycle;
this.deliverableExpectedLife = expectedLife;
this.paybackReportingCycle = payback;
}
/**
* Gets the project id.
*
* @return The id.
*/
public int getId() {
return id;
}
/**
* Sets the project id.
*
* @param id Ths new id.
*/
public void setId(int id) {
this.id = id;
}
/**
* Gets the name for this project.
*
* @return The project name.
*/
public String getName() {
return name;
}
/**
* Sets the name for this project.
*
* @param name The project name.
*/
public void setName(String name) {
this.name = name;
}
/**
* Gets the project description.
*
* @return The project description.
*/
public String getDescription() {
return description;
}
/**
* Sets the project description.
*
* @param description The project description.
*/
public void setDescription(String description) {
this.description = description;
}
/**
* Gets the teams assigned to this project.
*
* @return The teams assigned to this project.
*/
public Collection<Team> getTeams() {
return teams;
}
/**
* Sets the teams assigned to this project.
* @param teams The teams assigned to this project.
*/
public void setTeams(Collection<Team> teams) {
this.teams = teams;
}
/**
* Gets the release cycle.
*
* @return The release cycle.
*/
public Frequency getReleaseCycle() {
return releaseCycle;
}
/**
* Sets the release cycle.
*
* @param releaseCycle The relese cycle.
*/
public void setReleaseCycle(Frequency releaseCycle) {
this.releaseCycle = releaseCycle;
}
/**
* Gets the expected life.
*
* @return The expected life.
*/
public Frequency getDeliverableExpectedLife() {
return deliverableExpectedLife;
}
/**
* Sets the expected life.
*
* @param deliverableExpectedLife The expected life.
*/
public void setDeliverableExpectedLife(Frequency deliverableExpectedLife) {
this.deliverableExpectedLife = deliverableExpectedLife;
}
/**
* Gets the reporting cycle.
*
* @return The reporting frequency.
*/
public Frequency getPaybackReportingCycle() {
return paybackReportingCycle;
}
/**
* Sets the reporting cycle.
*
* @param paybackReportingCycle The reporting cycle.
*/
public void setPaybackReportingCycle(Frequency paybackReportingCycle) {
this.paybackReportingCycle = paybackReportingCycle;
}
/**
* Gets the stakeholders.
*
* @return The project stakeholders.
*/
public Collection<User> getStakeholders() {
return stakeholders;
}
/**
* Sets the stakeholders.
*
* @param stakeholders The stakeholders.
*/
public void setStakeholders(Collection<User> stakeholders) {
this.stakeholders = stakeholders;
}
/**
* Checks to see if a user has been assigned to a project.
*
* @param user The user.
* @return True if the user is assigned to this project, false otherwise.
*/
public boolean isAssignedTo(User user){
for(Team team : teams){
if(team.hasMember(user)) return true;
}
return false;
}
/**
* Standard toString() implementation.
*
* @return A string representation of this object.
*/
@Override
public String toString() {
return lookupToString("Project") + lookupToString("Spacer") + getName();
}
/**
* Equals method implementation.
*
* @param obj The object to test equality against.
* @return true if the two objects are equal, false otherwise.
*/
@Override
public boolean equals(Object obj){
try{
if(id == null)
return new EqualsBuilder()
.reflectionEquals(obj, this);
else return id == ((Project)obj).getId();
}catch(ClassCastException e){
return false;
}
}
/**
* Hashcode method implementation.
*
* @return The hashcode for this object.
*/
public int hashCode(){
return new HashCodeBuilder().reflectionHashCode(this);
}
}
ActivityRecord
Code:
@Entity
public class ActivityRecord implements Serializable {
/**
* The record id.
*/
@Id
@GeneratedValue
private int id;
/**
* The date that the record was created.
*/
@Column
@Temporal(TemporalType.TIMESTAMP)
private Date created;
/**
* The operation that was executed.
*/
@Column
@Enumerated
private Operation operation;
/**
* The project that this operation was executed on.
*/
@ManyToOne(optional=true)
private Project project;
/**
* The user that executed the command.
*/
@ManyToOne
private User executedBy;
/**
* String representation of the affected targets.
*/
@CollectionOfElements
private Collection<String> affectedTargets;
/**
* Creates a new ActivityRecord.
*/
public ActivityRecord(){}
/**
* Creates a new instance of ActivityRecord.
*
* @param operation The operation.
* @param executedBy The user executing the operation.
* @param affectedObjects The objects that are affected by this action.
*/
public ActivityRecord(Operation operation, User executedBy, Object[] affectedObjects) {
affectedTargets = new ArrayList<String>();
for(Object tmp : affectedObjects){
affectedTargets.add(tmp.toString());
}
this.created = new Date();
this.executedBy = executedBy;
this.operation = operation;
}
/**
* Creates a new instance of ActivityRecord.
*
* @param operation The operation.
* @param executedBy The user that executed this operation.
* @param project The project this command is acting upon.
* @param affectedObjects The objects that are affected by this command.
*/
public ActivityRecord(Operation operation, User executedBy, Project project, Object[] affectedObjects){
this(operation, executedBy, affectedObjects);
setProject(project);
}
/**
* Standard toString() implementation.
*
* @return A string representation of this object.
*/
@Override
public String toString() {
return lookupToString("ActivityRecord");
}
/**
* Equals method implementation.
*
* @param obj The object to test equality against.
* @return true if the two objects are equal, false otherwise.
*/
@Override
public boolean equals(Object obj){
try{
return new EqualsBuilder()
.reflectionEquals(obj, this);
}catch(ClassCastException e){
return false;
}
}
/**
* Hashcode method implementation.
*
* @return The hashcode for this object.
*/
public int hashCode(){
return new HashCodeBuilder().reflectionHashCode(this);
}
/**
* Gets the id.
*
* @return id The Id.
*/
public int getId() {
return id;
}
/**
* Sets the id.
*
* @param id The id.
*/
public void setId(int id) {
this.id = id;
}
/**
* Gets the date this record was created.
*
* @return The date this record was created.
*/
public Date getCreated() {
return created;
}
/**
* Sets the date this record was created.
*
* @param created The date this record was created.
*/
public void setCreated(Date created) {
this.created = created;
}
/**
* Gets the operation for this record.
*
* @return The operation.
*/
public Operation getOperation() {
return operation;
}
/**
* Sets the operation for this record.
*
* @param operation The operation.
*/
public void setOperation(Operation operation) {
this.operation = operation;
}
/**
* Gets the project that this operation was executed on.
*
* @return The project, or null if the operation is not run at the project level.
*/
public Project getProject() {
return project;
}
/**
* Sets the project that this operation was executed on.
*
* @param project The project.
*/
public void setProject(Project project) {
this.project = project;
}
/**
* Gets the user that executed this operation.
*
* @return The user.
*/
public User getExecutedBy() {
return executedBy;
}
/**
* Sets the user that executed this operation.
*
* @param executedBy The user that executed the operation.
*/
public void setExecutedBy(User executedBy) {
this.executedBy = executedBy;
}
/**
* Gets string representations of the affected targets.
*
* @return The string representation of the affected objects.
*/
public Collection<String> getAffectedTargets() {
return affectedTargets;
}
/**
* Sets the affected targets.
*
* @param affectedTargets The affected targets string representations.
*/
public void setAffectedTargets(Collection<String> affectedTargets) {
this.affectedTargets = affectedTargets;
}
}
The embedded Frequency object is:
Code:
@Embeddable
public class Frequency implements Serializable{
/**
* The logger.
*/
private static final Logger log = Logger.getLogger(Frequency.class);
/**
* The cycle number.
*/
@Column
private int cycle;
/**
* The frequency type.
*/
@Enumerated
private FrequencyType type;
/**
* Creates a new instance of Frequency
*/
public Frequency() {
}
/**
* Creates a new instance of Frequency.
*
* @param cycle The frequency cycle.
* @param type The frequency type.
*/
public Frequency(int cycle, FrequencyType type){
this.cycle = cycle;
this.type = type;
}
/**
* Standard toString() implementation.
*
* @return A string representation of this object.
*/
@Override
public String toString() {
return lookupToString("Frequency") + lookupToString("Spacer") + getCycle() + " " + getType();
}
/**
* Equals method implementation.
*
* @param obj The object to test equality against.
* @return true if the two objects are equal, false otherwise.
*/
@Override
public boolean equals(Object obj){
try{
return new EqualsBuilder()
.reflectionEquals(obj, this);
}catch(ClassCastException e){
return false;
}
}
/**
* Hashcode method implementation.
*
* @return The hashcode for this object.
*/
public int hashCode(){
return new HashCodeBuilder().reflectionHashCode(this);
}
/**
* Gets the cycle for this frequency.
*
* @return The cycle.
*/
public int getCycle() {
return cycle;
}
/**
* Sets the cycle for this frequency.
*
* @param cycle The cycle.
*/
public void setCycle(int cycle) {
this.cycle = cycle;
}
/**
* Gets the frequency type.
*
* @return The frequency type.
*/
public FrequencyType getType() {
return type;
}
/**
* Sets the frequency type.
*
* @param type The frequency type.
*/
public void setType(FrequencyType type) {
this.type = type;
}
}
The code that inserts these objects is as follows (with EntityManagerFactory and UserTransaction set using the @PersistenceUnit and @Resource annotations, which all works fine -- ie, they aren't null when executing):
Top level code:
Code:
try{
transaction.begin();
for(FullyFundedCommand command : commands){
current = command;
command.setEntityManager(manager);
command.execute(user);
}
transaction.commit();
}catch(Exception e){
logFailedCommand(current, e);
try{
transaction.rollback();
}catch(SystemException exc){
log.fatal("Error rolling back transaction, please check data integrity.", exc);
}
throw e;
}
The code in command.execute(user) is:
Code:
public void execute(User executedBy) throws Exception{
assertAuthorized(executedBy, getOperation());
execute();
ActivityRecord record;
if(getTargetProject() == null) record = new ActivityRecord(getOperation(), executedBy, getOperationTargets());
else record = new ActivityRecord(getOperation(), executedBy, getTargetProject(), getOperationTargets());
manager.persist(record);
}
And the implementation of the execute() method is:
Code:
public void execute() throws Exception {
getEntityManager().persist(theProject);
}
So basically just storing a project! I can step through all the code and it exits the method fine...no exceptions, but also the project isn't stored!?!
Here is the log for the call:
Code:
163891 [httpWorkerThread-8080-0] INFO org.directwebremoting.impl.DefaultRemoter - Exec: JProjectController.newProject()
163891 [httpWorkerThread-8080-0] DEBUG org.directwebremoting.impl.DefaultRemoter - --Object created, stored in session. id=2388_1151958557843
163937 [httpWorkerThread-8080-0] DEBUG org.hibernate.impl.SessionImpl - opened session at timestamp: 4718422253756416
163937 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163937 [httpWorkerThread-8080-0] DEBUG org.hibernate.ejb.AbstractEntityManagerImpl - Looking for a JTA transaction to join
163937 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163937 [httpWorkerThread-8080-0] DEBUG org.hibernate.ejb.AbstractEntityManagerImpl - No JTA transaction found
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.event.def.DefaultInitializeCollectionEventListener - initializing collection [com.curiousllama.fullyfunded.model.User.allowedOperations#1]
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.event.def.DefaultInitializeCollectionEventListener - checking second-level cache
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.event.def.DefaultInitializeCollectionEventListener - collection not cached
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.loader.Loader - loading collection: [com.curiousllama.fullyfunded.model.User.allowedOperations#1]
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.ConnectionManager - opening JDBC connection
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.SQL - select allowedope0_.FFUser_id as FFUser1_0_, allowedope0_.element as element0_ from FFUser_allowedOperations allowedope0_ where allowedope0_.FFUser_id=?
163953 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.AbstractBatcher - preparing statement
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.type.IntegerType - binding '1' to parameter: 1
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.loader.Loader - result set contains (possibly empty) collection: [com.curiousllama.fullyfunded.model.User.allowedOperations#1]
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.engine.CollectionLoadContext - uninitialized collection: initializing
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.loader.Loader - processing result set
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.loader.Loader - result set row: 0
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.loader.Loader - result row:
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.type.IntegerType - returning '1' as column: FFUser1_0_
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.loader.Loader - found row of collection: [com.curiousllama.fullyfunded.model.User.allowedOperations#1]
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.engine.CollectionLoadContext - reading row
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.type.EnumType - Returning '0' as column element0_
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.loader.Loader - done processing result set (1 rows)
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.AbstractBatcher - closing statement
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.ConnectionManager - aggressively releasing JDBC connection
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.ConnectionManager - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.engine.CollectionLoadContext - 1 collections were found in result set for role: com.curiousllama.fullyfunded.model.User.allowedOperations
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.engine.CollectionLoadContext - collection fully initialized: [com.curiousllama.fullyfunded.model.User.allowedOperations#1]
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.engine.CollectionLoadContext - 1 collections initialized for role: com.curiousllama.fullyfunded.model.User.allowedOperations
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.engine.StatefulPersistenceContext - initializing non-lazy collections
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.loader.Loader - done loading collection
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.event.def.DefaultInitializeCollectionEventListener - collection initialized
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.event.def.AbstractSaveEventListener - transient instance of: com.curiousllama.fullyfunded.model.Project
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.event.def.DefaultPersistEventListener - saving transient instance
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.engine.transaction.Isolater - surrounding JTA transaction suspended [J2EETransaction: txId=5 nonXAResource=3 jtsTx=null localTxStatus=0 syncs=[com.sun.enterprise.resource.PoolManagerImpl$SynchronizationListener@52438]]
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.AbstractBatcher - opening JDBC connection
163969 [httpWorkerThread-8080-0] DEBUG org.hibernate.SQL - select next_hi from hibernate_unique_key for read only with rs
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.SQL - update hibernate_unique_key set next_hi = ? where next_hi = ?
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.AbstractBatcher - closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.engine.transaction.Isolater - surrounding JTA transaction resumed [J2EETransaction: txId=5 nonXAResource=3 jtsTx=null localTxStatus=0 syncs=[com.sun.enterprise.resource.PoolManagerImpl$SynchronizationListener@52438]]
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.id.TableHiLoGenerator - new hi value: 1
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.event.def.AbstractSaveEventListener - generated identifier: 32768, using strategy: org.hibernate.id.TableHiLoGenerator
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.event.def.AbstractSaveEventListener - saving [com.curiousllama.fullyfunded.model.Project#32768]
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.event.def.WrapVisitor - Wrapped collection in role: com.curiousllama.fullyfunded.model.Project.stakeholders
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.engine.IdentifierValue - id unsaved-value: 0
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.event.def.AbstractSaveEventListener - transient instance of: com.curiousllama.fullyfunded.model.ActivityRecord
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.event.def.DefaultPersistEventListener - saving transient instance
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.engine.transaction.Isolater - surrounding JTA transaction suspended [J2EETransaction: txId=5 nonXAResource=3 jtsTx=null localTxStatus=0 syncs=[com.sun.enterprise.resource.PoolManagerImpl$SynchronizationListener@52438]]
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.AbstractBatcher - opening JDBC connection
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.SQL - select next_hi from hibernate_unique_key for read only with rs
163984 [httpWorkerThread-8080-0] DEBUG org.hibernate.SQL - update hibernate_unique_key set next_hi = ? where next_hi = ?
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.AbstractBatcher - closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.engine.transaction.Isolater - surrounding JTA transaction resumed [J2EETransaction: txId=5 nonXAResource=3 jtsTx=null localTxStatus=0 syncs=[com.sun.enterprise.resource.PoolManagerImpl$SynchronizationListener@52438]]
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.id.TableHiLoGenerator - new hi value: 2
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.event.def.AbstractSaveEventListener - generated identifier: 65536, using strategy: org.hibernate.id.TableHiLoGenerator
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.event.def.AbstractSaveEventListener - saving [com.curiousllama.fullyfunded.model.ActivityRecord#65536]
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.event.def.WrapVisitor - Wrapped collection in role: com.curiousllama.fullyfunded.model.ActivityRecord.affectedTargets
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.engine.IdentifierValue - id unsaved-value: null
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG org.hibernate.jdbc.JDBCContext - TransactionFactory reported no active transaction; Synchronization not registered
164000 [httpWorkerThread-8080-0] DEBUG com.curiousllama.fullyfunded.controls.ProjectController - new project successfully created.
This is driving me insane, can anyone see where I've gone wrong here?
Cheers
Adam[/code]