zoukankan      html  css  js  c++  java
  • Caused by: java.sql.SQLException: 数字溢出

    首先强调一点是:我的项目架构为:struts+hibenate+spring

    :13:08,804 ERROR JDBCExceptionReporter:101 - 数字溢出
    org.hibernate.exception.GenericJDBCException: could not execute query
     at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
     at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
     at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
     at org.hibernate.loader.Loader.doList(Loader.java:2231)
     at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
     at org.hibernate.loader.Loader.list(Loader.java:2120)
     at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
     at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
     at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
     at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
     at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
     at cn.bytd.service.IssueServiceImpl.transactionCharge(IssueServiceImpl.java:8133)
     at cn.bytd.service.timer.ChargeTask.run(ChargeTask.java:51)
     at java.util.TimerThread.mainLoop(Unknown Source)
     at java.util.TimerThread.run(Unknown Source)

    最近项目中遇到了数字溢出的问题。错误信息在日志中提示如上。

    经过分析导致溢出的原因是数据库中的字段类型为:integer 插入的数据超过了integer的范围。导出在实体映射的工程中导致以上错误。所发生的所错记录了下来希望对发生类似错误的人给一点帮助。谢谢。

  • 相关阅读:
    javascript 高级程序设计 二
    javascript 高级程序设计 一
    js 立即执行函数
    thinkphp验证器
    thinkphp5 行为(钩子)扩展
    thinkphp5控制器
    修改tp5的默认配置文件的位置
    thinkphp5 model 模型与Db
    API接口设计,rest,soap
    tp5的路由
  • 原文地址:https://www.cnblogs.com/northeastTycoon/p/2789461.html
Copyright © 2011-2022 走看看