Hibernate save问题 希望大家帮忙!!

07-03-29 bravgy
net.sf.hibernate.exception.GenericJDBCException: Could not save object

at net.sf.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:90)

at net.sf.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:79)

at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)

at net.sf.hibernate.impl.SessionImpl.convert(SessionImpl.java:4131)

at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:794)

at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:749)

at com.ruralliu.hibernate.BusinessService.testInsert(BusinessService.java:72)

at com.ruralliu.hibernate.BusinessService.main(BusinessService.java:82)

Caused by: java.sql.SQLException: ORA-02289: 序列不存在

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)

at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:742)

at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:212)

at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:795)

at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1030)

at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:835)

at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1123)

at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3284)

at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3328)

at net.sf.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:64)

at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:776)

... 3 more

zuly
2007-03-29 16:41
如果配置正确,这应该是你使用了db不支持的api!hb的save机制没有逻辑的,就是普通的jdbc.commit!

猜你喜欢