Joined: Mon Mar 15, 2010 1:03 pm Posts: 2
|
Hi I am a newbie Hibernate user and I am trying to follow the Hibernate tutorial "The first Hibernate Application". However, instead of Maven I am using ANT and instead of HSQLDB I am using Oracle. My code is identical to the tutorial (except for oracle-specific configurations in hibernate.cfg.xml).
Help on this would be greatly appreciated. Thanks in advance!
I am getting the following error:
[java] Hibernate: select BOE_DEV.hibernate_sequence.nextval from dual [java] Exception in thread "main" org.hibernate.exception.SQLGrammarException: could not get next sequence value [java] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90) [java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) [java] at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:119) [java] at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:122) [java] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210) [java] at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56) [java] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195) [java] at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50) [java] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93) [java] at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:563) [java] at org.hibernate.impl.SessionImpl.save(SessionImpl.java:551) [java] at org.hibernate.impl.SessionImpl.save(SessionImpl.java:547) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:592) [java] at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342) [java] at $Proxy0.save(Unknown Source) [java] at org.hibernate.tutorial.EventManager.createAndStoreEvent(Unknown Source) [java] at org.hibernate.tutorial.EventManager.main(Unknown Source) [java] Caused by: java.sql.SQLException: ORA-02289: sequence does not exist [java] at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) [java] at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) [java] at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) [java] at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745) [java] at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216) [java] at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:810) [java] at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039) [java] at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850) [java] at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134) [java] at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339) [java] at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384) [java] at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:98) [java] ... 17 more
|
|