2 yoki zhangz Yoki_zhangz 于 2017.04.21 22:33 提问

java eclipse 运行报错求解

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

5个回答

Yoki_zhangz
Yoki_zhangz   2017.04.21 22:36

四月 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

qq_23126581
qq_23126581   2017.04.22 00:27

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

xxxxxxxxx0009
xxxxxxxxx0009   2017.04.22 02:25

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

bp_fd_2011
bp_fd_2011   2017.04.22 08:34

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

ljheee
ljheee   Rxr 2017.04.22 09:19

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

Csdn user default icon
上传中...
上传图片
插入图片