You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Mubasher Usman (JIRA)" <ji...@apache.org> on 2016/11/10 10:31:58 UTC
[jira] [Updated] (DBCP-473) datasource bean creation faild due to
mismatched return type of setter and getter of connectionInitSqls in
BasicDataSource
[ https://issues.apache.org/jira/browse/DBCP-473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mubasher Usman updated DBCP-473:
--------------------------------
Summary: datasource bean creation faild due to mismatched return type of setter and getter of connectionInitSqls in BasicDataSource (was: datasource bean creation faild due to mismatched setter and getter of connectionInitSqls in BasicDataSource)
> datasource bean creation faild due to mismatched return type of setter and getter of connectionInitSqls in BasicDataSource
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: DBCP-473
> URL: https://issues.apache.org/jira/browse/DBCP-473
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 2.1.1
> Environment: Tomcat
> java 7 update 70
> spring 2.5
> Reporter: Mubasher Usman
>
> While creating bean i faced exception
> "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?"
> Here is my bean configuration
> <bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource"
> destroy-method="close" lazy-init="true">
> <!-- REF: http://commons.apache.org/proper/commons-dbcp/configuration.html -->
> <property name="driverClassName" value="#{jdbc.driverClassName}" />
> <property name="url" value="#{jdbc.url}" />
> <property name="username" value="#{jdbc.username}" />
> <property name="password" value="#{jdbc.password}" />
> <property name="defaultAutoCommit" value="#jdbc.defaultAutoCommit}" />
> <property name="connectionInitSqls">
> <list>
> <value>ALTER SESSION SET * NLS_SORT=XCYECH</value>
> </list>
> </property>
> </bean>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)