SFTP job Error: Could not find or load main class
search cancel

SFTP job Error: Could not find or load main class


Article ID: 258428


Updated On:


CA Workload Automation DE - Business Agents (dSeries)


While running an SFTP job we are getting the following error:

Error: Could not find or load main class 12.1.jars.ext.bcprov-ext-jdk15on.jar:.app.data.CA.WA_Agent.12.1.jars.ext.sinetfactory.jar:.app.data.CA.WA_Agent.12.1.jars.ext.jackson-annotations.jar:.app.data.CA.WA_Agent.12.1.jars.ext.mail.jar:.app.data.CA.WA_Agent.12.1.jars.ext.jackson-core.jar:.app.data.CA.WA_Agent.12.1.jars.ext.jackson-databind.jar:.app.data.CA.WA_Agent.12.1.jars.ext.commons-cli.jar:.app.data.CA.WA_Agent.12.1.jars.ext.xercesImpl.jar:.app.data.CA.WA_Agent.12.1.jars.ext.wsdl4j.jar:.app.data.CA.WA_Agent.12.1.jars.ext.slf4j-api.jar:.app.data.CA.WA_Agent.12.1.jars.ext.serializer.jar:.app.data.CA.WA_Agent.12.1.jars.ext.resolver.jar:.app.data.CA.WA_Agent.12.1.jars.ext.qname.jar:.app.data.CA.WA_Agent.12.1.jars.ext.json-smart.jar:.


Release : 12.1


The objective of the job was to transfer the file from a remote server to the local server and have it owned by a user other than the user that starts the agent. This error was experienced when we attempt to specify the desired owner of the local file by using this username in the "Run as user" field. 


Please use the following documentation for guidance configuring an SFTP job: Define an SFTP Job

The owner of the file, on the local machine (where the file is being transferred to) can be set by either:

  • Setting the user through the "Local user" field in the job; or
  • Setting the ftp.download.owner parameter in the agent's agentparm.txt file


If you make a change to the agentparm.txt file, please do a full stop of the agent and then restart it. Restarting the agent will not be sufficient. Restarting the agent will still result in the owner of the file being represented as the user that runs the agent.