org.hibernate.tool.schema.spi.SchemaManagementException

Unable to execute schema management to JDBC target [alter table "consumer" add constraint FKConsumerUser foreign key ("eeuser") references "eeuser"]

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web607

  • via Unknown by Peiter Brown,
  • via Unknown by William Zanchet [Atlassian],
  • via Unknown by Lachlan Dally,
  • Stack trace

    • org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [alter table "consumer" add constraint FKConsumerUser foreign key ("eeuser") references "eeuser"] at org.hibernate.tool.schema.internal.TargetDatabaseImpl.accept(TargetDatabaseImpl.java:59) at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applySqlString(SchemaMigratorImpl.java:431) at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applySqlStrings(SchemaMigratorImpl.java:420) at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applyForeignKeys(SchemaMigratorImpl.java:386) at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigrationToTargets(SchemaMigratorImpl.java:214) at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigration(SchemaMigratorImpl.java:60) at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:134) at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:101) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:470) at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444) at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:170) at org.jpos.ee.DB.newSessionFactory(DB.java:154) at org.jpos.ee.DB.getSessionFactory(DB.java:136) at org.jpos.ee.DB.open(DB.java:272) at org.jpos.ee.status.Monitor.touch(Monitor.java:108) at org.jpos.ee.status.Monitor.access$200(Monitor.java:34) at org.jpos.ee.status.Monitor$MonitorTimerTask.run(Monitor.java:152) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) Caused by: java.sql.SQLSyntaxErrorException: ORA-02275: such a referential constraint already exists in the table at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1033) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329) at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1838) at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1803) at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:294) at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:208) at org.hibernate.tool.schema.internal.TargetDatabaseImpl.accept(TargetDatabaseImpl.java:56) ... 18 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    tomthomastomthomas
    Once,
    balintnbalintn
    3 times, last one
    rprp
    Once,
    jpveejpvee
    2 times, last one
    69 more bugmates