Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'test.charging_service' doesn't exist
### The error may exist in file [C:\Users\PC\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ITSPLATFORM\WEB-INF\classes\mapper\ChargingServiceinfoMapper.xml]
### The error may involve com.haylion.mapper.ChargingServiceinfoMapper.selectAppointmentByDayReview-Inline
### The error occurred while setting parameters
### SQL: select distinct b.chargerseqno,a.vehicleid,date_format(a.appointstarttime,'%h:%i'),date_format(a.appointendtime,'%h:%i'),     b.chargepower,a.chgenergy from charging_service a,charging_pile b where 1=1 and a.chargerid = b.chargerid       and b.chargerseqno = ?        and a.vehicleid = ?        order by date_format(a.appointstarttime,'%Y-%m-%d') = curdate();
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'test.charging_service' doesn't exist
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'test.charging_service' doesn't exist] with root cause
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'test.charging_service' doesn't exist

解决方案 »

  1.   

    表没有,你看下你的xml里面映射的实体名称对了吗
      

  2.   

    MySQLSyntaxErrorException: Table 'test.charging_service' doesn't exist
    检查ChargingServiceinfoMapper.xml
      

  3.   

    但表是确确实实存在的,把sql语句复制到Navicat都能查到数据的
      

  4.   

    jdbc配置文件里是不是没有指定数据库啊
      

  5.   

    Table 'test.charging_service' doesn't exist   这张表不存在
      

  6.   

    看看javabean映射的对不对啊,好好检查一下吧
      

  7.   

    问题解决了,因为前期是分模块做的,数据库表是自己建的,别人往svn提交代码的时候,提交的是自己的ip对应的数据库,而我没有检查出来,就没有换ip地址,所以就导致了这个问题,其实后台映射啊之类的一点问题都没有。
      

  8.   

    报错就是表不存在,建议好好看看数据库连接,用户名密码,表名字,mapper里面的映射是否对,model里面属性是否存在,等和数据相关的地方。