java.sql.SQLException: Unknown column 'user0_.id' in 'field list'
各位大侠,请帮帮忙哈!我在运行程序时出现以下错误:
org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:613)
org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:377)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:840)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:836)
com.bookstore.dao.impl.UserDAOImpl.findByUserName(UserDAOImpl.java:43)
。。。。。。。。。。。
[org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/bookstore].[default]]-[ERROR] Servlet.service() for servlet default threw exception
java.sql.SQLException: Unknown column 'user0_.id' in 'field list'
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2847)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2376)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2297)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1860)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1705)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
at org.hibernate.loader.Loader.doQuery(Loader.java:674)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
。。。。。。。。。。。
这个问题该怎么解决了,望各位大侠帮帮忙哈,先在此谢了哈!