weblogic.application.ModuleException: :org.springframework.beans.NotWritablePropertyException:Invalid property 'jndiName' of bean class [org.apache.commons.dbcp.BasicDataSource]: Bean property 'jndiName' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
错误原因:
jndiName的class改为org.springframework.jndi.JndiObjectFactoryBean
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName"> <value>kdms</value> </property> </bean> </beans>