From: xzy12345 <xzy...@12...> - 2009-05-03 08:50:30
|
Hi,thanks for your last two emails.I configured success with one controller,two backends.When I just use junit to test,It's ok.But once I configured with hibernate and spring,It has errors. my configuration is : <bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="org.continuent.sequoia.driver.Driver"> </property> <property name="url" value="jdbc:sequoia://localhost:25322/myDB"></property> <property name="username" value="user"></property> <property name="password" value="user"></property> </bean> The relevant trace is: 2009-05-02 23:08:51,343 INFO (com.opensymphony.xwork2.validator.ActionValidatorManagerFactory:29) - Detected AnnotationActionValidatorManager, initializing it... 2009-05-02 23:13:11,843 WARN (org.hibernate.util.JDBCExceptionReporter:77) - SQL Error: 0, SQLState: null 2009-05-02 23:13:11,843 ERROR (org.hibernate.util.JDBCExceptionReporter:78) - Batch failed for request 0: update coas.t_counsellor_sys set ADMIN_ID=?, FLAG_ID=?, COUNSELLOR_ID=?, NAME=?, GENDER=?, DORM=?, DORM_TEL=?, CELLPHONE=?, EMAIL=?, LAST_LOGIN_TIME=?, PERSONALINDEX=?, COUNSELLOR_USERNAME=?, COUNSELLOR_PASSWORD=?, LAST_LOGIN_IP=? where COUNSELLOR_SYS_ID=? (org.continuent.sequoia.common.exceptions.driver.DriverSQLException: Message of cause: Unknown table 'coas.t_counsellor_sys' in this UPDATE statement: 'update coas.t_counsellor_sys set ADMIN_ID=?, FLAG_ID=?, COUNSELLOR_ID=?, NAME=?, GENDER=?, DORM=?, DORM_TEL=?, CELLPHONE=?, EMAIL=?, LAST_LOGIN_TIME=?, PERSONALINDEX=?, COUNSELLOR_USERNAME=?, COUNSELLOR_PASSWORD=?, LAST_LOGIN_IP=? where COUNSELLOR_SYS_ID=?') 2009-05-02 23:13:11,859 ERROR (org.hibernate.event.def.AbstractFlushingEventListener:301) - Could not synchronize database state with session org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) at org.springframework.orm.hibernate3.HibernateAccessor.flushIfNecessary(HibernateAccessor.java:390) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:375) at org.springframework.orm.hibernate3.HibernateTemplate.merge(HibernateTemplate.java:775) at org.fantasyworks.xidian.coas.dao.hibernate.HibernateBaseDAO.update(HibernateBaseDAO.java:95) at org.fantasyworks.xidian.coas.dao.hibernate.CounsellorDAO.updateCounsellor(CounsellorDAO.java:91) at org.fantasyworks.xidian.coas.services.impl.CounsellorService.updateCounsellorInfo(CounsellorService.java:113) ..... Caused by: java.sql.BatchUpdateException: Batch failed for request 0: update coas.t_counsellor_sys set ADMIN_ID=?, FLAG_ID=?, COUNSELLOR_ID=?, NAME=?, GENDER=?, DORM=?, DORM_TEL=?, CELLPHONE=?, EMAIL=?, LAST_LOGIN_TIME=?, PERSONALINDEX=?, COUNSELLOR_USERNAME=?, COUNSELLOR_PASSWORD=?, LAST_LOGIN_IP=? where COUNSELLOR_SYS_ID=? (org.continuent.sequoia.common.exceptions.driver.DriverSQLException: Message of cause: Unknown table 'coas.t_counsellor_sys' in this UPDATE statement: 'update coas.t_counsellor_sys set ADMIN_ID=?, FLAG_ID=?, COUNSELLOR_ID=?, NAME=?, GENDER=?, DORM=?, DORM_TEL=?, CELLPHONE=?, EMAIL=?, LAST_LOGIN_TIME=?, PERSONALINDEX=?, COUNSELLOR_USERNAME=?, COUNSELLOR_PASSWORD=?, LAST_LOGIN_IP=? where COUNSELLOR_SYS_ID=?') at org.continuent.sequoia.driver.PreparedStatement.executeBatch(PreparedStatement.java:1027) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246) ... 132 more 2009-05-02 23:13:11,984 INFO (org.springframework.beans.factory.xml.XmlBeanDefinitionReader:309) - Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml] 2009-05-02 23:13:12,046 INFO (org.springframework.jdbc.support.SQLErrorCodesFactory:128) - SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase] 2009-5-2 23:13:12 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet default threw exception java.sql.BatchUpdateException: Batch failed for request 0: update coas.t_counsellor_sys set ADMIN_ID=?, FLAG_ID=?, COUNSELLOR_ID=?, NAME=?, GENDER=?, DORM=?, DORM_TEL=?, CELLPHONE=?, EMAIL=?, LAST_LOGIN_TIME=?, PERSONALINDEX=?, COUNSELLOR_USERNAME=?, COUNSELLOR_PASSWORD=?, LAST_LOGIN_IP=? where COUNSELLOR_SYS_ID=? (org.continuent.sequoia.common.exceptions.driver.DriverSQLException: Message of cause: Unknown table 'coas.t_counsellor_sys' in this UPDATE statement: 'update coas.t_counsellor_sys set ADMIN_ID=?, FLAG_ID=?, COUNSELLOR_ID=?, NAME=?, GENDER=?, DORM=?, DORM_TEL=?, CELLPHONE=?, EMAIL=?, LAST_LOGIN_TIME=?, PERSONALINDEX=?, COUNSELLOR_USERNAME=?, COUNSELLOR_PASSWORD=?, LAST_LOGIN_IP=? where COUNSELLOR_SYS_ID=?') at org.continuent.sequoia.driver.PreparedStatement.executeBatch(PreparedStatement.java:1027) at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) at org.springframework.orm.hibernate3.HibernateAccessor.flushIfNecessary(HibernateAccessor.java:390) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:375) at org.springframework.orm.hibernate3.HibernateTemplate.merge(HibernateTemplate.java:775) at org.fantasyworks.xidian.coas.dao.hibernate.HibernateBaseDAO.update(HibernateBaseDAO.java:95) at org.fantasyworks.xidian.coas.dao.hibernate.CounsellorDAO.updateCounsellor(CounsellorDAO.java:91) at org.fantasyworks.xidian.coas.services.impl.CounsellorService.updateCounsellorInfo(CounsellorService.java:113) at org.fantasyworks.xidian.coas.web.action.sysLogin.execute(sysLogin.java:86) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) ..... Thanks for any help |
From: Emmanuel C. <ma...@fr...> - 2009-05-03 13:07:57
|
Hi, As the error says: > (org.continuent.sequoia.common.exceptions.driver.DriverSQLException: > Message of cause: Unknown table 'coas.t_counsellor_sys' in this UPDATE > statement: 'update coas.t_counsellor_sys set ADMIN_ID=?, FLAG_ID=?, > COUNSELLOR_ID=?, NAME=?, GENDER=?, DORM=?, DORM_TEL=?, CELLPHONE=?, > EMAIL=?, LAST_LOGIN_TIME=?, PERSONALINDEX=?, COUNSELLOR_USERNAME=?, > COUNSELLOR_PASSWORD=?, LAST_LOGIN_IP=? where COUNSELLOR_SYS_ID=?') It looks like the table coas.t_counsellor_sys was not found. Do you have tables in different schemas or is coas your database name? If the table really exists, you might have to look into the options to fetch the database schema from your database backend. Keep us posted with your progress, Emmanuel -- Emmanuel Cecchet FTO @ Frog Thinker Open Source Development & Consulting -- Web: http://www.frogthinker.org email: ma...@fr... Skype: emmanuel_cecchet |