• 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也相应修改),就可以了。

  • 相关阅读:
    hdoj 3376,2686 Matrix Again 【最小费用最大流】
    Trustie站点代码托管使用指南
    POJ 2442 Sequence(堆的使用练习)
    猛犸机器学习开发实践
    关于《金字塔原理》的主要内容
    实战案例:如何快速打造1000万+播放量的抖音网红?
    【限时特惠】网易云易盾验证码全线95折!智能无感知、滑动拼图、点选验证-7天免费体验!
    当GDPR来敲门,中国互联网企业该如何应对?
    H5活动产品设计指南基础版
    Box(视图组件)如何在多个页面不同视觉规范下的复用
  • 原文地址:https://www.cnblogs.com/antyi/p/5590333.html
Copyright © 2020-2023  润新知