xiangyanglyz 2016-06-27 16:53 采纳率: 63.6%
浏览 3887
已采纳

找不到表名,但是mapper文件里有表名?

错误信息:
严重: Servlet.service() for servlet [default] in context with path [/eigpay-debt-frontweb] threw exception [Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:

Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'eigpay_framework.task_executor' doesn't exist

The error may exist in URL [jar:file:/D:/workspace-eigpay-debt/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/eigpay-debt-frontweb/WEB-INF/lib/eigpay-debt-base-1.0-SNAPSHOT.jar!/mybatis/TaskExecutorMapper.xml]

The error may involve com.eigpay.framework.dao.privilege.dao.TaskExecutorMapper.selectByPrimaryKey-Inline

The error occurred while setting parameters

SQL: select id, task_id, executor, status, assign_time, received_total, confirmed_total from task_executor where id = ?

Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'eigpay_framework.task_executor' doesn't exist

; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'eigpay_framework.task_executor' doesn't exist] with root cause
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'eigpay_framework.task_executor' doesn't exist

mapper.xml文件:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >











id, task_id, executor, status, assign_time, received_total, confirmed_total


select

from
task_executor
where id = #{id,jdbcType=BIGINT}


delete
from
task_executor
where id = #{id,jdbcType=BIGINT}


insert into task_executor (id, task_id, executor,
status, assign_time, received_total,
confirmed_total)
values (#{id,jdbcType=BIGINT}, #{taskId,jdbcType=BIGINT}, #{executor,jdbcType=BIGINT},
#{status,jdbcType=INTEGER}, #{assignTime,jdbcType=TIMESTAMP}, #{receivedTotal,jdbcType=DECIMAL},
#{confirmedTotal,jdbcType=DECIMAL})


insert into task_executor


id,


task_id,


executor,


status,


assign_time,


received_total,


confirmed_total,




#{id,jdbcType=BIGINT},


#{taskId,jdbcType=BIGINT},


#{executor,jdbcType=BIGINT},


#{status,jdbcType=INTEGER},


#{assignTime,jdbcType=TIMESTAMP},


#{receivedTotal,jdbcType=DECIMAL},


#{confirmedTotal,jdbcType=DECIMAL},




update task_executor


task_id = #{taskId,jdbcType=BIGINT},


executor = #{executor,jdbcType=BIGINT},


status = #{status,jdbcType=INTEGER},


assign_time = #{assignTime,jdbcType=TIMESTAMP},


received_total = #{receivedTotal,jdbcType=DECIMAL},


confirmed_total = #{confirmedTotal,jdbcType=DECIMAL},


where id = #{id,jdbcType=BIGINT}


update task_executor
set task_id = #{taskId,jdbcType=BIGINT},
executor = #{executor,jdbcType=BIGINT},
status = #{status,jdbcType=INTEGER},
assign_time = #{assignTime,jdbcType=TIMESTAMP},
received_total = #{receivedTotal,jdbcType=DECIMAL},
confirmed_total = #{confirmedTotal,jdbcType=DECIMAL}
where id = #{id,jdbcType=BIGINT}

展开全部

  • 写回答

2条回答 默认 最新

  • aline200 2016-06-27 17:12
    关注

    测试一下,数据库能不能正常连接

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部