java.sql.SQLException: Unable to obtain lock in 60 seconds: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@2c0b05a6

Kuali JIRA | Amanda Zhang | 3 years ago
  1. 0

    UConn asked us regarding a performance issue we fixed at MSU regarding PurAp documents which we commented on KFSMI-6643. We applied the fix in Rice 1.0.1. BTW, the KFS version we were running in PROD is KFS 3.0 but no code change needed from KFS side. Below is additional information regarding how we faced this issue initially. Two patch files are uploaded for what we did. "dtt-3632-improveGetDocTypeLabel.patch" is to optimize DataDictionaryService.getDocumentLabelByTypeName(). "dtt-3643-caching.patch" is the cache mechanism further improve the performance. -------------------------------------------------------------------- At MSU, the functional team reported the slowness with KFS PROD document. The log shows the exception happened when they retire a PO with creating new for example Amendment PO. 2011-09-07 09:19:21,304 ERROR [org.apache.ojb.broker.accesslayer.StatementsForClassImpl] (http-0.0.0.0-10101-142) u:quinney/d:1114353 * Can't prepare statement: * sql statement was 'SELECT A0.RTE_NODE_ID,A0.DOC_TYP_ID,A0.NM,A0.TYP,A0.RTE_MTHD_NM,A0.FNL_APRVR_IND,A0.MNDTRY_RTE_IND,A0.GRP_ID,A0.RTE_MTHD_CD,A0.ACTVN_TYP,A0.BRCH_PROTO_ID,A0.VER_NBR FROM KREW_RTE_NODE_LNK_T M_N, KREW_RTE_NODE_T A0 WHERE (M_N.TO_RTE_NODE_ID = ?) AND A0.RTE_NODE_ID = M_N.FROM_RTE_NODE_ID' * Exception message is [Unable to obtain lock in 60 seconds: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@2c0b05a6] * Vendor error code [0] * SQL state code [null] * The root stack trace is --> * java.sql.SQLException: Unable to obtain lock in 60 seconds: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@2c0b05a6 at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.tryLock(BaseWrapperManagedConnection.java:267) at org.jboss.resource.adapter.jdbc.WrappedConnection.lock(WrappedConnection.java:80) at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:260) ... at org.kuali.kfs.module.purap.businessobject.AbstractRelatedView.getDocumentLabel(AbstractRelatedView.java:102) ... org.apache.jsp.tag.web.module.purap.relatedPurchaseOrderDocumentsDetail_tag._jspx_meth_c_005fset_005f2(relatedPurchaseOrderDocumentsDetail_tag.java:452) at ... org.apache.jsp.jsp.module.purap.PurchaseOrder_jsp._jspx_meth_purap_005frelatedDocuments_005f0(PurchaseOrder_jsp.java:1081) .. at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241) at ... With stepping into the cause, it shows the root cause happened when PO tried to display the related document label. However, it’s quite expensive with retrieving the document label by making the call AbstractRelatedView#getDocumentLabel() since it’s calling DataDictionaryService.getDocumentLabelByTypeName() which retrieves everything about the document type including routing path. Our fix is to optimize DataDictionaryService.getDocumentLabelByTypeName() to get the doc label without retrieving the route path as well as to cache the document label. Both fix are applied to Rice code 1.0.1.

    Kuali JIRA | 3 years ago | Amanda Zhang
    java.sql.SQLException: Unable to obtain lock in 60 seconds: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@2c0b05a6
  2. 0

    UConn asked us regarding a performance issue we fixed at MSU regarding PurAp documents which we commented on KFSMI-6643. We applied the fix in Rice 1.0.1. BTW, the KFS version we were running in PROD is KFS 3.0 but no code change needed from KFS side. Below is additional information regarding how we faced this issue initially. Two patch files are uploaded for what we did. "dtt-3632-improveGetDocTypeLabel.patch" is to optimize DataDictionaryService.getDocumentLabelByTypeName(). "dtt-3643-caching.patch" is the cache mechanism further improve the performance. -------------------------------------------------------------------- At MSU, the functional team reported the slowness with KFS PROD document. The log shows the exception happened when they retire a PO with creating new for example Amendment PO. 2011-09-07 09:19:21,304 ERROR [org.apache.ojb.broker.accesslayer.StatementsForClassImpl] (http-0.0.0.0-10101-142) u:quinney/d:1114353 * Can't prepare statement: * sql statement was 'SELECT A0.RTE_NODE_ID,A0.DOC_TYP_ID,A0.NM,A0.TYP,A0.RTE_MTHD_NM,A0.FNL_APRVR_IND,A0.MNDTRY_RTE_IND,A0.GRP_ID,A0.RTE_MTHD_CD,A0.ACTVN_TYP,A0.BRCH_PROTO_ID,A0.VER_NBR FROM KREW_RTE_NODE_LNK_T M_N, KREW_RTE_NODE_T A0 WHERE (M_N.TO_RTE_NODE_ID = ?) AND A0.RTE_NODE_ID = M_N.FROM_RTE_NODE_ID' * Exception message is [Unable to obtain lock in 60 seconds: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@2c0b05a6] * Vendor error code [0] * SQL state code [null] * The root stack trace is --> * java.sql.SQLException: Unable to obtain lock in 60 seconds: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@2c0b05a6 at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.tryLock(BaseWrapperManagedConnection.java:267) at org.jboss.resource.adapter.jdbc.WrappedConnection.lock(WrappedConnection.java:80) at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:260) ... at org.kuali.kfs.module.purap.businessobject.AbstractRelatedView.getDocumentLabel(AbstractRelatedView.java:102) ... org.apache.jsp.tag.web.module.purap.relatedPurchaseOrderDocumentsDetail_tag._jspx_meth_c_005fset_005f2(relatedPurchaseOrderDocumentsDetail_tag.java:452) at ... org.apache.jsp.jsp.module.purap.PurchaseOrder_jsp._jspx_meth_purap_005frelatedDocuments_005f0(PurchaseOrder_jsp.java:1081) .. at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241) at ... With stepping into the cause, it shows the root cause happened when PO tried to display the related document label. However, it’s quite expensive with retrieving the document label by making the call AbstractRelatedView#getDocumentLabel() since it’s calling DataDictionaryService.getDocumentLabelByTypeName() which retrieves everything about the document type including routing path. Our fix is to optimize DataDictionaryService.getDocumentLabelByTypeName() to get the doc label without retrieving the route path as well as to cache the document label. Both fix are applied to Rice code 1.0.1.

    Kuali JIRA | 3 years ago | Amanda Zhang
    java.sql.SQLException: Unable to obtain lock in 60 seconds: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@2c0b05a6
  3. 0

    java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionJDK5@42d0cb88

    Stack Overflow | 3 years ago
    java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionJDK5@42d0cb88
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.sql.SQLException: Unable to obtain lock in 60 seconds

    Stack Overflow | 5 years ago | simonC
    java.sql.SQLException: Unable to obtain lock in 60 seconds: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1d314d
  6. 0

    Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionJDK5@1a4bc7 | 오늘도 커피 3잔?

    centis1504.net | 1 year ago
    java.sql.SQLException: Unable to obtain lock in 60 seconds: org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@238ac5

    1 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.SQLException

      Unable to obtain lock in 60 seconds: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@2c0b05a6

      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.tryLock()
    2. JBoss Application Server Connector
      WrappedConnection.prepareStatement
      1. org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.tryLock(BaseWrapperManagedConnection.java:267)
      2. org.jboss.resource.adapter.jdbc.WrappedConnection.lock(WrappedConnection.java:80)
      3. org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:260)
      3 frames