If you run into this error, review your TDMPublish.log that is located in your log folder for the TDM Portal, you should find an error similar to the one below. In this case it's an execsqlcount expression from a variable that caused this issue.
com.ca.tdm.servicecommon.TDMServiceException: resolve_meta_data_item: TDMServiceException: execsqlcount: TDMServiceException: PublishEngine : CreateConnectionFromProfile : Error in fetching connection profile information
Go through each of your variables for a data painter SQL function that showed up in your error.
Once you find the variable(s) that is causing the issue, you will need to address the problem by:
a) Making the connection profile global to all users and jobs.
b) Re-evaluate the variable to see if this is the most appropriate place for it, or if its not used, remove the variable.
Once you have addressed the issue with the variable, you should no longer see the error.