zoukankan      html  css  js  c++  java
  • Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'XXX' in 'field list' 解决方法

    今天在一个表中加了几个字段后再查询数据后出现以下问题:

    ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'rt_t_process' in 'field list'
    ### The error may exist in io/renren/modules/generator/dao/KdTaskDao.java (best guess)
    ### The error may involve defaultParameterMap
    ### The error occurred while setting parameters
    ### SQL: SELECT id,task_type_id,scenario_id,name,start_time,stop_time,detailed,is_del,priority,state,father_id,rout_id,area_id,target_id,user_id,project_id,command_code_id,patrol_num,damage_ratio,guaranteed_car_id,attack_point,rt_results,rt_process,rt_order,rt_problem,car_color,xd_id,rt_t_process,rt_why_error,rt_t_why_error FROM kd_task LIMIT ?,?
    ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'rt_t_process' in 'field list'
    ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'rt_t_process' in 'field list'

    org.springframework.jdbc.BadSqlGrammarException:
    ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'rt_t_process' in 'field list'
    ### The error may exist in io/renren/modules/generator/dao/KdTaskDao.java (best guess)
    ### The error may involve defaultParameterMap
    ### The error occurred while setting parameters
    ### SQL: SELECT id,task_type_id,scenario_id,name,start_time,stop_time,detailed,is_del,

    原因:

    mysql表中加的字段设置为了text   ,上网找了资料说可以是传递过来是空的,字段就找不了。

    解决方法:

    把text 更改为varchar  ,问题就不出现了

    r

  • 相关阅读:
    CentOS7 下更改源
    /usr/bin/perl:bad interpreter:No such file or directory 的解决办法
    Centos7 安装wget命令
    Cannot find a valid baseurl for repo: base/7/x86_6 解决方法
    python 启动新进程执行脚本
    MongoDB数据类型
    pymongo.errors.OperationFailure: Authentication failed.
    python连接MongoDB(有密码有认证)
    Mongodb 创建管理员帐号与普通帐号
    python连接MongoDB(无密码无认证)
  • 原文地址:https://www.cnblogs.com/dayspring/p/13941769.html
Copyright © 2011-2022 走看看