org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.UnsupportedOperationException
### The error may exist in kr/co/techinmotion/mybatis/mappers/dataOutputMapper.xml
### The error may involve kr.co.techinmotion.mybatis.mappers.dataOutputMapper.selectData1-Inline
### The error occurred while setting parameters
### SQL: select * from tbl_id, tbl_feed where tbl_id.id = tbl_feed.upid and tbl_id.token = ?
### Cause: java.lang.UnsupportedOperationException
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
at kr.co.techinmotion.daoImpl.DataDaoImplMybatis.selectData1(DataDaoImplMybatis.java:47)
我不知道为什么会发生这个错误。
这是我在映射器中的 sql。
<select id="selectData1" parameterType="string" resultType="list">
select * from tbl_id, tbl_feed
where tbl_id.id = tbl_feed.upid
and tbl_id.token = #{token}
</select>
和.. 这是 DAO。
public class DataDaoImplMybatis implements IdataDao {
private DataDaoImplMybatis(){}
private static DataDaoImplMybatis dao;
public static DataDaoImplMybatis getInstance(){
if(dao == null){
dao = new DataDaoImplMybatis();
}
return dao;
}
SqlSessionFactory sessionFactory = SqlMapSessionFactory.getSqlSessionFactory();
@Override
public List<DataResult1> selectData1(String token){
SqlSession session = sessionFactory.openSession();
List<DataResult1> list = session.selectList("kr.co.techinmotion.mybatis.mappers.dataOutputMapper.selectData1", token);
session.close();
return list;
}
}
请帮帮我。。T_T