org.hibernate.exception.SQLGrammarException

could not execute batch

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 web1399

  • via Google Groups by Stefan Fritzsche, 5 months ago
    could not execute batch
  • via Coderanch by Rathan Kamireddy, 7 months ago
    Could not execute JDBC batch update
  • Stack trace

    • org.hibernate.exception.SQLGrammarException: could not execute batch 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.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:122) at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:101) at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:161) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:207) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:390) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:310) 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:1195) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.hibernate.context.internal.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:352) at com.sun.proxy.$Proxy41.flush(Unknown Source) at org.dspace.core.HibernateDBConnection.commit(HibernateDBConnection.java:84) at org.dspace.core.Context.commit(Context.java:402) at org.dspace.core.Context.complete(Context.java:354) at org.dspace.app.util.AbstractDSpaceWebapp.deregister(AbstractDSpaceWebapp.java:89) at org.dspace.app.util.DSpaceWebappListener.contextDestroyed(DSpaceWebappListener.java:43) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5115) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5779) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:159) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.BatchUpdateException: Batch entry 0 delete from .webapp where webapp_id=1 was aborted: ERROR: syntax error at or near "." Position: 13 Call getNextException to see other errors in the batch. at org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:151) at org.postgresql.core.ResultHandlerDelegate.handleError(ResultHandlerDelegate.java:45) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2159) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:463) at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:794) at org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1662) at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:345) at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:345) at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:113) ... 33 more Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "." Position: 13 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2458) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2158) ... 39 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

    Once, 4 weeks ago
    26 times, 1 month ago
    7 times, 1 month ago
    2 times, 1 month ago
    Unknown user
    2 times, 1 month ago
    89 more bugmates