这是我Mapper.XML里的写查询SQL
<select id="findGroup" resultMap="GroupResult" flushCache="false" useCache="true">
<![CDATA[
select * from CS_GROUP
]]>
</select>在dao中写的
public Group findGroup()
{
return (Group)this.getSqlSessionTemplate().selectList ( "com.wonders.common.security.model.LoginUserInfo.findGroup");
}我测试时候写的
@Test
public void findGroup()
{
System.out.println("+++++findGroup+++++");
Group entity=new Group();
entity=dao.findGroup();
System.out.println(entity.getDESCRIPTION());
}
当我JUnit的时候
<Unable to translate SQLException with Error code '17026', will now try the fallback translator><After test method: context [[TestContext@56a499 testClass = LoginUserInfoDaoTest, locations = array<String>['classpath*:spring/*.xml'], testInstance = com.wonders.common.security.dao.LoginUserInfoDaoTest@506411, testMethod = findGroup@LoginUserInfoDaoTest, testException = org.springframework.jdbc.UncategorizedSQLException: SqlSession operation; uncategorized SQLException for SQL []; SQL state [null]; error code [17026]; 数字溢出; nested exception is java.sql.SQLException: 数字溢出]], class dirties context [false], class mode [null], method dirties context [false].><After test class: context [[TestContext@56a499 testClass = LoginUserInfoDaoTest, locations = array<String>['classpath*:spring/*.xml'], testInstance = [null], testMethod = [null], testException = [null]]], dirtiesContext [false].>有高手给我解答一下吗
<select id="findGroup" resultMap="GroupResult" flushCache="false" useCache="true">
<![CDATA[
select * from CS_GROUP
]]>
</select>在dao中写的
public Group findGroup()
{
return (Group)this.getSqlSessionTemplate().selectList ( "com.wonders.common.security.model.LoginUserInfo.findGroup");
}我测试时候写的
@Test
public void findGroup()
{
System.out.println("+++++findGroup+++++");
Group entity=new Group();
entity=dao.findGroup();
System.out.println(entity.getDESCRIPTION());
}
当我JUnit的时候
<Unable to translate SQLException with Error code '17026', will now try the fallback translator><After test method: context [[TestContext@56a499 testClass = LoginUserInfoDaoTest, locations = array<String>['classpath*:spring/*.xml'], testInstance = com.wonders.common.security.dao.LoginUserInfoDaoTest@506411, testMethod = findGroup@LoginUserInfoDaoTest, testException = org.springframework.jdbc.UncategorizedSQLException: SqlSession operation; uncategorized SQLException for SQL []; SQL state [null]; error code [17026]; 数字溢出; nested exception is java.sql.SQLException: 数字溢出]], class dirties context [false], class mode [null], method dirties context [false].><After test class: context [[TestContext@56a499 testClass = LoginUserInfoDaoTest, locations = array<String>['classpath*:spring/*.xml'], testInstance = [null], testMethod = [null], testException = [null]]], dirtiesContext [false].>有高手给我解答一下吗
解决方案 »
- 百分求助,在线等,关于JasperReport中String类型输出总是为null
- 数据库视图的使用问题
- 如何才能学好GIS的开发?
- webService客户端是中文传到服务器端变成乱码了,为什么?
- 用struts怎么做打印
- 关于Hibernate多张表查询的问题~
- 各位好!有没有J2EE的中文帮助???
- ## Eclipse 结合 Hibernate 的错误 ##
- 新手!写了一个小的发邮件程序,可是有异常,不明白!请大家帮帮忙!!谢谢!
- 求教EJB客户端错误:javax.naming.NoInitialContextException?
- 自定义的ClassLoader动态外部jar文件,但加载不到jar里的配置文件
- 哪里可以下一个开源的技术论坛源码呢。。。
字段太小?
把你映射的那个类的相应的该字段对应的属性的类型改成 BigDecimal再试。
private java.lang.String DYNAACCESSCLASS;
private java.lang.String DYANPARAMS;
private java.lang.Integer DYNA;
private java.lang.Integer OPERATE_TIME;
private java.lang.String OPERATOR;
private java.lang.Integer REMOVED;
private java.lang.String CODE;
private java.lang.String NAME;
private java.lang.String DESCRIPTION;
意思是把java.lang.Integer 换成 BigDecimal