ibatis 初始化数据库错误

严重:SimpleDataSource:Errorwhileloadingproperties.Cause:java.lang.RuntimeException:Simp... 严重: SimpleDataSource: Error while loading properties. Cause: java.lang.RuntimeException: SimpleDataSource: Some properties were not set.
java.lang.RuntimeException: SimpleDataSource: Some properties were not set.
at com.ibatis.common.jdbc.SimpleDataSource.initialize(SimpleDataSource.java:131)
at com.ibatis.common.jdbc.SimpleDataSource.<init>(SimpleDataSource.java:116)
at com.ibatis.sqlmap.engine.datasource.SimpleDataSourceFactory.initialize(SimpleDataSourceFactory.java:31)
at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$9.process(SqlMapConfigParser.java:220)
at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)
at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:105)
at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102)
at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102)
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72)
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:51)
at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:46)
at com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:63)
at com.test.IDAO.Impl.ICustomerDAOImpl.<clinit>(ICustomerDAOImpl.java:18)
java.lang.ExceptionInInitializerError
Caused by: java.lang.RuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/transactionManager/dataSource/end()'. Cause: com.ibatis.sqlmap.client.SqlMapException: Error initializing DataSource. Could not instantiate DataSourceFactory. Cause: java.lang.RuntimeException: SimpleDataSource: Error while loading properties. Cause: java.lang.RuntimeException: SimpleDataSource: Some properties were not set.
at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:49)
at com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:63)
at com.test.IDAO.Impl.ICustomerDAOImpl.<clinit>(ICustomerDAOImpl.java:18)
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/transactionManager/dataSource/end()'. Cause: com.ibatis.sqlmap.client.SqlMapException: Error initializing DataSource. Could not instantiate DataSourceFactory. Cause: java.lang.RuntimeException: SimpleDataSource: Error while loading properties. Cause: java.lang.RuntimeException: SimpleDataSource: Some properties were not set.
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)
at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:46)
... 2 more
...................................................................
展开
 我来答
百生奇谈3035
推荐于2016-07-26 · TA获得超过5.3万个赞
知道大有可为答主
回答量:3.1万
采纳率:0%
帮助的人:4077万
展开全部
SimpleDataSource: Error while loading properties. Cause: java.lang.RuntimeException: SimpleDataSource: Some properties were not set.

问题应该是在这里,看看你的配置文件
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
jg...7@163.com
2012-02-23 · TA获得超过287个赞
知道小有建树答主
回答量:149
采纳率:0%
帮助的人:192万
展开全部
hi我,我给你看看。应该数据源设置的 问题,貌似"SimpleDataSource"这个属性不能被注入。。
追问
刚下班啊,太晚了
配置文件为SqlMaoConfig.xml

SqlMap.properties内容为:
driver=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@192.168.0.6:1521:qsjh
username=test
password=test

什么问题啊,如果白天在线还请您多指教!
QQ:250313588
本回答被网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
iajnmdu32843
2012-02-23
知道答主
回答量:3
采纳率:0%
帮助的人:4901
展开全部
一手拿的是
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

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

类别

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

说明

0/200

提交
取消

辅 助

模 式