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
................................................................... 展开
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
................................................................... 展开
3个回答
展开全部
SimpleDataSource: Error while loading properties. Cause: java.lang.RuntimeException: SimpleDataSource: Some properties were not set.
问题应该是在这里,看看你的配置文件
问题应该是在这里,看看你的配置文件
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
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
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询