java.lang.RuntimeException: SimpleDataSource: Some properties were not set.
<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEsqlMapConfigPUBLIC"-//ibatis.apache.org/...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd" >
<sqlMapConfig>
<properties resource="com/ibatis/sqlMapping.properties"/>
<transactionManager type="JDBC">
<dataSource type="SIMPLE">
<property value="${driver}" name="JDBC.Driver"/>
<property value="${url}" name="JDBC.Connection"/>
<property value="${username}" name="JDBC.Username"/>
<property value="${password}" name="JDBC.Password"/>
</dataSource>
</transactionManager>
<sqlMap resource="com/ibatis/Student.xml"/>
</sqlMapConfig>
新手不知道 怎么错了 求讲解
2014-3-11 21:23:45 com.ibatis.common.logging.jdk14.Jdk14LoggingImpl error
严重: 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
sqlMapping.properties
driver=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@localhost:1521:orcl
username=scott
password=tiger 展开
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd" >
<sqlMapConfig>
<properties resource="com/ibatis/sqlMapping.properties"/>
<transactionManager type="JDBC">
<dataSource type="SIMPLE">
<property value="${driver}" name="JDBC.Driver"/>
<property value="${url}" name="JDBC.Connection"/>
<property value="${username}" name="JDBC.Username"/>
<property value="${password}" name="JDBC.Password"/>
</dataSource>
</transactionManager>
<sqlMap resource="com/ibatis/Student.xml"/>
</sqlMapConfig>
新手不知道 怎么错了 求讲解
2014-3-11 21:23:45 com.ibatis.common.logging.jdk14.Jdk14LoggingImpl error
严重: 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
sqlMapping.properties
driver=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@localhost:1521:orcl
username=scott
password=tiger 展开
3个回答
展开全部
JDBC.ConnectionURL 不是JDBC.Connection
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<properties resource="jdbc.properties" />
<transactionManager type="JDBC">
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="${driver}" />
<property name="JDBC.ConnectionURL" value="${url}" />
<property name="JDBC.Username" value="${username}" />
<property name="JDBC.Password" value="${password}" />
</dataSource>
</transactionManager>
<sqlMap resource="User.xml" />
</sqlMapConfig>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<properties resource="jdbc.properties" />
<transactionManager type="JDBC">
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="${driver}" />
<property name="JDBC.ConnectionURL" value="${url}" />
<property name="JDBC.Username" value="${username}" />
<property name="JDBC.Password" value="${password}" />
</dataSource>
</transactionManager>
<sqlMap resource="User.xml" />
</sqlMapConfig>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询