com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Unable to esablish a connection with the database. (Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)

Atlassian JIRA | Zulfadli Noor Sazali [Atlassian] | 4 years ago
  1. 0

    There is a spelling mistake of *esablish* which suppose to be *establish* in bq. Unable to esablish a connection with the database. Also, when we are at it, is it possible to further improve the error thrown to sent more clearer message? h4. Steps to reproduce: # Start JIRA that is connected to external database (eg. MySQL) # Go to Issue Navigator # Stop MySQL service # Click on one of the issue in the Issue Navigator h4. Error thrown: !esablish.PNG|thumbnail! {noformat} Cause: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Unable to esablish a connection with the database. (Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.) Stack Trace: [hide] com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Unable to esablish a connection with the database. (Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByAnd(DefaultOfBizDelegator.java:94) at com.atlassian.jira.issue.managers.DefaultIssueManager.getIssue(DefaultIssueManager.java:114) at com.atlassian.jira.issue.managers.DefaultIssueManager.getIssueObject(DefaultIssueManager.java:306) at com.atlassian.jira.servlet.QuickLinkServlet.linkToIssue(QuickLinkServlet.java:139) at com.atlassian.jira.servlet.QuickLinkServlet.service(QuickLinkServlet.java:46) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:78) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243){noformat}

    Atlassian JIRA | 4 years ago | Zulfadli Noor Sazali [Atlassian]
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Unable to esablish a connection with the database. (Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
  2. 0

    There is a spelling mistake of *esablish* which suppose to be *establish* in bq. Unable to esablish a connection with the database. Also, when we are at it, is it possible to further improve the error thrown to sent more clearer message? h4. Steps to reproduce: # Start JIRA that is connected to external database (eg. MySQL) # Go to Issue Navigator # Stop MySQL service # Click on one of the issue in the Issue Navigator h4. Error thrown: !esablish.PNG|thumbnail! {noformat} Cause: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Unable to esablish a connection with the database. (Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.) Stack Trace: [hide] com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Unable to esablish a connection with the database. (Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByAnd(DefaultOfBizDelegator.java:94) at com.atlassian.jira.issue.managers.DefaultIssueManager.getIssue(DefaultIssueManager.java:114) at com.atlassian.jira.issue.managers.DefaultIssueManager.getIssueObject(DefaultIssueManager.java:306) at com.atlassian.jira.servlet.QuickLinkServlet.linkToIssue(QuickLinkServlet.java:139) at com.atlassian.jira.servlet.QuickLinkServlet.service(QuickLinkServlet.java:46) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:78) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243){noformat}

    Atlassian JIRA | 4 years ago | Zulfadli Noor Sazali [Atlassian]
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Unable to esablish a connection with the database. (Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
  3. 0

    {noformat} 2010-05-04 01:49:24,618 main INFO [jira.upgrade.tasks.UpgradeTask_Build552] Converting search requests to use the new labels system field is 100% complete. 2010-05-04 01:49:24,618 main INFO [jira.upgrade.tasks.UpgradeTask_Build552] Updating saved filters to use the new labels system field...DONE 2010-05-04 01:49:24,618 main INFO [jira.upgrade.tasks.UpgradeTask_Build552] Updating label gadgets use the new labels system field... 2010-05-04 01:49:24,717 main ERROR [atlassian.jira.upgrade.UpgradeManagerImpl] Exception thrown during upgrade: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception whi le executing the following:SELECT ID, PORTLETCONFIGURATION, USERPREFKEY, USERPREFVALUE FROM gadgetuserpreference WHERE (PORTLETCONFIGURATION IN () ) AND (USERPREFKEY = ? ) (You have a n error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ) AND (USERPREFKEY = 'fieldId' )' at line 1) com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, PORTLETCONFIGURATION, USERPRE FKEY, USERPREFVALUE FROM gadgetuserpreference WHERE (PORTLETCONFIGURATION IN () ) AND (USERPREFKEY = ? ) (You have an error in your SQL syntax; check the manual that corresponds to yo ur MySQL server version for the right syntax to use near ') ) AND (USERPREFKEY = 'fieldId' )' at line 1) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByCondition(DefaultOfBizDelegator.java:188) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByCondition(DefaultOfBizDelegator.java:175) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build552.updateGadgetConfigurations(UpgradeTask_Build552.java:190) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build552.doUpgrade(UpgradeTask_Build552.java:151) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSucess(UpgradeManagerImpl.java:562) at com.atlassian.jira.upgrade.UpgradeManagerImpl.runUpgradeTasks(UpgradeManagerImpl.java:466) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:402) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:353) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:292) at com.atlassian.jira.upgrade.UpgradeLauncher.checkIfUpgradeNeeded(UpgradeLauncher.java:100) at com.atlassian.jira.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:583) 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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, PORTLETCONFIGURATION, USERPREFKEY, USERPREFVALUE FROM gadgetuserpref erence WHERE (PORTLETCONFIGURATION IN () ) AND (USERPREFKEY = ? ) (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right s yntax to use near ') ) AND (USERPREFKEY = 'fieldId' )' at line 1) at org.ofbiz.core.entity.jdbc.SQLProcessor.executeQuery(SQLProcessor.java:596) at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:1076) at org.ofbiz.core.entity.GenericDAO.selectByCondition(GenericDAO.java:919) at org.ofbiz.core.entity.GenericHelperDAO.findByCondition(GenericHelperDAO.java:162) at org.ofbiz.core.entity.GenericDelegator.findByCondition(GenericDelegator.java:960) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByCondition(DefaultOfBizDelegator.java:183) ... 25 more {noformat}

    Atlassian JIRA | 7 years ago | George Barnett
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, PORTLETCONFIGURATION, USERPRE FKEY, USERPREFVALUE FROM gadgetuserpreference WHERE (PORTLETCONFIGURATION IN () ) AND (USERPREFKEY = ? ) (You have an error in your SQL syntax; check the manual that corresponds to yo ur MySQL server version for the right syntax to use near ') ) AND (USERPREFKEY = 'fieldId' )' at line 1)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hi Bob, We are using atlassian-cli-3.9.0 and JIRA version 5.4.12. We are using following command to delete some projects: jira --action deleteProject --project "prokjectKey" The above command is working fine for most of the projects but in some cases this fails to delete projects. We have experienced following error in JIRA log: ------------------- 2016-05-08 10:54:44,476 http-bio-8080-exec-118 ERROR anonymous 638x278692x1 - 172.18.16.166,172.18.13.241,172.18.14.165 /rpc/soap/jirasoapservice-v2 [atlassian.jira.project.DefaultProjectManager] Exception removing issues com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM moved_issue_key WHERE ISSUE_ID=? (Deadlock found when trying to get lock; try restarting transaction)) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.removeByAnd(DefaultOfBizDelegator.java:311) ---------------------- On command line interface we are getting below error message: --------------------- Remote error: ; nested exception is: java.net.SocketException: Connection reset Sun May 8 10:43:36 GMT 2016 Could not deleted Project with key: AU --------------------- Once we checked the database, then we found that some of the projects are not deleted but some of them were deleted in spite of these errors. So my question is that can you please confirm that whether these deleted projects are deleted successfully along with their related data or only partial data were removed of deleted projects as during deletion we were getting above error. Can you please suggest any solution in order to prevent these errors, as we have so many projects (about 1600) to delete. Thanks, Reetesh

    JIRA | 7 months ago | Reetesh Kumar
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM moved_issue_key WHERE ISSUE_ID=? (Deadlock found when trying to get lock; try restarting transaction))
  6. 0

    When exporting the audit log, the export file is empty. The prompt will give you a number of entries that will be exported (truncated to the 100,000 newest events), yet when you open the export file, it is empty. I have attached the audit log zip file. *Edit with root cause:* In tomcat logs there are following exceptions: {code} SEVERE: Servlet.service() for servlet default threw exception com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, LOG_ID, OBJECT_TYPE, OBJECT_ID, OBJECT_NAME, OBJECT_PARENT_ID, OBJECT_PARENT_NAME FROM jiraschema.audit_item WHERE (LOG_ID IN [...] (Prepared or callable statement has more than 2000 parameter markers.) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findListIteratorByCondition(DefaultOfBizDelegator.java:534) at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.findListIteratorByCondition(WrappingOfBizDelegator.java:349) at com.atlassian.jira.entity.SelectQueryImpl$ExecutionContextImpl.consumeWith(SelectQueryImpl.java:234) at com.atlassian.jira.entity.SelectQueryImpl$ExecutionContextImpl.visitWith(SelectQueryImpl.java:253) at com.atlassian.jira.auditing.AuditingStoreImpl.getItems(AuditingStoreImpl.java:293) at com.atlassian.jira.auditing.AuditingStoreImpl.getAuditRecords(AuditingStoreImpl.java:249) at com.atlassian.jira.auditing.AuditingStoreImpl.getRecords(AuditingStoreImpl.java:195) at com.atlassian.jira.auditing.AuditingManagerImpl.getRecords(AuditingManagerImpl.java:108) at com.atlassian.jira.auditing.AuditingManagerImpl.getRecords(AuditingManagerImpl.java:82) at sun.reflect.GeneratedMethodAccessor2802.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy296.getRecords(Unknown Source) at sun.reflect.GeneratedMethodAccessor2802.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) [...] {code} This is reproducible only with MSSQL when exporting more than 2000 records, because MSSQL allows only for 2000 placeholder values in prepared statements. Also it affects Audit Log only in JIRA 6.3.5 and above since from that point there is an optimization introduced that results in prepare statements with long lists of place holders.

    Atlassian JIRA | 2 years ago | Chris Solgat
    com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT ID, LOG_ID, OBJECT_TYPE, OBJECT_ID, OBJECT_NAME, OBJECT_PARENT_ID, OBJECT_PARENT_NAME FROM jiraschema.audit_item WHERE (LOG_ID IN [...] (Prepared or callable statement has more than 2000 parameter markers.)

    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.atlassian.jira.exception.DataAccessException

      org.ofbiz.core.entity.GenericDataSourceException: Unable to esablish a connection with the database. (Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)

      at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByAnd()
    2. com.atlassian.jira
      QuickLinkServlet.service
      1. com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByAnd(DefaultOfBizDelegator.java:94)
      2. com.atlassian.jira.issue.managers.DefaultIssueManager.getIssue(DefaultIssueManager.java:114)
      3. com.atlassian.jira.issue.managers.DefaultIssueManager.getIssueObject(DefaultIssueManager.java:306)
      4. com.atlassian.jira.servlet.QuickLinkServlet.linkToIssue(QuickLinkServlet.java:139)
      5. com.atlassian.jira.servlet.QuickLinkServlet.service(QuickLinkServlet.java:46)
      5 frames
    3. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      1 frame
    4. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    5. com.atlassian.jira
      ChainedFilterStepRunner.doFilter
      1. com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:78)
      1 frame