org.hibernate.exception.SQLGrammarException: could not execute statement

Hibernate JIRA | Martin Šimka | 2 years ago
  1. 0

    org.hibernate.test.idgen.biginteger.sequence.BigIntegerSequenceGeneratorTest.testBasics dialect: org.hibernate.dialect.SQLServer2012Dialect Stacktrace: {noformat} org.hibernate.exception.SQLGrammarException: could not execute statement at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:123) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:189) at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:58) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3079) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3521) at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:88) at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:387) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:303) at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:349) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1159) at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404) at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175) at org.hibernate.test.idgen.biginteger.sequence.BigIntegerSequenceGeneratorTest.testBasics(BigIntegerSequenceGeneratorTest.java:50) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:63) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Arithmetic overflow error converting numeric to data type numeric. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:314) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:186) ... 26 more {noformat}

    Hibernate JIRA | 2 years ago | Martin Šimka
    org.hibernate.exception.SQLGrammarException: could not execute statement
  2. 0

    org.hibernate.test.idgen.biginteger.sequence.BigIntegerSequenceGeneratorTest.testBasics dialect: org.hibernate.dialect.SQLServer2012Dialect Stacktrace: {noformat} org.hibernate.exception.SQLGrammarException: could not execute statement at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:123) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:189) at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:58) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3079) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3521) at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:88) at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:387) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:303) at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:349) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1159) at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404) at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175) at org.hibernate.test.idgen.biginteger.sequence.BigIntegerSequenceGeneratorTest.testBasics(BigIntegerSequenceGeneratorTest.java:50) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:63) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Arithmetic overflow error converting numeric to data type numeric. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:314) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:186) ... 26 more {noformat}

    Hibernate JIRA | 2 years ago | Martin Šimka
    org.hibernate.exception.SQLGrammarException: could not execute statement
  3. 0

    org.hibernate.exception.SQLGrammarException: could not execute statement

    Stack Overflow | 9 months ago | Rajan
    org.hibernate.exception.SQLGrammarException: could not execute statement
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    support for other db types in nextRow method

    GitHub | 4 years ago | androtan
    java.io.IOException: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'my_jdbc_river'.
  6. 0

    TestJPQLBasic#testBulkDelete fail

    GitHub | 4 years ago | ilgrosso
    com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'PObject'.

  1. abrazeneb 2 times, last 4 months ago
19 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. com.microsoft.sqlserver.jdbc.SQLServerException

    Arithmetic overflow error converting numeric to data type numeric.

    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError()
  2. com.microsoft.sqlserver
    SQLServerPreparedStatement.executeUpdate
    1. com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
    2. com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515)
    3. com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404)
    4. com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350)
    5. com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
    6. com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
    7. com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
    8. com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
    9. com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:314)
    9 frames
  3. Hibernate
    AbstractTransactionImpl.commit
    1. org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:186)
    2. org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:58)
    3. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3079)
    4. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3521)
    5. org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:88)
    6. org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395)
    7. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:387)
    8. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:303)
    9. org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:349)
    10. org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)
    11. org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1159)
    12. org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404)
    13. org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
    14. org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175)
    14 frames
  4. org.hibernate.test
    BigIntegerSequenceGeneratorTest.testBasics
    1. org.hibernate.test.idgen.biginteger.sequence.BigIntegerSequenceGeneratorTest.testBasics(BigIntegerSequenceGeneratorTest.java:50)
    1 frame
  5. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  6. JUnit
    FrameworkMethod.invokeExplosively
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    3 frames
  7. A Hibernate O/RM Module
    ExtendedFrameworkMethod.invokeExplosively
    1. org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:63)
    1 frame
  8. JUnit
    FailOnTimeout$StatementThread.run
    1. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    2. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    3. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    4. org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
    4 frames