严重: Servlet.service() for servlet [spring] in context with path [] threw exception
Servlet.service()forservlet[spring]incontextwithpath[]threwexception[Requestprocessin...
Servlet.service() for servlet [spring] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:
### Error querying database. Cause: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'unitId' in 'where clause'
### The error may exist in /com/dayainfo/ssp/navi/sqlMapper/sqlMapper-SNSubject.xml
### The error may involve com.dayainfo.ssp.navi.dao.showSubjectListDao-Inline
### The error occurred while setting parameters
### SQL: select * from sn_subject where unitId=?
### Cause: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'unitId' in 'where clause'
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'unitId' in 'where clause'] with root cause
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'unitId' in 'where clause'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:882)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(Delegating PreparedStatement.java:169)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:56)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:70)
求大神指点错误原因。 展开
### Error querying database. Cause: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'unitId' in 'where clause'
### The error may exist in /com/dayainfo/ssp/navi/sqlMapper/sqlMapper-SNSubject.xml
### The error may involve com.dayainfo.ssp.navi.dao.showSubjectListDao-Inline
### The error occurred while setting parameters
### SQL: select * from sn_subject where unitId=?
### Cause: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'unitId' in 'where clause'
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'unitId' in 'where clause'] with root cause
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'unitId' in 'where clause'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:882)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(Delegating PreparedStatement.java:169)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:56)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:70)
求大神指点错误原因。 展开
3个回答
展开全部
Error querying database. Cause: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'unitId' in 'where clause'看看是不是这儿
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
sql文有错
在 where条件里有未知的列名 unitId
你可以仔细check一下
在 where条件里有未知的列名 unitId
你可以仔细check一下
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
sql写错了,报错都说unitId这个列名错误了。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询