在用spring和hibernate
Mstars] DEBUG [http-8081-1] UserSecurityAdvice.before(79) | Registering new user 'admin'
ikjiojo
[Mstars] DEBUG [http-8081-1] UserDaoHibernate.saveUser(53) | user's id: null
[Mstars] WARN [http-8081-1]
JDBCExceptionReporter.logExceptions(71) | SQL Error: 2289, SQLState: 42000
[Mstars] ERROR [http-8081-1] JDBCExceptionReporter.logExceptions(72) | ORA-02289: 序列(号)不存在
2007-12-25 10:03:19 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet faces threw exception
java.sql.SQLException: ORA-02289: 序列(号)不存在
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:75)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:91)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:98)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:502)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:494)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:490)
at org.springframework.orm.hibernate3.HibernateTemplate$18.doInHibernate
名位兄弟帮帮忙!为什么没有得到那id?
------解决方案--------------------看一下序列的名称是否对应
------解决方案--------------------贴段代码上来看看吧
------解决方案-------------------- <generator class="sequence">
<param name="sequence"> KEY_USER</param>
</generator>