Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
- at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1692)
- at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1602)
- at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1608)
- at org.hibernate.jpa.spi.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:1303)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- at java.lang.reflect.Method.invoke(Method.java:498)
- at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:301)
- at com.sun.proxy.$Proxy156.flush(Unknown Source)
- at br.leg.senado.administrativo.gestaoorcamentaria.web.rest.ObrigacaoResourceIntTest.createEntity(ObrigacaoResourceIntTest.java:170)
- at br.leg.senado.administrativo.gestaoorcamentaria.web.rest.PeriodoResourceIntTest.createEntity(PeriodoResourceIntTest.java:115)
- at br.leg.senado.administrativo.gestaoorcamentaria.web.rest.AgrupadorPeriodoResourceIntTest.createEntity(AgrupadorPeriodoResourceIntTest.java:99)
- at br.leg.senado.administrativo.gestaoorcamentaria.web.rest.AgrupadorPeriodoResourceIntTest.initTest(AgrupadorPeriodoResourceIntTest.java:109)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- at java.lang.reflect.Method.invoke(Method.java:498)
- at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
- at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
- at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
- at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
- at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
- at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
- at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
- at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
- at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
- at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
- at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
- at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
- at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
- at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
- at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
- at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
- at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
- at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
- at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
- at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
- at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
- at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
- at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
- at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
- at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
- Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement
- at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)
- at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
- at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109)
- at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:95)
- at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207)
- at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:45)
- at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2949)
- at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3449)
- at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:89)
- at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:582)
- at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:456)
- at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
- at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
- at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1282)
- at org.hibernate.jpa.spi.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:1300)
- ... 39 more
- Caused by: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "UNQ_CODIGO_GESTAO_INDEX_3 ON PUBLIC.FAVORECIDO(CODIGO, GESTAO) VALUES ('AAAAAAAAAA', 'AAAAAAAAAB', 100101)"; SQL statement:
- insert into favorecido (bloqueio_id, codigo, gestao, nome, revisao_id, tipo_favorecido_id, id) values (?, ?, ?, ?, ?, ?, ?) [23505-196]
- at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
- at org.h2.message.DbException.get(DbException.java:179)
- at org.h2.message.DbException.get(DbException.java:155)
- at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:103)
- at org.h2.mvstore.db.MVSecondaryIndex.checkUnique(MVSecondaryIndex.java:231)
- at org.h2.mvstore.db.MVSecondaryIndex.add(MVSecondaryIndex.java:190)
- at org.h2.mvstore.db.MVTable.addRow(MVTable.java:705)
- at org.h2.command.dml.Insert.insertRows(Insert.java:156)
- at org.h2.command.dml.Insert.update(Insert.java:114)
- at org.h2.command.CommandContainer.update(CommandContainer.java:101)
- at org.h2.command.Command.executeUpdate(Command.java:260)
- at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:164)
- at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:150)
- at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
- ... 49 more
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement