TDM portal Synthetic Data Generation using XML is failing.

book

Article ID: 197826

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

We are unable to import a sample XML that we would then use to create XML's with synthetic data generator in the TDM portal.

Cause

The user provided in the connection string did not have permissions to create new Databases/Schemas

 

Environment

TDM portal 4.9.0.12

Resolution

From the TDMJobEngine.log engine we can see the following:
2020-08-21 14:54:18.697 UTC [INFO ] [schedulerFactoryBean_Worker-1] --- [U:][M:][P:] c.c.t.j.job.BaseJob: Job started with name: Test_File_5478 id: 431
2020-08-21 14:54:18.743 UTC [DEBUG] [schedulerFactoryBean_Worker-1] --- [U:][M:][P:] o.s.w.c.RestTemplate: HTTP POST https://<HOSTMNAME>:8443/TDMModelService/api/ca/v1/objects/5478/actions/derive
2020-08-21 14:54:18.743 UTC [DEBUG] [schedulerFactoryBean_Worker-1] --- [U:][M:][P:] o.s.w.c.RestTemplate: Accept=[application/json, application/*+json]
2020-08-21 14:54:18.743 UTC [DEBUG] [schedulerFactoryBean_Worker-1] --- [U:][M:][P:] o.s.w.c.RestTemplate: Writing [{profileName=[Share_Profiles_Admin TDM_Repository], allowUnqoutedControlChars=[false], allowNumericLeadingZeros=[false], duplicateTableSuffix=[], wsdlPortBinding=[], allowUnqoutedFieldNames=[false], cycleRecursionDepth=[2], allowSingleQoutes=[false], objectId=[5478], documentGroupId=[1], rootElementName=[], wsdlPortBindingNameSpace=[], allowBackSlashEscaping=[false], rrPairLinkId=[], wsdlOperation=[], allowComments=[false], reconcile=[false], async=[false], generateForiegnKeys=[true], versionId=[2432], tablePrefix=[sqa_], importObjectData=[true], allowNonNumericValues=[false], wsdlPortType=[], projectId=[2431]}] as "application/x-www-form-urlencoded"
2020-08-21 14:54:20.712 UTC [DEBUG] [schedulerFactoryBean_Worker-1] --- [U:][M:][P:] o.s.w.c.RestTemplate: Response 500 INTERNAL_SERVER_ERROR
2020-08-21 14:54:20.728 UTC [ERROR] [schedulerFactoryBean_Worker-1] --- [U:][M:][P:] c.c.t.j.j.DeriveJob: Unable to derive tables , error : Error executing initializing scripts for the project 'TestFile_5478'.

.......

2020-08-21 14:54:20.775 UTC [DEBUG] [schedulerFactoryBean_Worker-1] --- [U:][M:][P:] o.h.i.u.EntityPrinter: com.ca.tdm.jobengine.jpa.GtrepJobInformation{jobName=Test_File_5478, scheduledTime=2020-08-21 10:54:18.0, data={"rootElementName":"","generateForiegnKeys":"true","tablePrefix":"sqa_","cycleRecursionDepth":"2","wsdlOperation":"","wsdlPortType":"","wsdlPortBinding":"","wsdlPortBindingNameSpace":"","importObjectData":"true","documentGroupId":"1","rrPairLinkId":"","allowComments":"false","allowNonNumericValues":"false","allowNumericLeadingZeros":"false","allowBackSlashEscaping":"false","allowSingleQoutes":"false","allowUnqoutedControlChars":"false","allowUnqoutedFieldNames":"false","profileName":"Share_Profiles_Admin TDM_Repository","reconcile":"false","duplicateTableSuffix":"","projectId":"2431","versionId":"2432","objectId":"5478","async":"false","RefreshToken":"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBZG1pbmlzdHJhdG9yIiwiYXVkIjoiQUxMIiwiUFdEX0hBU0hfQ0xBSU0iOiIxNTM5MzAxNTg0IiwiSVNfQUNDRVNTX0tFWSI6InRydWUiLCJpc3MiOiJDQSBUZWNobm9sb2dpZXMiLCJVU0VSX0lEIjoiMSIsImV4cCI6MTU5ODEwODA1OCwiaWF0IjoxNTk4MDIxNjU4LCJBQ0NFU1NfUEVSTUlTU0lPTlMiOiJ7XCJBTExfUFJPSkVDVFNcIjpbMTAwXX0ifQ.F49UVp0-1DiaB24TH7-b8uyjvk11RtNQp5G5C0TG-DY"}, nextJobId=0, origin=modeling, creationDate=null, jobDesc=null, parentId=0, statusMessage=Error executing initializing scripts for the project 'GaryTestFile_5478'., jobId=431, versionId=2432, createdBy=Administrator, runningStatus=null, modifiedDate=null, modifiedBy=null, startTime=2020-08-21 10:54:18.697, endTime=2020-08-21 10:54:20.775, jobType=DERIVETABLES, artifactLocation=null, projectId=2431, email=null, statusUpdateTime=null, status=Failed}
2020-08-21 14:54:20.775 UTC [DEBUG] [schedulerFactoryBean_Worker-1] --- [U:][M:][P:] org.hibernate.SQL: update gtrep_job_information set artifact_location=?, created_by=?, creation_date=?, data=?, email=?, end_time=?, job_desc=?, job_name=?, job_type=?, modified_by=?, modified_date=?, next_job_id=?, origin=?, parent_id=?, project_id=?, running_status=?, scheduled_time=?, start_time=?, status=?, status_message=?, status_update_time=?, version_id=? where job_id=?
2020-08-21 14:54:20.775 UTC [DEBUG] [schedulerFactoryBean_Worker-1] --- [U:][M:][P:] o.s.o.j.JpaTransactionManager: Closing JPA EntityManager [SessionImpl(634112007)] after transaction
2020-08-21 14:54:20.775 UTC [DEBUG] [schedulerFactoryBean_Worker-1] --- [U:][M:][P:] o.s.o.j.EntityManagerFactoryUtils: Closing JPA EntityManager
2020-08-21 14:54:20.775 UTC [DEBUG] [schedulerFactoryBean_Worker-1] --- [U:][M:][P:] c.c.t.j.j.s.JobsSynchronizationManager: Status received for Job ........ GtrepJobInformation [jobId=431, jobName=Test_File_5478, jobType=DERIVETABLES, origin=modeling, status=Failed]



From the TDMModelService.log
2020-08-21 14:54:20.650 UTC [DEBUG] [https-openssl-nio-8443-exec-12] --- [U:Administrator][M:POST][P:/api/ca/v1/objects/5478/actions/derive] c.c.t.s.u.ProjectManager: creating database schema TestFile_5478
2020-08-21 14:54:20.650 UTC [ERROR] [https-openssl-nio-8443-exec-12] --- [U:Administrator][M:POST][P:/api/ca/v1/objects/5478/actions/derive] c.c.t.s.r.ShredderDataSource: SQL Error: Cannot find the user 'dbo', because it does not exist or you do not have permission.
2020-08-21 14:54:20.650 UTC [DEBUG] [https-openssl-nio-8443-exec-12] --- [U:Administrator][M:POST][P:/api/ca/v1/objects/5478/actions/derive] c.c.t.s.r.ShredderDataSource: Execute Command was EXEC AddSchema 'TestFile_5478'
com.microsoft.sqlserver.jdbc.SQLServerException: Cannot find the user 'dbo', because it does not exist or you do not have permission.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262)


By Default when adding an XML file the TDM portal will add a new database/schema with the name and Id given, in this case, TestFile_5478
The connection you are using is using a username and password that does not have permission to create a new schema.


Options:
Change permission for the user to allow database /Schema creation or change to a different user that has these permissions.