xiangyanglyz 2016-06-28 00:53 采纳率: 63.6%
浏览 3884
已采纳

找不到表名,但是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-28 01:12
    关注

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

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

报告相同问题?

悬赏问题

  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献