[
https://issues.apache.org/jira/browse/CAMEL-14299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17002465#comment-17002465
]
Jan Bednar edited comment on CAMEL-14299 at 12/23/19 8:52 PM:
--------------------------------------------------------------
[~davsclaus] I also dont see any direct introspection in code, but it is
happening. After increasing logging level with property
*bean-introspection-logging-level: info* then right before the exception is
logged.
{code:java}
Invoked: 203 times (overall) [Method: setProperty, Target: HikariDataSource
(HikariPool-1), Arguments: [dataSource, HikariDataSource (HikariPool-1)]]
{code}
To see the exception you need to comment out the timer route in the reproducer
code. Full log with logged introspection is here [^CAMEL-14299.log]
[~Gurpal2000] Another workaround you can use in the meantime is to warmup sql
component. Call
{code:java}
getContext().getComponent("sql");
{code}
on the beginning of configure method in RouteBuilder
was (Author: bedla):
I also dont see any direct introspection in code, but it is happening. After
increasing logging level with property *bean-introspection-logging-level: info*
then right before the exception is logged.
{code:java}
Invoked: 203 times (overall) [Method: setProperty, Target: HikariDataSource
(HikariPool-1), Arguments: [dataSource, HikariDataSource (HikariPool-1)]]
{code}
To see the exception you need to comment out the timer route in the reproducer
code. Full log with logged introspection is here [^CAMEL-14299.log]
> camel-sql - Dynamic producer (toD) problem
> ------------------------------------------
>
> Key: CAMEL-14299
> URL: https://issues.apache.org/jira/browse/CAMEL-14299
> Project: Camel
> Issue Type: Bug
> Components: camel-sql
> Affects Versions: 3.0.0
> Reporter: Gurpal2000
> Priority: Minor
> Fix For: 3.1.0
>
> Attachments: CAMEL-14299.log, log.txt
>
>
> Spring Boot: 2.2.1
> Camel: 3.0.0
> *Works* using "to()"
>
> {code:java}
> from("file://d:/tmp/?fileName=test&noop=true")
> .setHeader("val1", constant(1))
> .setHeader("val2", constant("yo"))
> .to("sql:insert into gbtemp (col1, col2) values (:#val1,
> :#val2)?dataSource=#dataSource");
> {code}
> Does *not work* using ".toD()"
> {code:java}
> from("file://d:/tmp/?fileName=test&noop=true")
> .setHeader("val1", constant(1))
> .setHeader("val2", constant("yo"))
> .setHeader("insertSql", constant("insert into gbtemp (col1, col2) values
> (:#val1, :#val2)"))
> .toD("sql:${header.insertSql}?dataSource=#dataSource");
> {code}
> This used to work fine under Camel 2.x
> Example error lines:
> {code:java}
> Caused by: org.apache.camel.RuntimeCamelException: Cannot auto create
> component: sql
> Caused by: org.apache.camel.PropertyBindingException: Error binding
> properties on bean: org.apache.camel.component.sql.SqlComponent@a72b3b2
> org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint:
> sql://insert...
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)