java.sql.BatchUpdateException: No database selected

Oracle Community | 807581 | 1 decade ago
  1. 0

    need help with a simple application

    Oracle Community | 1 decade ago | 807581
    java.sql.BatchUpdateException: No database selected
  2. 0

    I get an error message "Could not execute JDBC batch update" when using hibernate "Many to Many"

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

    双向同步时出现No database selected错误

    GitHub | 3 months ago | Shannon1
    java.util.concurrent.ExecutionException: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [insert into aa-test.tb_aa_test(`username` , `phone` , `mail` , `id`) values (? , ? , ? , ?) on duplicate key update `username`=values(`username`) , `phone`=values(`phone`) , `mail`=values(`mail`) , `id`=values(`id`)]; SQL state [3D000]; error code [1046]; No database selected; nested exception is java.sql.BatchUpdateException: No database selected
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Exception is attached. 12:52:41,593 DEBUG crowd.console.action.setup.DefaultAdministrator: Could not execute JDBC batch update; nested exception is: com.atlassian.crowd.util.persistence.PersistenceException: Could not execute JDBC batch update java.rmi.RemoteException: Could not execute JDBC batch update; nested exception is: com.atlassian.crowd.util.persistence.PersistenceException: Could not execute JDBC batch update at com.atlassian.crowd.integration.directory.internal.InternalDirectory.addGroup(InternalDirectory.java:110) at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.addGroup(DirectoryManagerGeneric.java:140) at com.atlassian.crowd.console.action.setup.DefaultAdministrator.doUpdate(DefaultAdministrator.java:64) 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:585) at webwork.action.ActionSupport.invokeCommand(ActionSupport.java:415) at webwork.action.ActionSupport.execute(ActionSupport.java:144) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:131) at webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:174) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.crowd.console.filter.SetupFilter.doFilter(SetupFilter.java:57) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.crowd.util.persistence.hibernate.SessionManagerFilter.doFilter(SessionManagerFilter.java:62) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: com.atlassian.crowd.util.persistence.PersistenceException: Could not execute JDBC batch update at com.atlassian.crowd.util.persistence.hibernate.HibernateDAO.save(HibernateDAO.java:30) at com.atlassian.crowd.model.group.GroupDAOHibernate.add(GroupDAOHibernate.java:25) at com.atlassian.crowd.integration.directory.internal.InternalDirectory.addGroup(InternalDirectory.java:107) ... 35 more Caused by: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:143) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985) at com.atlassian.crowd.util.persistence.hibernate.HibernateDAO.save(HibernateDAO.java:26) ... 37 more Caused by: java.sql.BatchUpdateException: Table 'crowddb.remotegroupmembers' doesn't exist at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:896) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195) ... 43 more

    Atlassian JIRA | 10 years ago | Damon Rand
    com.atlassian.crowd.util.persistence.PersistenceException: Could not execute JDBC batch update
  6. 0

    Exception is attached. 12:52:41,593 DEBUG crowd.console.action.setup.DefaultAdministrator: Could not execute JDBC batch update; nested exception is: com.atlassian.crowd.util.persistence.PersistenceException: Could not execute JDBC batch update java.rmi.RemoteException: Could not execute JDBC batch update; nested exception is: com.atlassian.crowd.util.persistence.PersistenceException: Could not execute JDBC batch update at com.atlassian.crowd.integration.directory.internal.InternalDirectory.addGroup(InternalDirectory.java:110) at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.addGroup(DirectoryManagerGeneric.java:140) at com.atlassian.crowd.console.action.setup.DefaultAdministrator.doUpdate(DefaultAdministrator.java:64) 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:585) at webwork.action.ActionSupport.invokeCommand(ActionSupport.java:415) at webwork.action.ActionSupport.execute(ActionSupport.java:144) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:131) at webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:174) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.crowd.console.filter.SetupFilter.doFilter(SetupFilter.java:57) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.crowd.util.persistence.hibernate.SessionManagerFilter.doFilter(SessionManagerFilter.java:62) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: com.atlassian.crowd.util.persistence.PersistenceException: Could not execute JDBC batch update at com.atlassian.crowd.util.persistence.hibernate.HibernateDAO.save(HibernateDAO.java:30) at com.atlassian.crowd.model.group.GroupDAOHibernate.add(GroupDAOHibernate.java:25) at com.atlassian.crowd.integration.directory.internal.InternalDirectory.addGroup(InternalDirectory.java:107) ... 35 more Caused by: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:143) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985) at com.atlassian.crowd.util.persistence.hibernate.HibernateDAO.save(HibernateDAO.java:26) ... 37 more Caused by: java.sql.BatchUpdateException: Table 'crowddb.remotegroupmembers' doesn't exist at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:896) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195) ... 43 more

    Atlassian JIRA | 10 years ago | Damon Rand
    com.atlassian.crowd.util.persistence.PersistenceException: Could not execute JDBC batch update
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

    No database selected

    at com.mysql.jdbc.PreparedStatement.executeBatch()
  2. MySQL jdbc
    PreparedStatement.executeBatch
    1. com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:896)
    1 frame
  3. com.sun.jdo
    TransactionImpl.beforeCompletion
    1. com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.DBStatement.executeBatch(DBStatement.java:117)
    2. com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeUpdateBatch(SQLStoreManager.java:567)
    3. com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeBatch(SQLStoreManager.java:505)
    4. com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.updatePersistent(SQLStateManager.java:891)
    5. com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.flushToDataStore(PersistenceManagerImpl.java:1477)
    6. com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.flushTxCache(PersistenceManagerImpl.java:1404)
    7. com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:1338)
    8. com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.notifyBeforeCompletion(TransactionImpl.java:1130)
    9. com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.commitBefore(TransactionImpl.java:759)
    10. com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.beforeCompletion(TransactionImpl.java:650)
    10 frames
  4. Embedded GlassFish Web
    ContainerSynchronization.beforeCompletion
    1. com.sun.ejb.containers.ContainerSynchronization.beforeCompletion(ContainerSynchronization.java:137)
    1 frame
  5. com.sun.enterprise
    J2EETransactionManagerOpt.commit
    1. com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:272)
    2. com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:336)
    2 frames
  6. Embedded GlassFish Web
    EJBObjectInvocationHandler.invoke
    1. com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:2732)
    2. com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2521)
    3. com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:819)
    4. com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:137)
    4 frames
  7. Unknown
    $Proxy17.createUser
    1. $Proxy17.createUser(Unknown Source)
    1 frame
  8. 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:585)
    4 frames
  9. glassfish-corba-orb
    SocketOrChannelConnectionImpl.doWork
    1. com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:123)
    2. com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
    3. com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:192)
    4. com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1709)
    5. com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1569)
    6. com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:951)
    7. com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
    8. com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:721)
    9. com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:469)
    10. com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1258)
    10 frames
  10. glassfish-corba-orbgeneric
    ThreadPoolImpl$WorkerThread.run
    1. com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)
    1 frame