7 Replies Latest reply on May 27, 2019 7:36 AM by valsaraj007

    WildFly 10.1 Hibernate SchemaManagementException

    valsaraj007

      Hi,

       

      I got following exception in Linux server running with WildFly 10.1 & PostgreSQL:

      javax.persistence.PersistenceException: [PersistenceUnit: em] Unable to build Hibernate SessionFactory

      [Server:app-node-00] at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:179)

      ...

      [Server:app-node-00] Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target

      [alter table app.USER add constraint FKbd6bn1ivwqkoq88eaarhvwr0o foreign key (parent_id) references app.USER]

      [Server:app-node-00] at org.hibernate.tool.schema.internal.TargetDatabaseImpl.accept(TargetDatabaseImpl.java:59)

      [Server:app-node-00] at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applySqlString(SchemaMigratorImpl.java:431)

      Any solution for this?

       

      Thanks!