#356 new
Ben Hood

Performance test violates FK constraint

Reported by Ben Hood | September 1st, 2011 @ 05:42 PM

Because it is not being run as part of a build, the performance suite has bit rotted:

org.hibernate.exception.ConstraintViolationException: could not insert: [net.lshift.diffa.kernel.differencing.ReportedDifferenceEvent]
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:64)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2345)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2852)
    at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
    at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:320)
    at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:203)
    at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:129)
    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
    at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)
    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
    at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
    at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:713)
    at org.hibernate.impl.SessionImpl.save(SessionImpl.java:701)
    at org.hibernate.impl.SessionImpl.save(SessionImpl.java:697)
    at net.lshift.diffa.kernel.differencing.HibernateDomainDifferenceStore.persistAndConvertEventInternal(HibernateDomainDifferenceStore.scala:299)
    at net.lshift.diffa.kernel.differencing.HibernateDomainDifferenceStore.net$lshift$diffa$kernel$differencing$HibernateDomainDifferenceStore$$saveAndConvertEvent(HibernateDomainDifferenceStore.scala:290)
    at net.lshift.diffa.kernel.differencing.HibernateDomainDifferenceStore.net$lshift$diffa$kernel$differencing$HibernateDomainDifferenceStore$$addReportableMismatch(HibernateDomainDifferenceStore.scala:284)
    at net.lshift.diffa.kernel.differencing.HibernateDomainDifferenceStore$$anonfun$addReportableUnmatchedEvent$1.apply(HibernateDomainDifferenceStore.scala:59)
    at net.lshift.diffa.kernel.differencing.HibernateDomainDifferenceStore$$anonfun$addReportableUnmatchedEvent$1.apply(HibernateDomainDifferenceStore.scala:58)
    at net.lshift.diffa.kernel.util.SessionHelper.withSession(SessionHelper.scala:32)
    at net.lshift.diffa.kernel.differencing.HibernateDomainDifferenceStore.addReportableUnmatchedEvent(HibernateDomainDifferenceStore.scala:58)
    at net.lshift.diffa.kernel.differencing.DomainDifferenceStorePerfTest$$anonfun$differenceQueryShouldGrowLinearlyAsDifferencesIncrease$1$$anonfun$apply$8.apply(DomainDifferenceStorePerfTest.scala:75)
    at net.lshift.diffa.kernel.differencing.DomainDifferenceStorePerfTest$$anonfun$differenceQueryShouldGrowLinearlyAsDifferencesIncrease$1$$anonfun$apply$8.apply(DomainDifferenceStorePerfTest.scala:74)
    at scala.collection.immutable.NumericRange.foreach(NumericRange.scala:74)
    at net.lshift.diffa.kernel.differencing.DomainDifferenceStorePerfTest$$anonfun$differenceQueryShouldGrowLinearlyAsDifferencesIncrease$1.apply(DomainDifferenceStorePerfTest.scala:74)
    at net.lshift.diffa.kernel.differencing.DomainDifferenceStorePerfTest$$anonfun$differenceQueryShouldGrowLinearlyAsDifferencesIncrease$1.apply(DomainDifferenceStorePerfTest.scala:73)
    at net.lshift.diffa.kernel.differencing.DomainDifferenceStorePerfTest$$anonfun$1.apply(DomainDifferenceStorePerfTest.scala:154)
    at net.lshift.diffa.kernel.differencing.DomainDifferenceStorePerfTest$$anonfun$1.apply(DomainDifferenceStorePerfTest.scala:149)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
    at scala.collection.immutable.Range.foreach(Range.scala:75)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:194)
    at scala.collection.immutable.Range.map(Range.scala:43)
    at net.lshift.diffa.kernel.differencing.DomainDifferenceStorePerfTest.runPerformanceTest(DomainDifferenceStorePerfTest.scala:149)
    at net.lshift.diffa.kernel.differencing.DomainDifferenceStorePerfTest.differenceQueryShouldGrowLinearlyAsDifferencesIncrease(DomainDifferenceStorePerfTest.scala:73)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:71)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.sql.SQLIntegrityConstraintViolationException: INSERT on table 'DIFFS' caused a violation of foreign key constraint 'FK5AA9592F53F69C16' for key (pair,domain).  The statement has been rolled back.
    at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
    at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source)
    at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:57)
    ... 61 more
Caused by: java.sql.SQLException: INSERT on table 'DIFFS' caused a violation of foreign key constraint 'FK5AA9592F53F69C16' for key (pair,domain).  The statement has been rolled back.
    at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
    ... 71 more
Caused by: ERROR 23503: INSERT on table 'DIFFS' caused a violation of foreign key constraint 'FK5AA9592F53F69C16' for key (pair,domain).  The statement has been rolled back.
    at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
    at org.apache.derby.impl.sql.execute.ForeignKeyRIChecker.doCheck(Unknown Source)
    at org.apache.derby.impl.sql.execute.GenericRIChecker.doCheck(Unknown Source)
    at org.apache.derby.impl.sql.execute.RISetChecker.doFKCheck(Unknown Source)
    at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)
    at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
    at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
    at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
    ... 65 more

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A Real Time Differencing Tool.

Shared Ticket Bins

People watching this ticket

Pages