Hello,

I have a Camel backend running on a JBoss EAP 7.1 server. I have defined
the datasources I use in the server configuration. I configured it in my
Springboot configuration like this:

@Bean
public DataSource dataSource() {
    JndiDataSourceLookup dataSourceLookup = new JndiDataSourceLookup();
    DataSource dataSource =
dataSourceLookup.getDataSource("java:jboss/datasources/test_db");
    return dataSource;
}


I followed this sample of configuration
<https://wildfly-extras.github.io/wildfly-camel/> (6.133. camel-pgevent) to
use a datasource with pgevent, with this pgevent definition:


from("pgevent:///test_db/events?datasource=#java:jboss/datasources/test_db").routeId("DATABASE_EVENTS").process(ProcessorIdentifier.CONTEXT_MODIFIER);

but I got this error :

*Caused by: java.lang.**IllegalArgumentException: Could not find a suitable
setter for property: datasource as there isn't a setter method with same
type: java.lang.String nor type conversion possible: No type converter
available to convert from type: java.lang.String to the required type:
javax.sql.DataSource with value #java:jboss/datasources/test_**db*

My datasource is correctly defined cause I use it with my service without
any problem.
What do i have to do to get rid of this error?

-- 
Damien NICOLAS

Reply via email to