Advertisement
fedorm

Untitled

Mar 6th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.08 KB | None | 0 0
  1. 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
  2. 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"
  3. Detail: Key (number)=(220001000000000015006) already exists.
  4. Where: SQL statement "INSERT INTO coupon_exemplar(
  5. number,
  6. category_id,
  7. batch_id,
  8. start_date,
  9. end_date,
  10. status,
  11. create_date,
  12. issued_date,
  13. used_date,
  14. issued_place_shop_number,
  15. issued_place_shift_number,
  16. issued_place_purchase_number,
  17. issued_place_cash_number,
  18. used_place_shop_number,
  19. used_place_shift_number,
  20. used_place_purchase_number,
  21. used_place_cash_number,
  22. extended_info)
  23. SELECT
  24. generate_exemplar_coupon_number(pPREFIX, vCATEGORY_ID_TEXT, vSERIES_NUMBER_TEXT, ind),
  25. pCATEGORY_ID,
  26. pBATCH_ID,
  27. pSTART_DATE,
  28. pEND_DATE,
  29. 0,
  30. pCREATE_DATE,
  31. NULL, -- issued date
  32. NULL, -- used date
  33. NULL, -- i-shop number
  34. NULL, -- i-shift number
  35. NULL, -- i-purchase number
  36. NULL, -- i-cash number
  37. NULL, -- u-shop number
  38. NULL, -- u-shift number
  39. NULL, -- u-purchase number
  40. NULL, -- u-cash number
  41. vJSONB_DETAILS
  42. FROM generate_series(pSTART_IND, pEND_IND - 1) ind"
  43. 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
  44. 2019-03-06 15:29:23.716 ERROR 1 --- [ntainer#4-0-C-1] essageListenerContainer$ListenerConsumer : Error handler threw an exception
  45.  
  46. 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
  47. at org.springframework.kafka.listener.SeekToCurrentErrorHandler.handle(SeekToCurrentErrorHandler.java:47) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  48. at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeRecordListener(KafkaMessageListenerContainer.java:1108) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  49. at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeWithRecords(KafkaMessageListenerContainer.java:1051) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  50. at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeRecordListener(KafkaMessageListenerContainer.java:998) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  51. at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeListener(KafkaMessageListenerContainer.java:866) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  52. at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:724) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  53. at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_181]
  54. at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_181]
  55. at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
  56. 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
  57. at org.springframework.kafka.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:267) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  58. at org.springframework.kafka.listener.adapter.RecordMessagingMessageListenerAdapter.onMessage(RecordMessagingMessageListenerAdapter.java:80) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  59. at org.springframework.kafka.listener.adapter.RecordMessagingMessageListenerAdapter.onMessage(RecordMessagingMessageListenerAdapter.java:51) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  60. at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeRecordListener(KafkaMessageListenerContainer.java:1071) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  61. ... 7 common frames omitted
  62. 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
  63. at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:259) ~[spring-orm-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  64. at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:225) ~[spring-orm-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  65. at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:527) ~[spring-orm-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  66. at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  67. at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  68. at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:153) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  69. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  70. 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]
  71. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  72. at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  73. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  74. at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:61) ~[spring-data-commons-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
  75. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  76. at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  77. at com.sun.proxy.$Proxy150.generateCoupons(Unknown Source) ~[na:na]
  78. at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService.generateCoupons(GenerateCouponSeriesConsumerService.java:111) ~[classes!/:na]
  79. at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService.retry(GenerateCouponSeriesConsumerService.java:82) ~[classes!/:na]
  80. at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService$$FastClassBySpringCGLIB$$17ad52b8.invoke(<generated>) ~[classes!/:na]
  81. at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  82. at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  83. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  84. at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  85. at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  86. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  87. at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  88. at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService$$EnhancerBySpringCGLIB$$88f3e96b.retry(<generated>) ~[classes!/:na]
  89. at sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source) ~[na:na]
  90. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
  91. at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
  92. at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:181) ~[spring-messaging-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  93. at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:114) ~[spring-messaging-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  94. at org.springframework.kafka.listener.adapter.HandlerAdapter.invoke(HandlerAdapter.java:48) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  95. at org.springframework.kafka.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:248) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  96. ... 10 common frames omitted
  97. Caused by: org.hibernate.exception.ConstraintViolationException: Error calling CallableStatement.getMoreResults
  98. at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  99. at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  100. at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  101. at org.hibernate.result.internal.OutputsImpl.convert(OutputsImpl.java:79) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  102. at org.hibernate.result.internal.OutputsImpl.<init>(OutputsImpl.java:56) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  103. at org.hibernate.procedure.internal.ProcedureOutputsImpl.<init>(ProcedureOutputsImpl.java:34) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  104. at org.hibernate.procedure.internal.ProcedureCallImpl.buildOutputs(ProcedureCallImpl.java:453) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  105. at org.hibernate.procedure.internal.ProcedureCallImpl.getOutputs(ProcedureCallImpl.java:404) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  106. at org.hibernate.procedure.internal.ProcedureCallImpl.outputs(ProcedureCallImpl.java:663) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  107. at org.hibernate.procedure.internal.ProcedureCallImpl.execute(ProcedureCallImpl.java:646) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  108. 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]
  109. at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:91) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
  110. at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:136) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
  111. at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:125) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
  112. 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]
  113. 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]
  114. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  115. at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:59) ~[spring-data-commons-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
  116. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  117. at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  118. at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  119. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  120. at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  121. ... 37 common frames omitted
  122. Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "pk_coupon_exemplar_key"
  123. Detail: Key (number)=(220001000000000015006) already exists.
  124. Where: SQL statement "INSERT INTO coupon_exemplar(
  125. number,
  126. category_id,
  127. batch_id,
  128. start_date,
  129. end_date,
  130. status,
  131. create_date,
  132. issued_date,
  133. used_date,
  134. issued_place_shop_number,
  135. issued_place_shift_number,
  136. issued_place_purchase_number,
  137. issued_place_cash_number,
  138. used_place_shop_number,
  139. used_place_shift_number,
  140. used_place_purchase_number,
  141. used_place_cash_number,
  142. extended_info)
  143. SELECT
  144. generate_exemplar_coupon_number(pPREFIX, vCATEGORY_ID_TEXT, vSERIES_NUMBER_TEXT, ind),
  145. pCATEGORY_ID,
  146. pBATCH_ID,
  147. pSTART_DATE,
  148. pEND_DATE,
  149. 0,
  150. pCREATE_DATE,
  151. NULL, -- issued date
  152. NULL, -- used date
  153. NULL, -- i-shop number
  154. NULL, -- i-shift number
  155. NULL, -- i-purchase number
  156. NULL, -- i-cash number
  157. NULL, -- u-shop number
  158. NULL, -- u-shift number
  159. NULL, -- u-purchase number
  160. NULL, -- u-cash number
  161. vJSONB_DETAILS
  162. FROM generate_series(pSTART_IND, pEND_IND - 1) ind"
  163. 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
  164. at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433) ~[postgresql-42.2.2.jar!/:42.2.2]
  165. at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2178) ~[postgresql-42.2.2.jar!/:42.2.2]
  166. at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306) ~[postgresql-42.2.2.jar!/:42.2.2]
  167. at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) ~[postgresql-42.2.2.jar!/:42.2.2]
  168. at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) ~[postgresql-42.2.2.jar!/:42.2.2]
  169. at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155) ~[postgresql-42.2.2.jar!/:42.2.2]
  170. at org.postgresql.jdbc.PgCallableStatement.executeWithFlags(PgCallableStatement.java:78) ~[postgresql-42.2.2.jar!/:42.2.2]
  171. at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:144) ~[postgresql-42.2.2.jar!/:42.2.2]
  172. at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[HikariCP-2.7.9.jar!/:na]
  173. at com.zaxxer.hikari.pool.HikariProxyCallableStatement.execute(HikariProxyCallableStatement.java) ~[HikariCP-2.7.9.jar!/:na]
  174. at org.hibernate.result.internal.OutputsImpl.<init>(OutputsImpl.java:52) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  175. ... 55 common frames omitted
  176.  
  177. 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
  178. 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"
  179. Detail: Key (number)=(220001000000000015006) already exists.
  180. Where: SQL statement "INSERT INTO coupon_exemplar(
  181. number,
  182. category_id,
  183. batch_id,
  184. start_date,
  185. end_date,
  186. status,
  187. create_date,
  188. issued_date,
  189. used_date,
  190. issued_place_shop_number,
  191. issued_place_shift_number,
  192. issued_place_purchase_number,
  193. issued_place_cash_number,
  194. used_place_shop_number,
  195. used_place_shift_number,
  196. used_place_purchase_number,
  197. used_place_cash_number,
  198. extended_info)
  199. SELECT
  200. generate_exemplar_coupon_number(pPREFIX, vCATEGORY_ID_TEXT, vSERIES_NUMBER_TEXT, ind),
  201. pCATEGORY_ID,
  202. pBATCH_ID,
  203. pSTART_DATE,
  204. pEND_DATE,
  205. 0,
  206. pCREATE_DATE,
  207. NULL, -- issued date
  208. NULL, -- used date
  209. NULL, -- i-shop number
  210. NULL, -- i-shift number
  211. NULL, -- i-purchase number
  212. NULL, -- i-cash number
  213. NULL, -- u-shop number
  214. NULL, -- u-shift number
  215. NULL, -- u-purchase number
  216. NULL, -- u-cash number
  217. vJSONB_DETAILS
  218. FROM generate_series(pSTART_IND, pEND_IND - 1) ind"
  219. 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
  220. 2019-03-06 15:29:23.827 ERROR 1 --- [ntainer#4-0-C-1] essageListenerContainer$ListenerConsumer : Error handler threw an exception
  221.  
  222. 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
  223. at org.springframework.kafka.listener.SeekToCurrentErrorHandler.handle(SeekToCurrentErrorHandler.java:47) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  224. at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeRecordListener(KafkaMessageListenerContainer.java:1108) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  225. at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeWithRecords(KafkaMessageListenerContainer.java:1051) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  226. at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeRecordListener(KafkaMessageListenerContainer.java:998) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  227. at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeListener(KafkaMessageListenerContainer.java:866) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  228. at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:724) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  229. at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_181]
  230. at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_181]
  231. at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
  232. 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
  233. at org.springframework.kafka.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:267) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  234. at org.springframework.kafka.listener.adapter.RecordMessagingMessageListenerAdapter.onMessage(RecordMessagingMessageListenerAdapter.java:80) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  235. at org.springframework.kafka.listener.adapter.RecordMessagingMessageListenerAdapter.onMessage(RecordMessagingMessageListenerAdapter.java:51) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  236. at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeRecordListener(KafkaMessageListenerContainer.java:1071) [spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  237. ... 7 common frames omitted
  238. 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
  239. at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:259) ~[spring-orm-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  240. at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:225) ~[spring-orm-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  241. at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:527) ~[spring-orm-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  242. at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  243. at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  244. at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:153) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  245. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  246. 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]
  247. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  248. at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  249. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  250. at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:61) ~[spring-data-commons-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
  251. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  252. at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  253. at com.sun.proxy.$Proxy150.generateCoupons(Unknown Source) ~[na:na]
  254. at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService.generateCoupons(GenerateCouponSeriesConsumerService.java:111) ~[classes!/:na]
  255. at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService.retry(GenerateCouponSeriesConsumerService.java:82) ~[classes!/:na]
  256. at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService$$FastClassBySpringCGLIB$$17ad52b8.invoke(<generated>) ~[classes!/:na]
  257. at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  258. at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  259. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  260. at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  261. at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  262. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  263. at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  264. at ru.crystals.processing.coupons.consumer.series.GenerateCouponSeriesConsumerService$$EnhancerBySpringCGLIB$$88f3e96b.retry(<generated>) ~[classes!/:na]
  265. at sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source) ~[na:na]
  266. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
  267. at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
  268. at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:181) ~[spring-messaging-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  269. at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:114) ~[spring-messaging-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  270. at org.springframework.kafka.listener.adapter.HandlerAdapter.invoke(HandlerAdapter.java:48) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  271. at org.springframework.kafka.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:248) ~[spring-kafka-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
  272. ... 10 common frames omitted
  273. Caused by: org.hibernate.exception.ConstraintViolationException: Error calling CallableStatement.getMoreResults
  274. at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  275. at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  276. at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  277. at org.hibernate.result.internal.OutputsImpl.convert(OutputsImpl.java:79) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  278. at org.hibernate.result.internal.OutputsImpl.<init>(OutputsImpl.java:56) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  279. at org.hibernate.procedure.internal.ProcedureOutputsImpl.<init>(ProcedureOutputsImpl.java:34) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  280. at org.hibernate.procedure.internal.ProcedureCallImpl.buildOutputs(ProcedureCallImpl.java:453) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  281. at org.hibernate.procedure.internal.ProcedureCallImpl.getOutputs(ProcedureCallImpl.java:404) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  282. at org.hibernate.procedure.internal.ProcedureCallImpl.outputs(ProcedureCallImpl.java:663) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  283. at org.hibernate.procedure.internal.ProcedureCallImpl.execute(ProcedureCallImpl.java:646) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  284. 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]
  285. at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:91) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
  286. at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:136) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
  287. at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:125) ~[spring-data-jpa-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
  288. 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]
  289. 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]
  290. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  291. at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:59) ~[spring-data-commons-2.0.7.RELEASE.jar!/:2.0.7.RELEASE]
  292. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  293. at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  294. at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  295. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  296. at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) ~[spring-tx-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
  297. ... 37 common frames omitted
  298. Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "pk_coupon_exemplar_key"
  299. Detail: Key (number)=(220001000000000015006) already exists.
  300. Where: SQL statement "INSERT INTO coupon_exemplar(
  301. number,
  302. category_id,
  303. batch_id,
  304. start_date,
  305. end_date,
  306. status,
  307. create_date,
  308. issued_date,
  309. used_date,
  310. issued_place_shop_number,
  311. issued_place_shift_number,
  312. issued_place_purchase_number,
  313. issued_place_cash_number,
  314. used_place_shop_number,
  315. used_place_shift_number,
  316. used_place_purchase_number,
  317. used_place_cash_number,
  318. extended_info)
  319. SELECT
  320. generate_exemplar_coupon_number(pPREFIX, vCATEGORY_ID_TEXT, vSERIES_NUMBER_TEXT, ind),
  321. pCATEGORY_ID,
  322. pBATCH_ID,
  323. pSTART_DATE,
  324. pEND_DATE,
  325. 0,
  326. pCREATE_DATE,
  327. NULL, -- issued date
  328. NULL, -- used date
  329. NULL, -- i-shop number
  330. NULL, -- i-shift number
  331. NULL, -- i-purchase number
  332. NULL, -- i-cash number
  333. NULL, -- u-shop number
  334. NULL, -- u-shift number
  335. NULL, -- u-purchase number
  336. NULL, -- u-cash number
  337. vJSONB_DETAILS
  338. FROM generate_series(pSTART_IND, pEND_IND - 1) ind"
  339. 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
  340. at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433) ~[postgresql-42.2.2.jar!/:42.2.2]
  341. at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2178) ~[postgresql-42.2.2.jar!/:42.2.2]
  342. at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306) ~[postgresql-42.2.2.jar!/:42.2.2]
  343. at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) ~[postgresql-42.2.2.jar!/:42.2.2]
  344. at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) ~[postgresql-42.2.2.jar!/:42.2.2]
  345. at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155) ~[postgresql-42.2.2.jar!/:42.2.2]
  346. at org.postgresql.jdbc.PgCallableStatement.executeWithFlags(PgCallableStatement.java:78) ~[postgresql-42.2.2.jar!/:42.2.2]
  347. at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:144) ~[postgresql-42.2.2.jar!/:42.2.2]
  348. at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[HikariCP-2.7.9.jar!/:na]
  349. at com.zaxxer.hikari.pool.HikariProxyCallableStatement.execute(HikariProxyCallableStatement.java) ~[HikariCP-2.7.9.jar!/:na]
  350. at org.hibernate.result.internal.OutputsImpl.<init>(OutputsImpl.java:52) ~[hibernate-core-5.2.17.Final.jar!/:5.2.17.Final]
  351. ... 55 common frames omitted
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement