org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [alter table course add constraint FKct0mes5ebfltptypp0amhitss foreign key (event_id) references event (id)]

Stack Overflow | Robin M | 4 months ago
  1. 0

    Issues upgrading grails 3.0.7 to 3.1.10

    Stack Overflow | 4 months ago | Robin M
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [alter table course add constraint FKct0mes5ebfltptypp0amhitss foreign key (event_id) references event (id)]
  2. 0

    [Document constraint] Delete document with change items

    GitHub | 2 years ago | mguimard
    com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`docdokuplm`.`CHANGEORDER_AFFECTED_DOCUMENT`, CONSTRAINT `FK_CHANGEORDER_AFFECTED_DOCUMENT_ITERATION` FOREIGN KEY (`ITERATION`, `DOCUMENTMASTER_WORKSPACE_ID`, `DOCUMENTREVISION_VERSION`, `DOCU)
  3. 0

    Constraint error

    GitHub | 2 years ago | Cabbina
    com.flol.semrankerengine.keywordsearch.exception.KeywordStoreDataException: ERROR IN STORING KEYWORD DATA IN DATABASE: org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [name_UNIQUE]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring data rest one to many cascade all

    Stack Overflow | 2 years ago
    com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'username' cannot be null
  6. 0

    Optimistic lock violation when persisting many-to-many relation in MySQL with OpenJPA as the ORM

    Stack Overflow | 2 years ago
    com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`test`.`customers_addresses`, CONSTRAINT `customers_addresses_ibfk_1` FOREIGN KEY (`customer_id`))

  1. Kialandei 1 times, last 1 week ago
  2. DoktorDoener666 6 times, last 3 weeks ago
  3. mauritius 1 times, last 3 weeks ago
  4. MoYapro 1 times, last 3 weeks ago
  5. jshakil 1 times, last 1 month ago
11 more registered users
45 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException

    Cannot add or update a child row: a foreign key constraint fails (`mchq-dev`.`#sql-7d2_188`, CONSTRAINT `FKct0mes5ebfltptypp0amhitss` FOREIGN KEY (`event_id`) REFERENCES `event` (`id`))

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0()
  2. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    4. java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    4 frames
  3. Springloaded
    ReflectiveInterceptor.jlrConstructorNewInstance
    1. org.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:1075)
    1 frame
  4. MySQL jdbc
    StatementImpl.executeUpdate
    1. com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
    2. com.mysql.jdbc.Util.getInstance(Util.java:387)
    3. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:934)
    4. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3966)
    5. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3902)
    6. com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2526)
    7. com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2673)
    8. com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545)
    9. com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1540)
    10. com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2595)
    11. com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1468)
    11 frames
  5. org.hibernate.tool
    SchemaMigratorImpl.doMigration
    1. org.hibernate.tool.schema.internal.TargetDatabaseImpl.accept(TargetDatabaseImpl.java:56)
    2. org.hibernate.tool.schema.internal.SchemaMigratorImpl.applySqlString(SchemaMigratorImpl.java:431)
    3. org.hibernate.tool.schema.internal.SchemaMigratorImpl.applySqlStrings(SchemaMigratorImpl.java:420)
    4. org.hibernate.tool.schema.internal.SchemaMigratorImpl.applyForeignKeys(SchemaMigratorImpl.java:386)
    5. org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigrationToTargets(SchemaMigratorImpl.java:214)
    6. org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigration(SchemaMigratorImpl.java:60)
    6 frames
  6. Hibernate
    SessionFactoryImpl.<init>
    1. org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:133)
    2. org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:101)
    3. org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:470)
    3 frames
  7. org.hibernate.boot
    SessionFactoryBuilderImpl.build
    1. org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444)
    1 frame
  8. Hibernate
    Configuration.buildSessionFactory
    1. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:708)
    1 frame
  9. Grails GORM
    HibernateMappingContextSessionFactoryBean.afterPropertiesSet
    1. org.grails.orm.hibernate.cfg.HibernateMappingContextConfiguration.buildSessionFactory(HibernateMappingContextConfiguration.java:241)
    2. org.grails.orm.hibernate.HibernateMappingContextSessionFactoryBean.doBuildSessionFactory(HibernateMappingContextSessionFactoryBean.java:474)
    3. org.grails.orm.hibernate.HibernateMappingContextSessionFactoryBean.buildSessionFactory(HibernateMappingContextSessionFactoryBean.java:468)
    4. org.grails.orm.hibernate.HibernateMappingContextSessionFactoryBean.afterPropertiesSet(HibernateMappingContextSessionFactoryBean.java:92)
    4 frames
  10. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    5. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    6. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    7. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    8. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    9. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
    10. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
    11. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1481)
    12. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226)
    13. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
    14. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    15. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    16. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    17. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    18. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    18 frames
  11. Grails
    TransactionManagerPostProcessor.setBeanFactory
    1. org.grails.transaction.TransactionManagerPostProcessor.initialize(TransactionManagerPostProcessor.java:75)
    2. org.grails.transaction.TransactionManagerPostProcessor.setBeanFactory(TransactionManagerPostProcessor.java:53)
    2 frames
  12. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1597)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1565)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    5. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    6. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    7. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    8. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    8 frames
  13. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:207)
    2. org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:687)
    3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:523)
    3 frames
  14. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
    2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:760)
    3. org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:360)
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:306)
    4 frames
  15. Grails
    GrailsApp$run.call
    1. grails.boot.GrailsApp.run(GrailsApp.groovy:55)
    2. grails.boot.GrailsApp.run(GrailsApp.groovy:374)
    3. grails.boot.GrailsApp.run(GrailsApp.groovy:363)
    4. grails.boot.GrailsApp$run.call(Unknown Source)
    4 frames
  16. Groovy
    AbstractCallSite.call
    1. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    2. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
    3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
    3 frames
  17. mchq.admin
    Application.main
    1. mchq.admin.Application.main(Application.groovy:8)
    1 frame