Hello All,
I am using Camel 2.6.0 and have my routes set up using the Spring DSL in a
camel-context.xml file. I am looking to connect to a database using
Hibernate with a pretty standard configuration:
<bean id="dataSourceSQL"
class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClass">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="jdbcUrl">
jdbc:mysql://xxx.xxx.xxx.xxx:3306/schema_name
</property>
... (more properties below, omitted for brevity)
</bean>
The bean above is in a descriptor file called 'dao.xml' and imported as
such:
<import resource="dao.xml"/>
When I start my application, I get the following error:
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type
[org.apache.camel.core.xml.CamelPropertyPlaceholderDefinition] to required
type [java.util.Properties] for property 'properties': PropertyEditor
[org.springframework.beans.propertyeditors.PropertiesEditor] returned
inappropriate value
at
org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:227)
at
org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:447)
However, if I move this bean into camel-context.xml, everything works fine.
Does anyone have any ideas on what's going on here?
Thanks,
Yogesh
--
View this message in context:
http://camel.465427.n5.nabble.com/Exception-when-configuring-data-source-in-imported-file-tp4643831p4643831.html
Sent from the Camel - Users mailing list archive at Nabble.com.