Menu

#7 定时任务几个sql错误,kevin看看

1.0
open
hjbflzu
sql (1)
2016-03-24
2016-03-24
Chiva.Zhao
No

第一个:Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [null] to required type [int] for property 'age'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [null] to required type [int] for property 'age': PropertyEditor net.paoding.rose.jade.context.JadeInvocationHandler.invoke(JadeInvocationHandler.java:123)
at com.sun.proxy.$Proxy41.queryBumaBill(Unknown Source)
at com.ruibao.dbmanager.ActBillManager.queryBumaBill(ActBillManager.java:111)
at com.ruibao.service.ActBillService.queryBumaBill(ActBillService.java:50)
at com.ruibao.task.transfer.BumaScheduler.transferBuma(BumaScheduler.java:29)

第二个:Invocation of method 'genErvFile' on target class [class com.ruibao.task.transfer.ErvFileScheduler] failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and r.status =1 and r.busidate >= 'Mar 23, 2016' AND r.busidate < 'Mar 23, 2016'' at line 1

Discussion

  • Chiva.Zhao

    Chiva.Zhao - 2016-03-24
    • assigned_to: hjbflzu
     
  • hjbflzu

    hjbflzu - 2016-03-24

    第一个是 null 转int错误的,这种int性,默认值就给个0之类的,不要用 null作为默认值,除了string类型的,java是强类型语言
    第二个我来改下,sql中date类型比较不能直接用java的date,我记得上次我转过

     

Log in to post a comment.

MongoDB Logo MongoDB