RQM Copy Utility - Error received: 400 and 404 Failure, Internal Server Error
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
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
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
Hi Holly,
* 874 of 1884 test cases copied
* 259 of 1724 test scripts copied
* Zero of 2066 TER's copied
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.