java eclipse 运行报错求解

不知道哪里出了问题,觉得数据库也没问题呀,看了select 语句没出错,这个表也存在用的mysql,表名叫jds_sensitive_word图片说明图片说明图片说明图片说明

四月 21, 2017 10:03:59 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class com.neu.app.action.StartupListener
org.springframework.jdbc.BadSqlGrammarException:

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

The error may exist in com/neu/app/persistence/SensitiveWordMapper.xml

The error may involve defaultParameterMap

The error occurred while setting parameters

SQL: SELECT jsw.sensitive_word AS sensitiveWord FROM jds_sensitive_word jsw WHERE is_use='0'

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

; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'mysql.jds_sensitive_word' doesn't exist
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:233)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:365)
at com.sun.proxy.$Proxy9.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:195)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:124)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:90)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:40)
at com.sun.proxy.$Proxy21.findAllSensitiveWord(Unknown Source)
at com.neu.app.service.SensitiveWordServiceImpl.findAllSensitiveWord(SensitiveWordServiceImpl.java:49)
at com.neu.app.service.SensitiveWordServiceImpl$$FastClassByCGLIB$$99722b18.invoke()
at net.sf.cglib.proxy

jds_sensitive_word不存在,你看下你的表是否存在,

可能是你添加了框架之类的。然后映射出错,例如表 user 生成的User.xml 对应的 就要select xxxx from User ,手机看不起你发的图,答案我猜的

你连接数据库连错了吧,你是在mysql这个数据库建的表吗

MySQLSyntaxErrorException: Table 'mysql.jds_sensitive_word' doesn't exist