astro
2012-04-24 16:06org.springframework.beans.NotWritablePropertyException:求解决
[code="java"]
XML code(applicationContext.xml)
destroy-method="close">
<!-- com.mchange.v2.c3p0.ComboPooledDataSource -->
<!-- 指定连接数据库的驱动 -->
<!-- 指定连接数据库的URL -->
<!-- 指定连接数据库的用户名 -->
<!-- 指定连接数据库的密码 -->
<!-- 指定连接数据库连接池的最大连接数 -->
<!-- 指定连接数据库连接池的最小连接数 -->
<!-- 指定连接数据库连接池的初始化连接数 -->
<!-- 指定连接数据库连接池的连接的最大空闲时间 -->
[/code]
严重: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'username' of bean class [com.mchange.v2.c3p0.ComboPooledDataSource]: Bean property 'username' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
username是连接数据库的登录名 为什么还要getter setter啊 求教 c3p0的包我导了
- 点赞
- 回答
- 收藏
- 复制链接分享
3条回答
为你推荐
- 请教一个JSP href和onclick的问题
- spring
- html5
- java
- javascript
- java-ee
- 2个回答
- Hibernate的关联映射问题
- spring
- hibernate
- 0个回答
- struts2 srping ibatis 搭建的环境编译错误
- spring
- 0个回答
- Hibernate+spring
- hibernate
- 0个回答
- spring packagesToScan问题
- spring
- 0个回答