zoukankan      html  css  js  c++  java
  • java.lang.IllegalArgumentException

    14:54:00,032 INFO [STDOUT] 14:54:00,032 INFO [QueryBuilder] QueryBuilder.getHQL: from SmgpSms
    14:54:00,038 INFO [STDOUT] Hibernate: select smgpsms0_.code as code0_, smgpsms0_.mobile as mobile0_, smgpsms0_.content as content0_
    , smgpsms0_.create_time as create4_0_, smgpsms0_.submit_time as submit5_0_, smgpsms0_.status as status0_, smgpsms0_.times as times0_
    , smgpsms0_.notes as notes0_, smgpsms0_.account as account0_, smgpsms0_.number_code as number10_0_ from smgp_sms smgpsms0_ limit ?
    14:54:00,407 INFO [STDOUT] 14:54:00,407 INFO [QueryBuilder] QueryBuilder.getHQL: from WhiteNumberlist where whitecode=?
    14:54:00,423 INFO [STDOUT] Hibernate: select whitenumbe0_.code as code5_, whitenumbe0_.whitecode as whitecode5_, whitenumbe0_.flowi
    nstanceid as flowinst3_5_, whitenumbe0_.apikey as apikey5_, whitenumbe0_.accessnumber as accessnu5_5_, whitenumbe0_.serialnumber as
    serialnu6_5_, whitenumbe0_.phonenumber as phonenum7_5_, whitenumbe0_.opreator as opreator5_, whitenumbe0_.status as status5_, whiten
    umbe0_.createtime as createtime5_, whitenumbe0_.updatetime as updatetime5_, whitenumbe0_.demo as demo5_, whitenumbe0_.confirmAction
    as confirm13_5_, whitenumbe0_.confirmType as confirm14_5_, whitenumbe0_.confirmMessage as confirm15_5_ from white_numberlist whitenu
    mbe0_ where whitenumbe0_.whitecode=?
    14:54:00,513 ERROR [ContainerBase] Servlet.service() for servlet Spring MVC Dispatcher Servlet threw exception
    java.lang.IllegalArgumentException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:42)
    at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:337)
    at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:200)
    at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3571)
    at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:133)
    at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854)
    at org.hibernate.loader.Loader.doQuery(Loader.java:729)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
    at org.hibernate.loader.Loader.doList(Loader.java:2213)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
    at org.hibernate.loader.Loader.list(Loader.java:2099)
    at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
    at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
    at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
    at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
    at org.trustel.service.hibernate.HibernateService.query(HibernateService.java:313)
    at org.trustel.service.hibernate.HibernateService.query(HibernateService.java:244)
    at com.cdc.smgp.msg.service.impl.NumberListAppServiceImpl.findByWhitecode(NumberListAppServiceImpl.java:44)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    开发项目时数据库添加了2个字段为int,查询是居然报:java.lang.IllegalArgumentException,查了好久才发现是字段类型问题,把字段类型int改为String(配置文件*.hbm.xml也相应修改),就可以了。

  • 相关阅读:
    eclipse
    Java SE Runtime Environment
    开源免费的LittleV GUI
    【转】 ARM Cortex-M 系列 MCU 错误追踪库 CmBacktrace
    【转】博客美化(7)推荐几个优秀的自定义博客
    【转】博客美化(6)为你的博文自动添加目录
    【转】博客美化(5)为博客或系统添加一个强大的评论系统
    【转】博客美化(4)为博客添加一个智能的文章推荐插件
    linux管理进程的链表
    连连看游戏(dfs)【华为上机题目】
  • 原文地址:https://www.cnblogs.com/antyi/p/5590333.html
Copyright © 2011-2022 走看看