It's all about the answers!

Ask a question

RQM Copy Utility - Error received: 400 and 404 Failure, Internal Server Error


Holly Rey (11) | asked Aug 31 '20, 9:20 a.m.

I was able to run the RQM copy utility with the command below. It ran for over an hour and ended with an error in the logs. It partially copied about 10% (161 TC's and 17 TS's) of the test cases and scripts before it failed.  It did not copy any test plans, execution results or attachments.

 "C:\Program Files (x86)\Java\jre1.8.0_111\bin\java" -jar RQMCopyUtility.jar -s=https://clmtest.rqm.hq.xxx/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/EST_TIO_CLM_QM -us=Admin -pws=Admin -d=https://clmtest.rqm.hq.xxx/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/APP_EST_INT_E2E+CLM_QM_2 -l=importlog.txt

The RQM Copy Utility log file is over 5000 lines long. Below included the last few lines from the log file and the command used. Last few lines from importlog.txt:
Starting: configuration TE2738
Error received: 404, retry #: 0
RestException executing: GET, RC: 404, message: Error 404: SRVE0295E: Error reported: 404
Error received: 400, retry #: 0
Error received: 400, retry #: 1
RestException executing: PUT, RC: 400,.....
General REST Exception: RestException executing: PUT, RC: 400,...
FAILURE!
Disconnecting from the source IBM Rational Quality Manager server.
Disconnecting from the destination IBM Rational Quality Manager server.

We also checked the RQM logs that coincide with the Copy Utility. It looks like the Copy Utility will not any test artifacts that are in an "Approved State". See below:
2020-08-28 10:13:28,286 [WebContainer : 8 @@ 10:13 XXXXX <Jakarta Commons-HttpClient/3.0@XX.XXX.XXX.XXX>
/qm/secure/service/com.ibm.rqm.integration.service.IIntegrationService/resources/APP_ES_INT_E2E+CLM_QM_2/testscript/877104998]
ERROR com.ibm.rqm.execution                               - 'Save Test Script' Failed.
<strong>%testscript.save.advisors.RestrictSaveConstraintAdvisor.name</strong> - <em>Precondition not met: Modifications to Approved,
Published, or Closed artifacts are not allowed. This artifact is in an Approved state</em>

2020-08-28 10:13:28,287 [WebContainer : 8 @@ 10:13 XXXXX <Jakarta Commons-HttpClient/3.0@XX.XXX.XXX.XXX> /qm/secure/service/com.ibm.rqm
.integration.service.IIntegrationService/resources/APP_EST_INT_E2E+CLM_QM_2/testscript/877104998] ERROR com.ibm.rqm.execution                               - Internal server error
com.ibm.team.repository.common.TeamRepositoryException: 'Save Test Script' Failed.

<strong>%testscript.save.advisors.RestrictSaveConstraintAdvisor.name</strong> - <em>Precondition not met: Modifications to Approved,
Published, or Closed artifacts are not allowed. This artifact is in an Approved state</em>

3 answers



permanent link
Ted Mayer (4666) | answered Aug 31 '20, 9:32 a.m.

Hi Holly,

The 400 error means that there is a bad request, and looking at the error in the logs, you have precondition that is set that is causing the test script APP_ES_INT_E2E+CLM_QM_2/testscript/877104998 to fail.

In this case, it seems that the test script that you are trying to update is already in an approved state, which seems to be why the command is failing.

I hope this information helps.

Regards,
Ted



permanent link
Holly Rey (11) | answered Aug 31 '20, 9:45 a.m.

Thanks Ted. I want all of the artifacts to copy even the ones in Approved state. Is there a way to force all artifacts to copy regardless of the state? If so, what changes to the command are required to force everything to copy?


Comments
Brett Bohnn commented Aug 31 '20, 10:10 a.m.

 Hi Holly,


I think you will have to temporarily disable the precondition on save test script referenced in the error "Precondition not met: Modifications to Approved, Published, or Closed artifacts are not allowed. This artifact is in an Approved state" in the destination project, APP_EST_INT_E2E+CLM_QM_2. The test script cannot save in the destination project area with that precondition and you cannot force RQM Copy to override that. 

Thanks,
Brett


permanent link
Holly Rey (11) | answered Aug 31 '20, 6:15 p.m.
 I ran the following RQMCopyUtility command again and received Error 404: SRVE0295E Failure:
* 2 of 83 test plans copied
* 874 of 1884 test cases copied
* 259 of 1724 test scripts copied
* Zero of 2066 TER's copied

Can anyone tell me how to get this utility to run without errors?

"C:\Program Files (x86)\Java\jre1.8.0_111\bin\java" -jar RQMCopyUtility.jar -s=https://XXXXXX/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/EST_TIO_CLM_QM -us=ADMIN -pws=ADMIN -d=https://YYYYYY/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/APP_EST_INT_E2E+CLM_QM_2 -a=testplan,attachment,testcase,testscript,executionresult,executionworkitem,testphase,keyword -l=importlog.txt

Below is the lmportlog.txt:
31 Aug 2020 13:22:54,855-0500 [main]  INFO com.ibm.rqm.ct.CopyUtil: Finishing: template testplan/com.ibm.rqm.planning.templates.testplan.template_1352838016929
31 Aug 2020 13:22:54,855-0500 [main]  INFO com.ibm.rqm.ct.CopyUtil: Starting: configuration TE2738
31 Aug 2020 13:22:54,978-0500 [main]  INFO com.ibm.rqm.ct.CopyUtil: Error received: 404, retry #: 0
31 Aug 2020 13:22:58,490-0500 [main]  INFO com.ibm.rqm.ct.CopyUtil: Error received: 404, retry #: 1
31 Aug 2020 13:23:01,491-0500 [main] ERROR com.ibm.rqm.ct.CopyUtil: RestException executing: GET, RC: 404, message: Error 404: SRVE0295E: Error reported: 404
31 Aug 2020 13:23:01,491-0500 [main] ERROR com.ibm.rqm.ct.CopyUtil: RestException executing: GET, RC: 404, message: Error 404: SRVE0295E: Error reported: 404
31 Aug 2020 13:23:01,491-0500 [main] ERROR com.ibm.rqm.ct.CopyUtil: General REST Exception: RestException executing: GET, RC: 404, message: Error 404: SRVE0295E: Error reported: 404
31 Aug 2020 13:23:01,491-0500 [main] ERROR com.ibm.rqm.ct.CopyUtil: FAILURE!
31 Aug 2020 13:23:01,491-0500 [main]  INFO com.ibm.rqm.ct.CopyUtil: Disconnecting from the source IBM Rational Quality Manager server.
31 Aug 2020 13:23:02,063-0500 [main]  INFO com.ibm.rqm.ct.CopyUtil: Disconnecting from the destination IBM Rational Quality Manager server.

Your answer


Register or to post your answer.