@红薯 你好,想跟你请教个问题:
1.启动tomcat之后报错如下,网上查了一下,有的说是表里面没有对应的域(Unknown column 'sitebean0_.friend_status' in 'field list')————但错误信息里面好像看不到具体是哪个表缺少域,而且就算是缺少对应的域的话,那么该如何解决呢?
2.如果是其他的原因,那又该如何解决呢?
错误信息:
七月 22, 2013 4:40:57 下午 org.hibernate.cache.StandardQueryCache <init>
信息: starting query cache at region: dlog_home_info
七月 22, 2013 4:40:57 下午 org.hibernate.cache.StandardQueryCache <init>
信息: starting query cache at region: query.newest.sites
七月 22, 2013 4:40:57 下午 org.hibernate.util.JDBCExceptionReporter logExceptions
警告: SQL Error: 1054, SQLState: 42S22
七月 22, 2013 4:40:57 下午 org.hibernate.util.JDBCExceptionReporter logExceptions
严重: Unknown column 'sitebean0_.friend_status' in 'field list'
七月 22, 2013 4:40:57 下午 org.apache.catalina.core.ApplicationContext log
信息: Velocity [error] Method list_newest_sites threw exception for reference $DLOG4J_tool in template /dlog/_sub/_module_side_new_sites.vm at [5,31]
七月 22, 2013 4:40:57 下午 org.apache.catalina.core.ApplicationContext log
信息: Velocity [error] VelocityViewServlet: Exception processing the template: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'list_newest_sites' in class com.liusoft.dlog4j.velocity.DLOG_Home_VelocityTool threw exception org.hibernate.exception.SQLGrammarException: could not execute query @ /dlog/_sub/_module_side_new_sites.vm[5,44]
七月 22, 2013 4:40:57 下午 org.apache.catalina.core.ApplicationContext log
严重: DLOG_VelocityServlet: 127.0.0.1 => ERROR:Unknown Velocity Error,url=http://localhost:8093/(Mon Jul 22 16:40:57 CST 2013)
org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(Unknown Source)
at org.hibernate.exception.JDBCExceptionHelper.convert(Unknown Source)
at org.hibernate.loader.Loader.doList(Unknown Source)
at org.hibernate.loader.Loader.listUsingQueryCache(Unknown Source)
at org.hibernate.loader.Loader.list(Unknown Source)
at org.hibernate.loader.hql.QueryLoader.list(Unknown Source)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(Unknown Source)
at org.hibernate.engine.query.HQLQueryPlan.performList(Unknown Source)
at org.hibernate.impl.SessionImpl.list(Unknown Source)
at org.hibernate.impl.QueryImpl.list(Unknown Source)
at com.liusoft.dlog4j.dao.DAO.executeNamedQueryCacheable(DAO.java:455)
at com.liusoft.dlog4j.dao.SiteDAO.listNewestSites(SiteDAO.java:165)
at com.liusoft.dlog4j.velocity.DLOG_Home_VelocityTool.list_newest_sites(DLOG_Home_VelocityTool.java:196)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:419)
at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:73)
at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:125)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at org.apache.velocity.runtime.directive.Parse.render(Parse.java:224)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at org.apache.velocity.runtime.directive.Parse.render(Parse.java:224)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at org.apache.velocity.Template.merge(Template.java:254)
at org.apache.velocity.tools.view.servlet.VelocityLayoutServlet.mergeTemplate(VelocityLayoutServlet.java:224)
at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doRequest(VelocityViewServlet.java:551)
at com.liusoft.dlog4j.servlet.DLOG_VelocityServlet.doRequest(DLOG_VelocityServlet.java:107)
at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doGet(VelocityViewServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.liusoft.dlog4j.servlet.DLOG_HomeFilter.doFilter(DLOG_HomeFilter.java:121)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.liusoft.dlog4j.servlet.DLOG_HibernateFilter.doFilter(DLOG_HibernateFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:881)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:674)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:541)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:722)
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'sitebean0_.friend_status' in 'field list'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1403)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(Unknown Source)
at org.hibernate.loader.Loader.getResultSet(Unknown Source)
at org.hibernate.loader.Loader.doQuery(Unknown Source)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Unknown Source)
... 67 more
遇到相同问题,解决了没?<divclass="ref">
文档要跟上啊。。。起码安装说明要更新下么。。。。
我也碰到一样的问题了。。。
数据库脚本要用<spanstyle="font-family:Verdana,sans-serif,宋体;font-size:14px;line-height:normal;background-color:#FFFFFF;">dlog4j_e32/doc/Update_sql/mysql_script.sql
<spanstyle="font-size:14px;line-height:normal;background-color:#FFFFFF;">文档说的目录下的脚本再mysql5.6下无法运行的
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。