The hibernate entity to schema validator fails on a scenario where you have a bean with a nullable Boolean getter/setter and also a convenience primitive boolean method decorated with a @Transient annotation.
Ideally the validator would recognize javax.persistence.Transient annotated methods and ignore them when validating the database schema.
Reproduce with a JPA entity with the following:
@Column(name = COLUMN_ACTIVE, nullable = true)
public Boolean getActive()
{ return active; }
public void setActive(Boolean active)
{ this.active = active; }
@Transient
public boolean isActive()
{ return this.active == null ? false : this.active.booleanValue(); }
Actual error message is:
Unable to build Hibernate SessionFactory
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: DATASOURCE_JNDI] Unable to build Hibernate SessionFactory
Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister
Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
Caused by: java.lang.reflect.InvocationTargetException
Caused by: org.hibernate.MappingException: In trying to locate getter for property [active], Class [CLASS_NAME] defined both a `get` [public java.lang.Boolean CLASS_NAME.getActive()] and `is` [public boolean CLASS_NAME.isActive()] variant"},}
Windows 7 Pro (64-bit)
Java 8 u91 (64-bit)
Wildfly 10.0.0.Final