com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`cas`.`SERVICETICKET`, CONSTRAINT `FK(TGTID)` FOREIG N KEY (`ticketGrantingTicket_ID`) REFERENCES `TICKETGRANTINGTICKET` (`ID`))

Google Groups | Jeffrey Wong | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    After a month, no tickets created in 4.2.2?

    Google Groups | 7 months ago | Jeffrey Wong
    com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`cas`.`SERVICETICKET`, CONSTRAINT `FK(TGTID)` FOREIG N KEY (`ticketGrantingTicket_ID`) REFERENCES `TICKETGRANTINGTICKET` (`ID`))
  2. 0

    为什么会出现乱码?

    GitHub | 5 years ago | xiegengcai
    org.springframework.dao.DuplicateKeyException: PreparedStatementCallback; SQL [update t_application set update_time=now(), app_name=?, en_name=?, version=?, developer=?, catalog_id=?, size=?, platform=?, support_languages=?, price=?, description=?, permission_desc=?, status=?, images=?, features=?, en_features=? where id=?]; Duplicate entry '�鱼达人' for key 2; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '�鱼达人' for key 2
  3. 0

    Way to get data, but showing "xxx" cannot be null

    Stack Overflow | 2 years ago
    com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'operator_id' cannot be null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 7#8812055

    GitHub | 4 years ago | simplechen
    javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Duplicate entry 'java' for key 'name'
  6. 0

    Building Failing

    GitHub | 4 years ago | augepang
    java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (`testCrux`.`mapping`, CONSTRAINT `fk_mapping_connectionId` FOREIGN KEY (`connectionId`) REFERENCES `connection` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION)
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 (`cas`.`SERVICETICKET`, CONSTRAINT `FK(TGTID)` FOREIG N KEY (`ticketGrantingTicket_ID`) REFERENCES `TICKETGRANTINGTICKET` (`ID`))

    at sun.reflect.GeneratedConstructorAccessor131.newInstance()
  2. Java RT
    Constructor.newInstance
    1. sun.reflect.GeneratedConstructorAccessor131.newInstance(Unknown Source)
    2. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    3. java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    3 frames
  3. MySQL jdbc
    StatementImpl.executeBatch
    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:932)
    4. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)
    5. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
    6. com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)
    7. com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)
    8. com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551)
    9. com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
    10. com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)
    11. com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1751)
    12. com.mysql.jdbc.PreparedStatement.executeBatchInternal(PreparedStatement.java:1257)
    13. com.mysql.jdbc.StatementImpl.executeBatch(StatementImpl.java:959)
    13 frames
  4. c3p0:JDBC DataSources/Resource Pools
    NewProxyPreparedStatement.executeBatch
    1. com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:2544)
    1 frame
  5. Hibernate
    ActionQueue.executeActions
    1. org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:110)
    2. org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:97)
    3. org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:147)
    4. org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:214)
    5. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:470)
    5 frames