xiangyanglyz 2016-06-28 00: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-28 01:12
    关注

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

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

报告相同问题?

悬赏问题

  • ¥15 想用@vueuse 把项目动态改成深色主题,localStorge里面的vueuse-color-scheme一开始就给我改成了dark,不知道什么原因(相关搜索:背景颜色)
  • ¥20 OPENVPN连接问题
  • ¥15 flask实现搜索框访问数据库
  • ¥15 mrk3399刷完安卓11后投屏调试只能显示一个设备
  • ¥20 白日门传奇少一个启动区服和启动服务器的快捷键,东西都是全的 , 他们说套一个出来就行了 但我就是弄不好,谁看看,
  • ¥100 如何用js写一个游戏云存档
  • ¥15 ansys fluent计算闪退
  • ¥15 有关wireshark抓包的问题
  • ¥15 需要写计算过程,不要写代码,求解答,数据都在图上
  • ¥15 向数据表用newid方式插入GUID问题