The following exception is thrown when trying to persist a new "Product" entity (see test case) by Hibernate 4.3.6.FINAL. However, it works perfectly fine if I change the maven dependency to 4.3.5.FINAL without touching any other piece of code.
A RequestScoped bean handles a commandButton on a JSF page, and uses a Stateless bean to create a new entity. If you deploy the test case and go to http://localhost:8080/example_app/faces/index.xhtml (default Glassfish port for domain1), then you'll see a blank button; clicking on it attempts to make the DB insert.
The product class is just:
package com.example;
import javax.persistence.*;
@Entity
public class Product {
@Id @GeneratedValue
int id;
public long getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
}
|