[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2804?page=c...
]
Mikael Carlstedt commented on HHH-2804:
---------------------------------------
Sorry, false alarm; I was using the wrong dialect in the hibernate properties. It all
works fine with Oracle10gDialect.
ID generator of type sequence gives Oracle syntax error
-------------------------------------------------------
Key: HHH-2804
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2804
Project: Hibernate3
Issue Type: Bug
Components: query-sql
Affects Versions: 3.2.5
Environment: Oracle 10g
Reporter: Mikael Carlstedt
Using an ID generator of type 'sequence' in the Hibernate mapping gives an Oracle
syntax error when trying to save an object:
DEBUG - JDBCExceptionReporter.logExceptions(69) | could not get next sequence value
[select nextval ('TEST.requests_seq')]
java.sql.SQLException: ORA-00923: FROM keyword not found where expected
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:579)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1894)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:831)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2496)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2840)
at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:608)
at
oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:536)
at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:75)
at
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:99)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:495)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira