You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Adam Ostrožlík (Jira)" <ji...@apache.org> on 2020/10/02 15:23:00 UTC

[jira] [Updated] (CAMEL-15622) Bean name evaluated as string

     [ https://issues.apache.org/jira/browse/CAMEL-15622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam Ostrožlík updated CAMEL-15622:
-----------------------------------
    Description: 
Hi,

I have this stack:
 * camel spring boot starter
 * camel-sql component
 * camel endpoint DSL

I have this code:
{code:java}
.to(sql("classpath:sql/zentiva.sql").dataSource("zentivaDataSource"))
{code}
If I use instance of DataSource objekt and set it in .datasource(dataSourceBean()) there is actually a problem that camel is looking in springbootcamelcontext for the name of the result *dataSourceBean.toString()* which might be like HikariDataSource (null). Lookup for wrong bean name happens in
{code:java}
org.apache.camel.support.CamelContextHelper#mandatoryLookupAndConvert
{code}
Route with bean instance is not working properly. As a workaround, we have to use name of the bean.

  was:
Hi,

I have this stack:
 * camel spring boot starter
 * camel-sql component
 * camel endpoint DSL

I have this code:
{code:java}
.to(sql("classpath:sql/zentiva.sql").dataSource("zentivaDataSource"))
{code}
If I use instance of DataSource objekt and set it in .datasource(dataSourceBean()) there is actually a problem that camel is looking in springbootcamelcontext for the name of the result *dataSourceBean.toString()* which might be like HikariDataSource (null):
{code:java}
org.apache.camel.support.CamelContextHelper#mandatoryLookupAndConvert
{code}
Route with bean instance is not working properly. As a workaround, we have to use name of the bean.


> Bean name evaluated as string
> -----------------------------
>
>                 Key: CAMEL-15622
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15622
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-sql
>    Affects Versions: 3.5.0
>            Reporter: Adam Ostrožlík
>            Priority: Major
>
> Hi,
> I have this stack:
>  * camel spring boot starter
>  * camel-sql component
>  * camel endpoint DSL
> I have this code:
> {code:java}
> .to(sql("classpath:sql/zentiva.sql").dataSource("zentivaDataSource"))
> {code}
> If I use instance of DataSource objekt and set it in .datasource(dataSourceBean()) there is actually a problem that camel is looking in springbootcamelcontext for the name of the result *dataSourceBean.toString()* which might be like HikariDataSource (null). Lookup for wrong bean name happens in
> {code:java}
> org.apache.camel.support.CamelContextHelper#mandatoryLookupAndConvert
> {code}
> Route with bean instance is not working properly. As a workaround, we have to use name of the bean.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)