I've recently tried to upgrade from hibernate 5.2.2 to 5.2.9 which caused the application to no longer work. I have the following mapping: @Embeddable public class AbilityEntity { } public class EmployeeEntity { @BatchSize(size = 10) @ElementCollection(fetch = FetchType.EAGER) @CollectionTable(name = "ability", joinColumns = @JoinColumn(name = "employee_id") ) public Set<AbilityEntity> getAbilities() { ... } } Starting from 5.2.3 on I'm getting the following error: {{13-May-2017 01:31:17.518 SEVERE [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.core.StandardContext.filterStart Exception starting filter EntityManagerFilter javax.persistence.PersistenceException: [PersistenceUnit: capacity] Unable to build Hibernate SessionFactory at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:951) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:881) at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39) at de.egore911.capacity.ui.filter.EntityManagerFilter.init(EntityManagerFilter.java:58) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4659) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5281) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.startup.HostConfig.reload(HostConfig.java:1390) at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1291) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1552) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:285) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1141) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1377) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1381) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1349) at java.lang.Thread.run(Thread.java:745) Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing table [ability] at org.hibernate.tool.schema.internal.AbstractSchemaValidator.validateTable(AbstractSchemaValidator.java:121) at org.hibernate.tool.schema.internal.GroupedSchemaValidatorImpl.validateTables(GroupedSchemaValidatorImpl.java:42) at org.hibernate.tool.schema.internal.AbstractSchemaValidator.performValidation(AbstractSchemaValidator.java:89) at org.hibernate.tool.schema.internal.AbstractSchemaValidator.doValidation(AbstractSchemaValidator.java:68) at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:185) at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:66) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:309) at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:493) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:878) ... 21 more}} It works when downgrading to 5.2.2 again. What's also interesting is that it works fine on Apache Tomcat 8.5.12 on JDK 1.8.0_102-b14 (Windows), while it does not Apache Tomcat 8.0.30 on JDK 1.8.0_77-b03 (Linux). Source code of said affected application is at https://github.com/egore/capacity-web |