Could not save build results. ORA-01461: can bind a LONG value only for insert into a LONG column

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

問題

This problem usually happens when a parser task hangs and the build shows the following exception:

Project Name - Plan name - Default Job # : Could not save the build results. Data could be in an inconsistent state.

org.springframework.dao.QueryTimeoutException: could not insert: [com.atlassian.bamboo.resultsummary.tests.TestCaseImpl]; SQL [insert into TEST_CASE (TEST_CLASS_ID, TEST_CASE_NAME, SUCCESSFUL_RUNS, FAILED_RUNS, AVG_DURATION, FIRST_BUILD_NUM, LAST_BUILD_NUM, QUARANTINING_USERNAME, QUARANTINE_DATE, LINKED_JIRA_ISSUE, TEST_CASE_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.QueryTimeoutException: could not insert: [com.atlassian.bamboo.resultsummary.tests.TestCaseImpl]

	...

Caused by: org.hibernate.QueryTimeoutException: could not insert: [com.atlassian.bamboo.resultsummary.tests.TestCaseImpl]

	...

Caused by: java.sql.BatchUpdateException: ORA-01461: can bind a LONG value only for insert into a LONG column

	...

診断

Diagnostic Steps

It is possible to enable detailed SQL logging in Bamboo. This way you can reproduce the problem and see what exactly Bamboo is doing at the moment of failure. To do that, follow the steps below:

  1. Stop Bamboo.
  2. Enable Detailed SQL Logging.
  3. Start Bamboo.
  4. Run the plan that's exhibiting the problem.
  5. This is an optional step. You can disable SQL logging right after reproducing the problem since it produces a lot of unnecessary data.
  6. Open up the <bamboo-home-directory>/logs/atlassian-bamboo.log or <bamboo-installation-directory>/logs/catalina.out
  7. Search for unusual test case names (tip: usually something out of the ordinary and huge).
  • Here's an example of Bamboo trying to store a huge test case name to the TEST_CASE_NAME column, inside the TEST_CASE table:

    ...
    2016-02-09 13:39:55,044 TRACE [9-BuildTailMessageProcessingThread-expensive:pool-16-thread-1] [BasicBinder] binding parameter [2] as [VARCHAR] - test_case_name_atl_support[0: [code=2224g333-gb52-12h1-1hh2-b958gf4v019b, refundMark=<null>, skuCode=0_FA52PRObOWD0PbMiOBc=, parentId=<null>, itemsQuantity=15, type=<null>, atlAdjustmentPrograms=<null>, programStatus=<null>, testAtl=com.atl.support.test.v1.ATL@52e7f2e9[value=300.00, type=10, temporary=false, startDate=2015-04-23T18:25:43, endDate=2020-04-23T18:25:43, atlassianMessage=<null>, description=com.atl.support.test.v1.ATL@52e7f2e9[locale=<null>, shortDescription=some event, longDescription=some event], localizedDescriptions=<null>], testAtlassianSupport=com.atl.support.test.v1.ATL@52e7f2e9[value=100, type=10, temporary=false, startDate=2015-04-23T18:25:43, endDate=2020-04-23T18:25:43, atlassianMessage=<null>, description=com.atl.support.test.v1.ATL@52e7f2e9[locale=<null>, shortDescription=some event, longDescription=some event], localizedDescriptions=<null>], programPrice=<null>, proratedPrices={com.atl.support.test.v1.ATL@52e7f2e9[value=78.49],com.atl.support.test.v1.ATL@52e7f2e9[value=78.49],com.atl.support.test.v1.ATL@52e7f2e9[value=78.48],com.atl.support.test.v1.ATL@52e7f2e9[value=60.00],com.atl.support.test.v1.ATL@52e7f2e9[value=60.00]}, actualPrices={com.atl.support.test.v1.ATL@52e7f2e9[value=80.00],com.atl.support.test.v1.ATL@52e7f2e9[value=80.00],com.atl.support.test.v1.ATL@52e7f2e9[value=80.00],com.atl.support.test.v1.ATL@52e7f2e9[value=60.00],com.atl.support.test.v1.ATL@52e7f2e9[value=60.00]}, testAtl=com.atl.support.test.v1.ATL@52e7f2e9[value=500.00], testAtl=com.atl.support.test.v1.ATL@52e7f2e9[value=360.00], testAtl={com.atl.support.test.v1.ATL@52e7f2e9[value=20.00, absolute=true, testId=ATL, testIndex=0, testName=20%, testStartDate=<null>, testEndDate=<null>, test=<null>, type=<null>, level=<null>, testAtl=<null>, testResult=<null>, testApplied=<null>, testDisclaimer=<null>, testType=ATL, testDescriptions=<null>, testAtl=<null>, errorMessage=<null>],com.atl.support.test.v1.ATL@52e7f2e9[value=20.00, absolute=true, testId=SUPPORT_ENGINEER, testIndex=0, testName=20%, testStartDate=<null>, testEndDate=<null>, appliedProductQuantity=<null>, type=<null>, level=<null>, testDescription=<null>, absoluteResult=<null>, atlassianCodeApplied=<null>, atlassianDisclaimer=<null>, atlassianType=SUPPORT_ENGINEER, atlassianLocalizedDescriptions=<null>, atlassianProfit=<null>, errorMessage=<null>],com.atl.support.test.v1.ATL@ab5e63[value=20.00, absolute=true, testId=SUPPORT_ENGINEER, testIndex=0, testName=20%, testStartDate=<null>, testEndDate=<null>, appliedProductQuantity=<null>, type=<null>, level=<null>, testDescription=<null>, absoluteResult=<null>, atlassianCodeApplied=<null>, atlassianDisclaimer=<null>, atlassianType=SUPPORT_ENGINEER, atlassianLocalizedDescriptions=<null>, atlassianProfit=<null>, errorMessage=<null>],com.atl.support.test.v1.ATL@6a434cdd[value=40.00, absolute=true, testId=SUPPORT_ENGINEER, testIndex=0, testName=40%, testStartDate=<null>, testEndDate=<null>, appliedProductQuantity=<null>, type=<null>, level=<null>, testDescription=<null>, absoluteResult=<null>, atlassianCodeApplied=<null>, atlassianDisclaimer=<null>, atlassianType=SUPPORT_ENGINEER, atlassianLocalizedDescriptions=<null>, atlassianProfit=<null>, errorMessage=<null>],com.atl.support.test.v1.ATL@1b12c870[value=40.00, absolute=true, testId=SUPPORT_ENGINEER, testIndex=0, testName=40%, testStartDate=<null>, testEndDate=<null>, appliedProductQuantity=<null>, type=<null>, level=<null>, testDescription=<null>, a
    ...
  • This is an example of a test case name that seems to be fine:

    ...
    2016-02-09 13:39:55,044 TRACE [9-BuildTailMessageProcessingThread-expensive:pool-16-thread-1] [BasicBinder] binding parameter [2] as [VARCHAR] - shouldNotApplyItemInCasePriceChangeNeedApproval
    ...

原因

Please look into why the test is producing such test case name (e.g. corrupted test result xml file). In the example above, we can see that it doesn't look like a test case name at all when looking at the format of other test case names that are being stored correctly.

ソリューション

Take a look at which test suite is generating the problematic test case name and refactor that as Bamboo is not able to store such huge test case names into the DB.

 

Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.