[
https://issues.apache.org/jira/browse/DBCP-471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
happybuddha updated DBCP-471:
-----------------------------
Description:
Error :
{code}Caused by: org.springframework.beans.NotWritablePropertyException:
Invalid property 'connectionInitSqls' of bean class
[org.apache.commons.dbcp2.BasicDataSource]: Bean property 'connectionInitSqls'
is not writable or has an invalid setter method. Does the parameter type of the
setter match the return type of the getter?
at
org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1042)
at
org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:902)
at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
{code}
Configuration :
{code}
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="${database.driverClassName}" />
<property name="url" value="${database.url}" />
<property name="username" value="${database.username}" />
<property name="password" value="${database.password}" />
<property name="connectionInitSqls">
<list>
<value>BEGIN call initialise_connection(); END;</value>
</list>
</property>
</bean>
{code}
Similar issue for another bean : https://issues.apache.org/jira/browse/DBCP-469
was:
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid
property 'connectionInitSqls' of bean class
[org.apache.commons.dbcp2.BasicDataSource]: Bean property 'connectionInitSqls'
is not writable or has an invalid setter method. Does the parameter type of the
setter match the return type of the getter?
at
org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1042)
at
org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:902)
at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
Configuration :
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="${database.driverClassName}" />
<property name="url" value="${database.url}" />
<property name="username" value="${database.username}" />
<property name="password" value="${database.password}" />
<property name="connectionInitSqls">
<list>
<value>BEGIN call initialise_connection(); END;</value>
</list>
</property>
</bean>
Similar issue for another bean : https://issues.apache.org/jira/browse/DBCP-469
> Cannot use connectionInitSqls property in BasicDataSource
> ---------------------------------------------------------
>
> Key: DBCP-471
> URL: https://issues.apache.org/jira/browse/DBCP-471
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 2.1.1
> Reporter: happybuddha
>
> Error :
> {code}Caused by: org.springframework.beans.NotWritablePropertyException:
> Invalid property 'connectionInitSqls' of bean class
> [org.apache.commons.dbcp2.BasicDataSource]: Bean property
> 'connectionInitSqls' is not writable or has an invalid setter method. Does
> the parameter type of the setter match the return type of the getter?
> at
> org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1042)
> at
> org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:902)
> at
> org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
> {code}
> Configuration :
> {code}
> <bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource"
> destroy-method="close">
> <property name="driverClassName" value="${database.driverClassName}" />
> <property name="url" value="${database.url}" />
> <property name="username" value="${database.username}" />
> <property name="password" value="${database.password}" />
> <property name="connectionInitSqls">
> <list>
> <value>BEGIN call initialise_connection(); END;</value>
> </list>
> </property>
> </bean>
> {code}
> Similar issue for another bean :
> https://issues.apache.org/jira/browse/DBCP-469
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)