javax.persistence.PersistenceException

org.hibernate.exception.SQLGrammarException: could not get next sequence value

Samebug tips1

Try downgrading PostgresSQL server to 9.5 or update your PostgresSQL driver to 9.4-1211 with the following command: <postgresql.version>9.4.1211</postgresql.version>

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web1418

  • via hibernate.org by Unknown author, 1 year ago
    org.hibernate.exception.SQLGrammarException: could not get next sequence value
  • via openxava by tokugawa69
    , 11 months ago
    org.hibernate.exception.SQLGrammarException: could not get next sequence value
  • org.hibernate.exception.SQLGrammarException: could not get next sequence value
  • Stack trace

    • javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not get next sequence value at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614) at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:226) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Unknown Source) Caused by: org.hibernate.exception.SQLGrammarException: could not get next sequence value at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:119) ... 5 more Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "call" at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1608) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:98) ... 8 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, 5 months ago
    Unknown user
    Once, 1 year ago
    Once, 3 weeks ago
    26 times, 1 month ago
    7 times, 1 month ago
    89 more bugmates