Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-10838

SB2 - spring-boot-camel-xa: relation "audit_log" does not exist

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • fuse-7.4-GA
    • fuse-7.4-GA
    • Examples, Spring Boot
    • None
    • % %

    Description

      Running xa quickstart with modifications connection params of AMQ and Postgresql to application.properties

      mvn spring-boot:run

      Error:

      [INFO] --- spring-boot-maven-plugin:7.4.0.fuse-sb2-740002:run (default-cli) @ spring-boot-camel-xa ---
      
        .   ____          _            __ _ _
       /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
      ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
       \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
        '  |____| .__|_| |_|_| |_\__, | / / / /
       =========|_|==============|___/=/_/_/_/
       :: Spring Boot ::        (v2.1.3.RELEASE)
      
      2019-06-14 11:10:16.218  INFO 44186 --- [           main] com.redhat.fuse.quickstarts.Application  : Starting Application on llowinge-mac with PID 44186 (/Users/llowinge/Redhat/xpaas/fabric8-quickstarts/spring-boot-camel-xa/target/classes started by llowinge in /Users/llowinge/Redhat/xpaas/fabric8-quickstarts/spring-boot-camel-xa)
      2019-06-14 11:10:16.220  INFO 44186 --- [           main] com.redhat.fuse.quickstarts.Application  : No active profile set, falling back to default profiles: default
      2019-06-14 11:10:17.926  INFO 44186 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.apache.camel.spring.boot.CamelAutoConfiguration' of type [org.apache.camel.spring.boot.CamelAutoConfiguration$$EnhancerBySpringCGLIB$$e2823ed0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
      2019-06-14 11:10:17.937  INFO 44186 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$c05878b1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
      2019-06-14 11:10:18.183  INFO 44186 --- [           main] org.xnio                                 : XNIO version 3.3.8.Final
      2019-06-14 11:10:18.197  INFO 44186 --- [           main] org.xnio.nio                             : XNIO NIO Implementation Version 3.3.8.Final
      2019-06-14 11:10:18.304  WARN 44186 --- [           main] io.undertow.websockets.jsr               : UT026009: XNIO worker was not set on WebSocketDeploymentInfo, the default worker will be used
      2019-06-14 11:10:18.304  WARN 44186 --- [           main] io.undertow.websockets.jsr               : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
      2019-06-14 11:10:18.333  INFO 44186 --- [           main] io.undertow.servlet                      : Initializing Spring embedded WebApplicationContext
      2019-06-14 11:10:18.334  INFO 44186 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2074 ms
      2019-06-14 11:10:18.792  INFO 44186 --- [           main] o.a.c.i.converter.DefaultTypeConverter   : Type converters loaded (core: 195, classpath: 7)
      2019-06-14 11:10:18.962  WARN 44186 --- [           main] com.arjuna.ats.common                    : ARJUNA048002: Could not find configuration file, URL was: null
      2019-06-14 11:10:19.216  INFO 44186 --- [           main] com.arjuna.ats.jbossatx                  : ARJUNA032010: JBossTS Recovery Service (tag: unknown) - JBoss Inc.
      2019-06-14 11:10:19.259  INFO 44186 --- [           main] com.arjuna.ats.jbossatx                  : ARJUNA032013: Starting transaction recovery manager
      2019-06-14 11:10:20.962  INFO 44186 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
      2019-06-14 11:10:21.602  INFO 44186 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
      2019-06-14 11:10:21.808  INFO 44186 --- [           main] o.a.camel.spring.boot.RoutesCollector    : Loading additional Camel XML routes from: classpath:camel/*.xml
      2019-06-14 11:10:21.809  INFO 44186 --- [           main] o.a.camel.spring.boot.RoutesCollector    : Loading additional Camel XML rests from: classpath:camel-rest/*.xml
      2019-06-14 11:10:21.810  INFO 44186 --- [           main] o.a.camel.spring.SpringCamelContext      : Apache Camel 2.23.2.fuse-740002 (CamelContext: SpringBootCamelXa) is starting
      2019-06-14 11:10:21.811  INFO 44186 --- [           main] o.a.c.m.ManagedManagementStrategy        : JMX is enabled
      2019-06-14 11:10:22.083  INFO 44186 --- [           main] o.a.camel.spring.SpringCamelContext      : StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
      2019-06-14 11:10:22.194  INFO 44186 --- [           main] o.a.camel.spring.SpringCamelContext      : Route: route1 started and consuming from: direct://transaction
      2019-06-14 11:10:22.198  INFO 44186 --- [           main] o.a.camel.spring.SpringCamelContext      : Route: route2 started and consuming from: jms://outbound
      2019-06-14 11:10:22.200  INFO 44186 --- [           main] o.a.camel.spring.SpringCamelContext      : Route: route3 started and consuming from: servlet:/?httpMethodRestrict=GET
      2019-06-14 11:10:22.201  INFO 44186 --- [           main] o.a.camel.spring.SpringCamelContext      : Route: route4 started and consuming from: servlet:/?httpMethodRestrict=POST
      2019-06-14 11:10:22.201  INFO 44186 --- [           main] o.a.camel.spring.SpringCamelContext      : Total 4 routes, of which 4 are started
      2019-06-14 11:10:22.202  INFO 44186 --- [           main] o.a.camel.spring.SpringCamelContext      : Apache Camel 2.23.2.fuse-740002 (CamelContext: SpringBootCamelXa) started in 0.392 seconds
      2019-06-14 11:10:22.206  INFO 44186 --- [sumer[outbound]] com.arjuna.ats.arjuna                    : ARJUNA012170: TransactionStatusManager started on port 50851 and host 127.0.0.1 with service com.arjuna.ats.arjuna.recovery.ActionStatusService
      2019-06-14 11:10:22.222  INFO 44186 --- [           main] o.a.c.c.s.CamelHttpTransportServlet      : Initialized CamelHttpTransportServlet[name=CamelServlet, contextPath=]
      2019-06-14 11:10:22.301  INFO 44186 --- [           main] o.s.b.w.e.u.UndertowServletWebServer     : Undertow started on port(s) 8080 (http) with context path ''
      2019-06-14 11:10:22.306  INFO 44186 --- [           main] com.redhat.fuse.quickstarts.Application  : Started Application in 6.576 seconds (JVM running for 42.389)
      2019-06-14 11:12:44.594 ERROR 44186 --- [  XNIO-2 task-1] o.a.camel.processor.DefaultErrorHandler  : Failed delivery for (MessageId: ID-llowinge-mac-1560503418622-0-2 on ExchangeId: ID-llowinge-mac-1560503418622-0-1). Exhausted after delivery attempt: 1 caught: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation "audit_log" does not exist
        Position: 21
      
      Message History
      ---------------------------------------------------------------------------------------------------------------------------------------
      RouteId              ProcessorId          Processor                                                                        Elapsed (ms)
      [route3            ] [route3            ] [servlet:/?httpMethodRestrict=GET                                              ] [       265]
      [route3            ] [to4               ] [sql:select message from audit_log order by audit_id                           ] [       259]
      
      Stacktrace
      ---------------------------------------------------------------------------------------------------------------------------------------
      
      org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation "audit_log" does not exist
        Position: 21
      	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:234) ~[spring-jdbc-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) ~[spring-jdbc-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      	at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1444) ~[spring-jdbc-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:632) ~[spring-jdbc-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      	at org.apache.camel.component.sql.SqlProducer.process(SqlProducer.java:116) ~[camel-sql-2.23.2.fuse-740002.jar:2.23.2.fuse-740002]
      	at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) ~[camel-core-2.23.2.fuse-740002.jar:2.23.2.fuse-740002]
      	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) ~[camel-core-2.23.2.fuse-740002.jar:2.23.2.fuse-740002]
      	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) ~[camel-core-2.23.2.fuse-740002.jar:2.23.2.fuse-740002]
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.23.2.fuse-740002.jar:2.23.2.fuse-740002]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) [camel-core-2.23.2.fuse-740002.jar:2.23.2.fuse-740002]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) [camel-core-2.23.2.fuse-740002.jar:2.23.2.fuse-740002]
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.23.2.fuse-740002.jar:2.23.2.fuse-740002]
      	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97) [camel-core-2.23.2.fuse-740002.jar:2.23.2.fuse-740002]
      	at org.apache.camel.http.common.CamelServlet.doService(CamelServlet.java:213) [camel-http-common-2.23.2.fuse-740002.jar:2.23.2.fuse-740002]
      	at org.apache.camel.http.common.CamelServlet.service(CamelServlet.java:79) [camel-http-common-2.23.2.fuse-740002.jar:2.23.2.fuse-740002]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:750) [javax.servlet-api-4.0.1.jar:4.0.1]
      	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90) [spring-boot-actuator-2.1.3.RELEASE.jar:2.1.3.RELEASE]
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92) [spring-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) [spring-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:117) [spring-boot-actuator-2.1.3.RELEASE.jar:2.1.3.RELEASE]
      	at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:106) [spring-boot-actuator-2.1.3.RELEASE.jar:2.1.3.RELEASE]
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) [spring-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) [undertow-core-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) [undertow-core-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360) [undertow-core-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) [undertow-core-2.0.15.Final-redhat-00001.jar:2.0.15.Final-redhat-00001]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_181]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_181]
      	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
      Caused by: org.postgresql.util.PSQLException: ERROR: relation "audit_log" does not exist
        Position: 21
      	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440) ~[postgresql-42.2.5.jar:42.2.5]
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183) ~[postgresql-42.2.5.jar:42.2.5]
      	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308) ~[postgresql-42.2.5.jar:42.2.5]
      	at org.postgresql.jdbc.PgPreparedStatement.getParameterMetaData(PgPreparedStatement.java:1560) ~[postgresql-42.2.5.jar:42.2.5]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181]
      	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.postgresql.ds.PGPooledConnection$StatementHandler.invoke(PGPooledConnection.java:428) ~[postgresql-42.2.5.jar:42.2.5]
      	at com.sun.proxy.$Proxy121.getParameterMetaData(Unknown Source) ~[na:na]
      	at org.apache.camel.component.sql.SqlProducer$2.doInPreparedStatement(SqlProducer.java:120) ~[camel-sql-2.23.2.fuse-740002.jar:2.23.2.fuse-740002]
      	at org.apache.camel.component.sql.SqlProducer$2.doInPreparedStatement(SqlProducer.java:116) ~[camel-sql-2.23.2.fuse-740002.jar:2.23.2.fuse-740002]
      	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:617) ~[spring-jdbc-5.1.5.RELEASE.jar:5.1.5.RELEASE]
      	... 67 common frames omitted
      

      After some debugging i've found that audit_log table was never created. And found that we need to add (as it is enabled only for embedded dbs by default)

      spring.datasource.initialization-mode=always
      

      With this, i was able to see message in the db

      [14/06/19 11:32:50] ~ ❯❯❯ curl -w "\n" -X POST 'http://localhost:8080/api/?entry=hello'
      hello
      
      [14/06/19 11:46:27] ~ ❯❯❯ psql sampledb --username=theuser --host=localhost --port=5432 -c "SELECT *  FROM audit_log"
       audit_id | message
      ----------+---------
              1 | hello
      (1 row)
      
      

      and it is working.

      Attachments

        Issue Links

          Activity

            People

              zfeng@redhat.com Zheng Feng
              llowinge@redhat.com Lukas Lowinger
              Lukas Lowinger Lukas Lowinger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: