org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update

Pentaho BI Platform Tracking | Mat Lowery | 8 years ago
  1. 0

    Here's the exception when a validation query is left blank: 15:05:10,934 WARN [JDBCExceptionReporter] SQL Error: 1407, SQLState: 72000 15:05:10,934 ERROR [JDBCExceptionReporter] ORA-01407: cannot update ("HIBUSER"."DATASOURCE"."QUERY") to NULL 15:05:10,934 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update 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.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) at org.pentaho.pac.server.datasources.DataSourceHibernateDAO.commitTransaction(DataSourceHibernateDAO.java:88) at org.pentaho.pac.server.datasources.DataSourceMgmtService.commitTransaction(DataSourceMgmtService.java:64) at org.pentaho.pac.server.PacServiceImpl.updateDataSource(PacServiceImpl.java:499) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:163) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:85) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:498) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:715) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:285) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:458) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:790) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:358) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:217) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) Caused by: java.sql.BatchUpdateException: ORA-01407: cannot update ("HIBUSER"."DATASOURCE"."QUERY") to NULL at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343) at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10656) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246) ... 33 more To reproduce: 1. Configure the platform such that the DATASOURCE table is in Oracle. 2. Open admin console (community or enterprise edition). 3. Click Administration > Data Sources. 4. Click the + button to add a datasource. 5. Fill out all fields on the General tab, but leave all fields on the Advanced tab blank. 6. Test the connection. 7. Click OK. You should now have an exception. There is a workaround for the validation query: 1. Enter a bogus validation query. 2. Change pentaho.xml's dbcp-defaults/test-on-borrow to false. Confirm also that all dbcp-defaults/test-* are false. There is no workaround for the username and password. Per Marc, the fix for this is two-fold: 1. Edit bi-platform-sample-data/*/migration.sql so that existing DATASOURCE tables have nullable USERNAME, PASSWORD, and QUERY columns. In other words, add ALTER TABLE statements. 2. Edit bi-platform-repository/res/hibernate/*.hbm.xml so that nullable USERNAME, PASSWORD, and QUERY columns are nullable.

    Pentaho BI Platform Tracking | 8 years ago | Mat Lowery
    org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
  2. 0

    Here's the exception when a validation query is left blank: 15:05:10,934 WARN [JDBCExceptionReporter] SQL Error: 1407, SQLState: 72000 15:05:10,934 ERROR [JDBCExceptionReporter] ORA-01407: cannot update ("HIBUSER"."DATASOURCE"."QUERY") to NULL 15:05:10,934 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update 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.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) at org.pentaho.pac.server.datasources.DataSourceHibernateDAO.commitTransaction(DataSourceHibernateDAO.java:88) at org.pentaho.pac.server.datasources.DataSourceMgmtService.commitTransaction(DataSourceMgmtService.java:64) at org.pentaho.pac.server.PacServiceImpl.updateDataSource(PacServiceImpl.java:499) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:163) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:85) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:498) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:715) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:285) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:458) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:790) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:358) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:217) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) Caused by: java.sql.BatchUpdateException: ORA-01407: cannot update ("HIBUSER"."DATASOURCE"."QUERY") to NULL at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343) at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10656) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246) ... 33 more To reproduce: 1. Configure the platform such that the DATASOURCE table is in Oracle. 2. Open admin console (community or enterprise edition). 3. Click Administration > Data Sources. 4. Click the + button to add a datasource. 5. Fill out all fields on the General tab, but leave all fields on the Advanced tab blank. 6. Test the connection. 7. Click OK. You should now have an exception. There is a workaround for the validation query: 1. Enter a bogus validation query. 2. Change pentaho.xml's dbcp-defaults/test-on-borrow to false. Confirm also that all dbcp-defaults/test-* are false. There is no workaround for the username and password. Per Marc, the fix for this is two-fold: 1. Edit bi-platform-sample-data/*/migration.sql so that existing DATASOURCE tables have nullable USERNAME, PASSWORD, and QUERY columns. In other words, add ALTER TABLE statements. 2. Edit bi-platform-repository/res/hibernate/*.hbm.xml so that nullable USERNAME, PASSWORD, and QUERY columns are nullable.

    Pentaho BI Platform Tracking | 8 years ago | Mat Lowery
    org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
  3. 0

    java.sql.BatchUpdateException: ORA-01732: data manipulation not legal on this view

    Stack Overflow | 3 years ago | Kevin Rave
    javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error:ORA-01461: can bind a LONG value only for insert into a LONG column

    Stack Overflow | 5 years ago | munna
    java.sql.BatchUpdateException: ORA-01461: can bind a LONG value only for insert into a LONG column
  6. 0

    Hibnernate SQLState: 99999 , ORA-24813: cannot send or receive an unsupported LOB

    Stack Overflow | 2 years ago | shareef
    org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update

    3 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. java.sql.BatchUpdateException

      ORA-01407: cannot update ("HIBUSER"."DATASOURCE"."QUERY") to NULL

      at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException()
    2. Oracle jdbc
      OraclePreparedStatement.executeBatch
      1. oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)
      2. oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10656)
      2 frames
    3. Hibernate
      ActionQueue.executeActions
      1. org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
      2. org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
      3. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
      4. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
      4 frames
    4. Hibernate
      SessionImpl.managedFlush
      1. org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
      2. org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
      3. org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
      4. org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
      4 frames
    5. Hibernate
      JDBCTransaction.commit
      1. org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
      1 frame
    6. org.pentaho.pac
      PacServiceImpl.updateDataSource
      1. org.pentaho.pac.server.datasources.DataSourceHibernateDAO.commitTransaction(DataSourceHibernateDAO.java:88)
      2. org.pentaho.pac.server.datasources.DataSourceMgmtService.commitTransaction(DataSourceMgmtService.java:64)
      3. org.pentaho.pac.server.PacServiceImpl.updateDataSource(PacServiceImpl.java:499)
      3 frames
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    8. Jetty Contrib :: jetty-gwt RemoteServiceServlet
      RemoteServiceServlet.doPost
      1. com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
      2. com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:163)
      3. com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:85)
      3 frames
    9. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      2 frames
    10. Jetty Server
      SocketConnector$Connection.run
      1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:498)
      2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
      3. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      4. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:715)
      5. org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      6. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
      7. org.mortbay.jetty.Server.handle(Server.java:285)
      8. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:458)
      9. org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:790)
      10. org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628)
      11. org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
      12. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:358)
      13. org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:217)
      13 frames
    11. Jetty Util
      BoundedThreadPool$PoolThread.run
      1. org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
      1 frame