bread.iknow 2014. 9. 22. 17:02

 

에러

 

Logging initialized using 'class org.apache.ibatis.logging.log4j.Log4jImpl' adapter.
PooledDataSource forcefully closed/removed all connections.
PooledDataSource forcefully closed/removed all connections.
PooledDataSource forcefully closed/removed all connections.
PooledDataSource forcefully closed/removed all connections.


Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:
### Error updating database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for UserMapper04.addUser01
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for UserMapper04.addUser01
 at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
 at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:150)
 at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:137)
 at ibatis.services.user.test.MyBatisTestApp04.main(MyBatisTestApp04.java:36)
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for UserMapper04.addUser01
 at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:768)
 at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:603)
 at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:596)
 at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:147)
 ... 2 more

 

 

 

 

해결방법

 

mybatis-config.xml 파일에

file include 할 것 (mapper)

 

<mapper resource="sql/UserMapper04.xml"/>