Hello friends -
I'm having the darndest time figuring out what I'm getting this error:
****************************************************** 15:27:41,687 ERROR TableGenerator:104 - could not read a hi valuejava.sql.SQLException: Unknown column 'next_hi' in 'field list' at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2851) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1534) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1625) at com.mysql.jdbc.Connection.execSQL(Connection.java:2297) at com.mysql.jdbc.Connection.execSQL(Connection.java:2226) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1812) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1657) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) at net.sf.hibernate.id.TableGenerator.generate(TableGenerator.java:94) at net.sf.hibernate.id.TableHiLoGenerator.generate(TableHiLoGenerator.java:59) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:774) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:747) at us.fl.ci.tlh.mobile.persistence.WorkorderDao.insertWorkorder(WorkorderDao.java:1688) at us.fl.ci.tlh.struts.actions.MaintenanceWorkOrderAction.handleMaintenanceWorkorder(MaintenanceWorkOrderAction.java:1029) at us.fl.ci.tlh.struts.action.water.SewerRepairAction.save(SewerRepairAction.java:852) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216) at us.fl.ci.tlh.struts.actions.MaintenanceWorkOrderAction.execute(MaintenanceWorkOrderAction.java:202) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at us.fl.ci.tlh.mobile.servlets.filter.PopulateVitalsFilter.doFilter(PopulateVitalsFilter.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) 15:27:41,703 WARN JDBCExceptionReporter:57 - SQL Error: 1054, SQLState: 42S22 15:27:41,718 ERROR JDBCExceptionReporter:58 - Unknown column 'next_hi' in 'field list'net.sf.hibernate.exception.SQLGrammarException: Could not save object at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:59) at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:30) at net.sf.hibernate.impl.SessionImpl.convert(SessionImpl.java:4110) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:792) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:747) at us.fl.ci.tlh.mobile.persistence.WorkorderDao.insertWorkorder(WorkorderDao.java:1688) at us.fl.ci.tlh.struts.actions.MaintenanceWorkOrderAction.handleMaintenanceWorkorder(MaintenanceWorkOrderAction.java:1029) at us.fl.ci.tlh.struts.action.water.SewerRepairAction.save(SewerRepairAction.java:852) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216) at us.fl.ci.tlh.struts.actions.MaintenanceWorkOrderAction.execute(MaintenanceWorkOrderAction.java:202) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at us.fl.ci.tlh.mobile.servlets.filter.PopulateVitalsFilter.doFilter(PopulateVitalsFilter.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) Caused by: java.sql.SQLException: Unknown column 'next_hi' in 'field list' at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2851) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1534) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1625) at com.mysql.jdbc.Connection.execSQL(Connection.java:2297) at com.mysql.jdbc.Connection.execSQL(Connection.java:2226) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1812) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1657) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) at net.sf.hibernate.id.TableGenerator.generate(TableGenerator.java:94) at net.sf.hibernate.id.TableHiLoGenerator.generate(TableHiLoGenerator.java:59) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:774) ... 32 more
*****************************************************
I've checked and double checked, and triple checked, I am not using generator of type hiLo anywhere in my project. Here is a snipet of the .hbm file that is failing:
************************************************** <id name="mobilewoid" column="mobileWoId" type="java.lang.Integer"> <generator class="native"/> </id> **************************************************
Table is in MySql and has an autoincrement integer field defined as the primary key. If I change the generator class to assigned, I get an error message indicating that the value must be assigned before saving, which tells me I'm not looking at a situation where there are multiple files / classpath issues.
Can anyone help?
Thanks.
brian
|