Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2019-03-06 15:29:23.708 WARN 1 --- [ntainer#4-0-C-1] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 23505
- 2019-03-06 15:29:23.708 ERROR 1 --- [ntainer#4-0-C-1] o.h.engine.jdbc.spi.SqlExceptionHelper : ERROR: duplicate key value violates unique constraint "pk_coupon_exemplar_key"
- Detail: Key (number)=(220001000000000015006) already exists.
- Where: SQL statement "INSERT INTO coupon_exemplar(
- number,
- category_id,
- batch_id,
- start_date,
- end_date,
- status,
- create_date,
- issued_date,
- used_date,
- issued_place_shop_number,
- issued_place_shift_number,
- issued_place_purchase_number,
- issued_place_cash_number,
- used_place_shop_number,
- used_place_shift_number,
- used_place_purchase_number,
- used_place_cash_number,
- extended_info)
- SELECT
- generate_exemplar_coupon_number(pPREFIX, vCATEGORY_ID_TEXT, vSERIES_NUMBER_TEXT, ind),
- pCATEGORY_ID,
- pBATCH_ID,
- pSTART_DATE,
- pEND_DATE,
- 0,
- pCREATE_DATE,
- NULL, -- issued date
- NULL, -- used date
- NULL, -- i-shop number
- NULL, -- i-shift number
- NULL, -- i-purchase number
- NULL, -- i-cash number
- NULL, -- u-shop number
- NULL, -- u-shift number
- NULL, -- u-purchase number
- NULL, -- u-cash number
- vJSONB_DETAILS
- FROM generate_series(pSTART_IND, pEND_IND - 1) ind"
- PL/pgSQL function generate_coupon_exemplars(text,integer,integer,bigint,bigint,bigint,timestamp without time zone,timestamp without time zone,text,timestamp without time zone) line 11 at SQL statement
- 2019-03-06 15:29:23.716 ERROR 1 --- [ntainer#4-0-C-1] essageListenerContainer$ListenerConsumer : Error handler threw an exception
- org.springframework.kafka.KafkaException: Seek to current after exception; nested exception is org.springframework.kafka.listener.ListenerExecutionFailedException: Listener method 'public void ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService.retry(ru.crystals.processing.coupons.kafka.domain.GenerateCouponsTask,java.lang.Long)' threw exception; nested exception is org.springframework.dao.DataIntegrityViolationException: Error calling CallableStatement.getMoreResults; SQL [generate_coupon_exemplars]; constraint [pk_coupon_exemplar_key]; nested exception is org.hibernate.exception.ConstraintViolationException: Error calling CallableStatement.getMoreResults
- at org.springframework.kafka.listener.SeekToCurrentErrorHandler.handle(SeekToCurrentErrorHandler.java:47) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeRecordListener(KafkaMessageListenerContainer.java:1108) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeWithRecords(KafkaMessageListenerContainer.java:1051) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeRecordListener(KafkaMessageListenerContainer.java:998) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeListener(KafkaMessageListenerContainer.java:866) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:724) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_181]
- at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_181]
- at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
- Caused by: org.springframework.kafka.listener.ListenerExecutionFailedException: Listener method 'public void ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService.retry(ru.crystals.processing.coupons.kafka.domain.GenerateCouponsTask,java.lang.Long)' threw exception; nested exception is org.springframework.dao.DataIntegrityViolationException: Error calling CallableStatement.getMoreResults; SQL [generate_coupon_exemplars]; constraint [pk_coupon_exemplar_key]; nested exception is org.hibernate.exception.ConstraintViolationException: Error calling CallableStatement.getMoreResults
- at org.springframework.kafka.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:267) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.adapter.RecordMessagingMessageListenerAdapter.onMessage(RecordMessagingMessageListenerAdapter.java:80) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.adapter.RecordMessagingMessageListenerAdapter.onMessage(RecordMessagingMessageListenerAdapter.java:51) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeRecordListener(KafkaMessageListenerContainer.java:1071) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- ... 7 common frames omitted
- Caused by: org.springframework.dao.DataIntegrityViolationException: Error calling CallableStatement.getMoreResults; SQL [generate_coupon_exemplars]; constraint [pk_coupon_exemplar_key]; nested exception is org.hibernate.exception.ConstraintViolationException: Error calling CallableStatement.getMoreResults
- at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:259) ~[spring-orm-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:225) ~[spring-orm-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:527) ~[spring-orm-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:153) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:135) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:61) ~[spring-data-commons-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at com.sun.proxy.$Proxy150.generateCoupons(Unknown Source) ~[na:na]
- at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService.generateCoupons(GenerateCouponSeriesConsumerService.java:111) ~[classes!/:na]
- at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService.retry(GenerateCouponSeriesConsumerService.java:82) ~[classes!/:na]
- at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService$$FastClassBySpringCGLIB$$17ad52b8.invoke(<generated>) ~[classes!/:na]
- at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService$$EnhancerBySpringCGLIB$$88f3e96b.retry(<generated>) ~[classes!/:na]
- at sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source) ~[na:na]
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
- at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
- at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:181) ~[spring-messaging-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:114) ~[spring-messaging-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.kafka.listener.adapter.HandlerAdapter.invoke(HandlerAdapter.java:48) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:248) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- ... 10 common frames omitted
- Caused by: org.hibernate.exception.ConstraintViolationException: Error calling CallableStatement.getMoreResults
- at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.result.internal.OutputsImpl.convert(OutputsImpl.java:79) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.result.internal.OutputsImpl.<init>(OutputsImpl.java:56) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.procedure.internal.ProcedureOutputsImpl.<init>(ProcedureOutputsImpl.java:34) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.procedure.internal.ProcedureCallImpl.buildOutputs(ProcedureCallImpl.java:453) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.procedure.internal.ProcedureCallImpl.getOutputs(ProcedureCallImpl.java:404) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.procedure.internal.ProcedureCallImpl.outputs(ProcedureCallImpl.java:663) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.procedure.internal.ProcedureCallImpl.execute(ProcedureCallImpl.java:646) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.springframework.data.jpa.repository.query.JpaQueryExecution$ProcedureExecution.doExecute(JpaQueryExecution.java:332) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:91) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:136) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:125) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:590) ~[spring-data-commons-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:578) ~[spring-data-commons-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:59) ~[spring-data-commons-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- ... 37 common frames omitted
- Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "pk_coupon_exemplar_key"
- Detail: Key (number)=(220001000000000015006) already exists.
- Where: SQL statement "INSERT INTO coupon_exemplar(
- number,
- category_id,
- batch_id,
- start_date,
- end_date,
- status,
- create_date,
- issued_date,
- used_date,
- issued_place_shop_number,
- issued_place_shift_number,
- issued_place_purchase_number,
- issued_place_cash_number,
- used_place_shop_number,
- used_place_shift_number,
- used_place_purchase_number,
- used_place_cash_number,
- extended_info)
- SELECT
- generate_exemplar_coupon_number(pPREFIX, vCATEGORY_ID_TEXT, vSERIES_NUMBER_TEXT, ind),
- pCATEGORY_ID,
- pBATCH_ID,
- pSTART_DATE,
- pEND_DATE,
- 0,
- pCREATE_DATE,
- NULL, -- issued date
- NULL, -- used date
- NULL, -- i-shop number
- NULL, -- i-shift number
- NULL, -- i-purchase number
- NULL, -- i-cash number
- NULL, -- u-shop number
- NULL, -- u-shift number
- NULL, -- u-purchase number
- NULL, -- u-cash number
- vJSONB_DETAILS
- FROM generate_series(pSTART_IND, pEND_IND - 1) ind"
- PL/pgSQL function generate_coupon_exemplars(text,integer,integer,bigint,bigint,bigint,timestamp without time zone,timestamp without time zone,text,timestamp without time zone) line 11 at SQL statement
- at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433) ~[postgresql-42.2.2.jar!/:42.2.2]
- at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2178) ~[postgresql-42.2.2.jar!/:42.2.2]
- at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306) ~[postgresql-42.2.2.jar!/:42.2.2]
- at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) ~[postgresql-42.2.2.jar!/:42.2.2]
- at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) ~[postgresql-42.2.2.jar!/:42.2.2]
- at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155) ~[postgresql-42.2.2.jar!/:42.2.2]
- at org.postgresql.jdbc.PgCallableStatement.executeWithFlags(PgCallableStatement.java:78) ~[postgresql-42.2.2.jar!/:42.2.2]
- at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:144) ~[postgresql-42.2.2.jar!/:42.2.2]
- at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[HikariCP-2.7.9.jar!/:na]
- at com.zaxxer.hikari.pool.HikariProxyCallableStatement.execute(HikariProxyCallableStatement.java) ~[HikariCP-2.7.9.jar!/:na]
- at org.hibernate.result.internal.OutputsImpl.<init>(OutputsImpl.java:52) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- ... 55 common frames omitted
- 2019-03-06 15:29:23.821 WARN 1 --- [ntainer#4-0-C-1] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 23505
- 2019-03-06 15:29:23.821 ERROR 1 --- [ntainer#4-0-C-1] o.h.engine.jdbc.spi.SqlExceptionHelper : ERROR: duplicate key value violates unique constraint "pk_coupon_exemplar_key"
- Detail: Key (number)=(220001000000000015006) already exists.
- Where: SQL statement "INSERT INTO coupon_exemplar(
- number,
- category_id,
- batch_id,
- start_date,
- end_date,
- status,
- create_date,
- issued_date,
- used_date,
- issued_place_shop_number,
- issued_place_shift_number,
- issued_place_purchase_number,
- issued_place_cash_number,
- used_place_shop_number,
- used_place_shift_number,
- used_place_purchase_number,
- used_place_cash_number,
- extended_info)
- SELECT
- generate_exemplar_coupon_number(pPREFIX, vCATEGORY_ID_TEXT, vSERIES_NUMBER_TEXT, ind),
- pCATEGORY_ID,
- pBATCH_ID,
- pSTART_DATE,
- pEND_DATE,
- 0,
- pCREATE_DATE,
- NULL, -- issued date
- NULL, -- used date
- NULL, -- i-shop number
- NULL, -- i-shift number
- NULL, -- i-purchase number
- NULL, -- i-cash number
- NULL, -- u-shop number
- NULL, -- u-shift number
- NULL, -- u-purchase number
- NULL, -- u-cash number
- vJSONB_DETAILS
- FROM generate_series(pSTART_IND, pEND_IND - 1) ind"
- PL/pgSQL function generate_coupon_exemplars(text,integer,integer,bigint,bigint,bigint,timestamp without time zone,timestamp without time zone,text,timestamp without time zone) line 11 at SQL statement
- 2019-03-06 15:29:23.827 ERROR 1 --- [ntainer#4-0-C-1] essageListenerContainer$ListenerConsumer : Error handler threw an exception
- org.springframework.kafka.KafkaException: Seek to current after exception; nested exception is org.springframework.kafka.listener.ListenerExecutionFailedException: Listener method 'public void ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService.retry(ru.crystals.processing.coupons.kafka.domain.GenerateCouponsTask,java.lang.Long)' threw exception; nested exception is org.springframework.dao.DataIntegrityViolationException: Error calling CallableStatement.getMoreResults; SQL [generate_coupon_exemplars]; constraint [pk_coupon_exemplar_key]; nested exception is org.hibernate.exception.ConstraintViolationException: Error calling CallableStatement.getMoreResults
- at org.springframework.kafka.listener.SeekToCurrentErrorHandler.handle(SeekToCurrentErrorHandler.java:47) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeRecordListener(KafkaMessageListenerContainer.java:1108) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeWithRecords(KafkaMessageListenerContainer.java:1051) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeRecordListener(KafkaMessageListenerContainer.java:998) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeListener(KafkaMessageListenerContainer.java:866) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:724) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_181]
- at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_181]
- at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
- Caused by: org.springframework.kafka.listener.ListenerExecutionFailedException: Listener method 'public void ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService.retry(ru.crystals.processing.coupons.kafka.domain.GenerateCouponsTask,java.lang.Long)' threw exception; nested exception is org.springframework.dao.DataIntegrityViolationException: Error calling CallableStatement.getMoreResults; SQL [generate_coupon_exemplars]; constraint [pk_coupon_exemplar_key]; nested exception is org.hibernate.exception.ConstraintViolationException: Error calling CallableStatement.getMoreResults
- at org.springframework.kafka.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:267) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.adapter.RecordMessagingMessageListenerAdapter.onMessage(RecordMessagingMessageListenerAdapter.java:80) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.adapter.RecordMessagingMessageListenerAdapter.onMessage(RecordMessagingMessageListenerAdapter.java:51) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeRecordListener(KafkaMessageListenerContainer.java:1071) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- ... 7 common frames omitted
- Caused by: org.springframework.dao.DataIntegrityViolationException: Error calling CallableStatement.getMoreResults; SQL [generate_coupon_exemplars]; constraint [pk_coupon_exemplar_key]; nested exception is org.hibernate.exception.ConstraintViolationException: Error calling CallableStatement.getMoreResults
- at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:259) ~[spring-orm-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:225) ~[spring-orm-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:527) ~[spring-orm-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:153) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:135) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:61) ~[spring-data-commons-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at com.sun.proxy.$Proxy150.generateCoupons(Unknown Source) ~[na:na]
- at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService.generateCoupons(GenerateCouponSeriesConsumerService.java:111) ~[classes!/:na]
- at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService.retry(GenerateCouponSeriesConsumerService.java:82) ~[classes!/:na]
- at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService$$FastClassBySpringCGLIB$$17ad52b8.invoke(<generated>) ~[classes!/:na]
- at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService$$EnhancerBySpringCGLIB$$88f3e96b.retry(<generated>) ~[classes!/:na]
- at sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source) ~[na:na]
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
- at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
- at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:181) ~[spring-messaging-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:114) ~[spring-messaging-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.kafka.listener.adapter.HandlerAdapter.invoke(HandlerAdapter.java:48) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- at org.springframework.kafka.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:248) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
- ... 10 common frames omitted
- Caused by: org.hibernate.exception.ConstraintViolationException: Error calling CallableStatement.getMoreResults
- at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.result.internal.OutputsImpl.convert(OutputsImpl.java:79) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.result.internal.OutputsImpl.<init>(OutputsImpl.java:56) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.procedure.internal.ProcedureOutputsImpl.<init>(ProcedureOutputsImpl.java:34) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.procedure.internal.ProcedureCallImpl.buildOutputs(ProcedureCallImpl.java:453) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.procedure.internal.ProcedureCallImpl.getOutputs(ProcedureCallImpl.java:404) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.procedure.internal.ProcedureCallImpl.outputs(ProcedureCallImpl.java:663) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.hibernate.procedure.internal.ProcedureCallImpl.execute(ProcedureCallImpl.java:646) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- at org.springframework.data.jpa.repository.query.JpaQueryExecution$ProcedureExecution.doExecute(JpaQueryExecution.java:332) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:91) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:136) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:125) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:590) ~[spring-data-commons-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:578) ~[spring-data-commons-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:59) ~[spring-data-commons-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
- ... 37 common frames omitted
- Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "pk_coupon_exemplar_key"
- Detail: Key (number)=(220001000000000015006) already exists.
- Where: SQL statement "INSERT INTO coupon_exemplar(
- number,
- category_id,
- batch_id,
- start_date,
- end_date,
- status,
- create_date,
- issued_date,
- used_date,
- issued_place_shop_number,
- issued_place_shift_number,
- issued_place_purchase_number,
- issued_place_cash_number,
- used_place_shop_number,
- used_place_shift_number,
- used_place_purchase_number,
- used_place_cash_number,
- extended_info)
- SELECT
- generate_exemplar_coupon_number(pPREFIX, vCATEGORY_ID_TEXT, vSERIES_NUMBER_TEXT, ind),
- pCATEGORY_ID,
- pBATCH_ID,
- pSTART_DATE,
- pEND_DATE,
- 0,
- pCREATE_DATE,
- NULL, -- issued date
- NULL, -- used date
- NULL, -- i-shop number
- NULL, -- i-shift number
- NULL, -- i-purchase number
- NULL, -- i-cash number
- NULL, -- u-shop number
- NULL, -- u-shift number
- NULL, -- u-purchase number
- NULL, -- u-cash number
- vJSONB_DETAILS
- FROM generate_series(pSTART_IND, pEND_IND - 1) ind"
- PL/pgSQL function generate_coupon_exemplars(text,integer,integer,bigint,bigint,bigint,timestamp without time zone,timestamp without time zone,text,timestamp without time zone) line 11 at SQL statement
- at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433) ~[postgresql-42.2.2.jar!/:42.2.2]
- at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2178) ~[postgresql-42.2.2.jar!/:42.2.2]
- at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306) ~[postgresql-42.2.2.jar!/:42.2.2]
- at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) ~[postgresql-42.2.2.jar!/:42.2.2]
- at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) ~[postgresql-42.2.2.jar!/:42.2.2]
- at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155) ~[postgresql-42.2.2.jar!/:42.2.2]
- at org.postgresql.jdbc.PgCallableStatement.executeWithFlags(PgCallableStatement.java:78) ~[postgresql-42.2.2.jar!/:42.2.2]
- at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:144) ~[postgresql-42.2.2.jar!/:42.2.2]
- at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[HikariCP-2.7.9.jar!/:na]
- at com.zaxxer.hikari.pool.HikariProxyCallableStatement.execute(HikariProxyCallableStatement.java) ~[HikariCP-2.7.9.jar!/:na]
- at org.hibernate.result.internal.OutputsImpl.<init>(OutputsImpl.java:52) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
- ... 55 common frames omitted
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement