Mubasher Usman created DBCP-473:
-----------------------------------

             Summary: datasource bean creation faild due to mismatched 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)

Reply via email to