org.hibernate.exception.GenericJDBCException

could not fetch initial value for increment generator

Solutions on the web1379

  • via Hibernate JIRA by Erik Bertelsen, 1 year ago
    could not fetch initial value for increment generator
  • via Hibernate JIRA by Erik Bertelsen, 1 year ago
    could not fetch initial value for increment generator
  • via Stack Overflow by Mayank
    , 1 year ago
    could not get next sequence value
  • Stack trace

    • org.hibernate.exception.GenericJDBCException: could not fetch initial value for increment generator 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.id.IncrementGenerator.getNext(IncrementGenerator.java:107) at org.hibernate.id.IncrementGenerator.generate(IncrementGenerator.java:44) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:90) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186) at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175) at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70) at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:534) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:522) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:518) 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) at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301) at $Proxy0.save(Unknown Source) at dk.statsbiblioteket.navision.integration.UpdateItemPriceTransactionDAO.save(UpdateItemPriceTransactionDAO.java:45) at dk.statsbiblioteket.videnstafetten.TidsskriftAar.requestNavisionItemPriceUpdate(TidsskriftAar.java:1188) at dk.statsbiblioteket.videnstafetten.TidsskriftAar.verifyNavisionItemContents(TidsskriftAar.java:1132) at dk.statsbiblioteket.videnstafetten.TidsskriftAar.synchronizeNavisionItem(TidsskriftAar.java:1077) at synchronizeNavisionVare.sync(synchronizeNavisionVare.java:95) at synchronizeNavisionVare.main(synchronizeNavisionVare.java:31) Caused by: java.sql.SQLException: Incorrect syntax near the keyword 'from'. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:418) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:693) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76) at org.hibernate.id.IncrementGenerator.getNext(IncrementGenerator.java:85) ... 22 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    2 times, 1 month ago
    Unknown user
    Once, 5 months ago
    Unknown user
    Once, 10 months ago
    Once, 10 months ago
    24 more bugmates