turing85 commented on PR #9286:
URL: https://github.com/apache/camel/pull/9286#issuecomment-1413988867

   @zhfeng 
   ```
   2023-02-02 17:04:09,349 INFO  [org.apa.cam.qua.cor.CamelBootstrapRecorder] 
(Quarkus Main Thread) Bootstrap runtime: 
org.apache.camel.quarkus.main.CamelMainRuntime
   2023-02-02 17:04:09,359 INFO  [org.apa.cam.mai.MainSupport] (Quarkus Main 
Thread) Apache Camel (Main) 3.20.1 is starting
   2023-02-02 17:04:09,603 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] 
(Quarkus Main Thread) Apache Camel 3.20.1 (camel-1) is starting
   2023-02-02 17:04:09,820 ERROR 
[org.apa.cam.pro.ide.jdb.JdbcMessageIdRepository] (Quarkus Main Thread) Can't 
create table for JdbcMessageIdRepository with query 'CREATE TABLE 
CAMEL_MESSAGEPROCESSED (processorName VARCHAR(255), messageId VARCHAR(100), 
createdAt TIMESTAMP, PRIMARY KEY (processorName, messageId))' because of: 
StatementCallback; uncategorized SQLException for SQL [CREATE TABLE 
CAMEL_MESSAGEPROCESSED (processorName VARCHAR(255), messageId VARCHAR(100), 
createdAt TIMESTAMP, PRIMARY KEY (processorName, messageId))]; SQL state 
[25P02]; error code [0]; ERROR: current transaction is aborted, commands 
ignored until end of transaction block; nested exception is 
org.postgresql.util.PSQLException: ERROR: current transaction is aborted, 
commands ignored until end of transaction block. This may be a permissions 
problem. Please create this table and try again.
   2023-02-02 17:04:09,821 ERROR [org.apa.cam.imp.eng.AbstractCamelContext] 
(Quarkus Main Thread) Error starting CamelContext (camel-1) due to exception 
thrown: Failed to start route file-mover because of null: 
org.apache.camel.FailedToStartRouteException: Failed to start route file-mover 
because of null
        at 
org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:123)
        at 
org.apache.camel.impl.engine.InternalRouteStartupManager.doWarmUpRoutes(InternalRouteStartupManager.java:306)
        at 
org.apache.camel.impl.engine.InternalRouteStartupManager.safelyStartRouteServices(InternalRouteStartupManager.java:189)
        at 
org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRoutes(InternalRouteStartupManager.java:147)
        at 
org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:3425)
        at 
org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:3094)
        at 
org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:3049)
        at 
org.apache.camel.support.service.BaseService.start(BaseService.java:119)
        at 
org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2698)
        at 
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:262)
        at org.apache.camel.quarkus.main.CamelMain.doStart(CamelMain.java:94)
        at 
org.apache.camel.support.service.BaseService.start(BaseService.java:119)
        at 
org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:140)
        at 
org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
        at 
org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
        at 
io.quarkus.deployment.steps.CamelBootstrapProcessor$boot173480958.deploy_0(Unknown
 Source)
        at 
io.quarkus.deployment.steps.CamelBootstrapProcessor$boot173480958.deploy(Unknown
 Source)
        at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
        at io.quarkus.runtime.Application.start(Application.java:101)
        at 
io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:108)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
        at io.quarkus.runner.GeneratedMain.main(Unknown Source)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at 
io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:104)
        at java.base/java.lang.Thread.run(Thread.java:833)
   Caused by: org.apache.camel.RuntimeCamelException: 
org.springframework.jdbc.UncategorizedSQLException: StatementCallback; 
uncategorized SQLException for SQL [CREATE TABLE CAMEL_MESSAGEPROCESSED 
(processorName VARCHAR(255), messageId VARCHAR(100), createdAt TIMESTAMP, 
PRIMARY KEY (processorName, messageId))]; SQL state [25P02]; error code [0]; 
ERROR: current transaction is aborted, commands ignored until end of 
transaction block; nested exception is org.postgresql.util.PSQLException: 
ERROR: current transaction is aborted, commands ignored until end of 
transaction block
        at 
org.apache.camel.RuntimeCamelException.wrapRuntimeCamelException(RuntimeCamelException.java:51)
        at 
org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:67)
        at 
org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113)
        at 
org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:130)
        at 
org.apache.camel.impl.engine.DefaultChannel.doStart(DefaultChannel.java:126)
        at 
org.apache.camel.support.service.BaseService.start(BaseService.java:119)
        at 
org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113)
        at 
org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:116)
        at 
org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:130)
        at org.apache.camel.processor.Pipeline.doStart(Pipeline.java:207)
        at 
org.apache.camel.support.service.BaseService.start(BaseService.java:119)
        at 
org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113)
        at 
org.apache.camel.support.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:89)
        at 
org.apache.camel.support.service.BaseService.start(BaseService.java:119)
        at 
org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113)
        at 
org.apache.camel.impl.engine.RouteService.startChildServices(RouteService.java:396)
        at 
org.apache.camel.impl.engine.RouteService.doWarmUp(RouteService.java:193)
        at 
org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:121)
        ... 29 more
   Caused by: org.springframework.jdbc.UncategorizedSQLException: 
StatementCallback; uncategorized SQLException for SQL [CREATE TABLE 
CAMEL_MESSAGEPROCESSED (processorName VARCHAR(255), messageId VARCHAR(100), 
createdAt TIMESTAMP, PRIMARY KEY (processorName, messageId))]; SQL state 
[25P02]; error code [0]; ERROR: current transaction is aborted, commands 
ignored until end of transaction block; nested exception is 
org.postgresql.util.PSQLException: ERROR: current transaction is aborted, 
commands ignored until end of transaction block
        at 
org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1542)
        at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:393)
        at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:431)
        at 
org.apache.camel.processor.idempotent.jdbc.JdbcMessageIdRepository$1.doInTransaction(JdbcMessageIdRepository.java:92)
        at 
org.apache.camel.processor.idempotent.jdbc.JdbcMessageIdRepository$1.doInTransaction(JdbcMessageIdRepository.java:81)
        at 
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
        at 
org.apache.camel.processor.idempotent.jdbc.JdbcMessageIdRepository.doStart(JdbcMessageIdRepository.java:81)
        at 
org.apache.camel.support.service.BaseService.start(BaseService.java:119)
        at 
org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113)
        at 
org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:130)
        at 
org.apache.camel.processor.idempotent.IdempotentConsumer.doStart(IdempotentConsumer.java:220)
        at 
org.apache.camel.support.service.BaseService.start(BaseService.java:119)
        at 
org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113)
        at 
org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:130)
        at 
org.apache.camel.processor.errorhandler.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1670)
        at 
org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:60)
        ... 45 more
   Caused by: org.postgresql.util.PSQLException: ERROR: current transaction is 
aborted, commands ignored until end of transaction block
        at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
        at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366)
        at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413)
        at 
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:333)
        at 
org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:319)
        at 
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:295)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:290)
        at 
io.agroal.pool.wrapper.StatementWrapper.execute(StatementWrapper.java:235)
        at 
org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:422)
        at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:381)
        ... 59 more
   Caused by: org.postgresql.util.PSQLException: ERROR: relation 
"camel_messageprocessed" does not exist
     Position: 15
        at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
        at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366)
        at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413)
        at 
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:333)
        at 
org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:319)
        at 
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:295)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:290)
        at 
io.agroal.pool.wrapper.StatementWrapper.execute(StatementWrapper.java:235)
        at 
org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:422)
        at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:381)
        at 
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:431)
        at 
org.apache.camel.processor.idempotent.jdbc.JdbcMessageIdRepository$1.doInTransaction(JdbcMessageIdRepository.java:86)
        ... 57 more
   ```
   ---
   
   Reproducer: 
   - checkout 
https://github.com/turing85/camel-quarkus-idempotent-consumer/tree/default-repository
   - start database container: `cd local-deployment && docker compose up -d && 
cd ..`
   - start quarkus in dev mode: `./mvnw quarkus:dev`
   - observe above exception


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to