在线等spring和JDBC连接问题!

org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'dat... org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [tarena/cofig/schema.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'nitialSize' of bean class [org.apache.commons.dbcp.BasicDataSource]: Bean property 'nitialSize' 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.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1279)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at tarena.service.test.TestUserDao.testAdd(TestUserDao.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
我已经导入commons-pool.jar包了,本人在线等
展开
 我来答
岁月忐忑如歌
2012-12-05 · TA获得超过484个赞
知道小有建树答主
回答量:112
采纳率:0%
帮助的人:52.6万
展开全部
dataSource bean中的属性nitialSize写错了 应该是initalSize可能
gkf8605
2012-12-05
知道答主
回答量:62
采纳率:0%
帮助的人:19.8万
展开全部
bean中注入有错误,看看'nitialSize' 定义的是否正确,有没有出现空指针的情况
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
简不断
2012-12-05 · TA获得超过105个赞
知道小有建树答主
回答量:163
采纳率:0%
帮助的人:86.3万
展开全部
nitialSize错了,应该是initialSize
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
般若兮若
2012-12-05 · TA获得超过2705个赞
知道小有建树答主
回答量:1246
采纳率:0%
帮助的人:927万
展开全部
nitialSize写法不规范.换个名字.
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式