S3 POJO Upload Fails with 'No such file or directory' when using Wildcards
search cancel

S3 POJO Upload Fails with 'No such file or directory' when using Wildcards

book

Article ID: 439279

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

An Autosys POJO job using the com.broadcom.pojo.s3.S3AWS class fails to upload files when a wildcard (e.g., *.pdf or *.*) is used in the s3.SourceFilePath parameter. The job fails immediately with a java.lang.reflect.InvocationTargetException and a JobFailedException indicating the file or directory does not exist.

Symptoms

  • The job status changes to FAILURE.
  • The standard out/error logs contain the following messages:
    2026-04-23T14:00:52.643-04:00: Job Failed: /mnt/path/to/files/*.pdf (No such file or directory)Execution of upload has failedjava.lang.reflect.InvocationTargetException: nullCaused by: com.broadcom.automation.integrations.plugin.exception.JobFailedException: /mnt/path/to/files/*.pdf (No such file or directory)

Environment

  • Autosys Workload Automation
  • Workload Automation Agent 
  • Amazon S3 POJO Plugin

Cause

The S3 POJO upload method is designed for single object uploads and does not support native OS wildcard expansion (globbing) within the s3.SourceFilePath parameter. When a literal asterisk (*) is used without enabling Regular Expressions, the plugin searches for a file with that literal name rather than treating it as a pattern.

Resolution

To upload multiple files or use pattern matching, you must enable Regular Expressions and use Java-compatible RegEx syntax in the job definition.

Step-by-Step Instructions

  • Modify the POJO job definition (JIL) to include the s3.UseRegex parameter.
  • Update the s3.SourceFilePath to use a valid Regular Expression pattern.

JIL Example:

insert_job: POJO_TEST_UPLOAD_JOB
job_type: POJO
machine: **
owner: ***
permission: 
date_conditions: 0
alarm_if_fail: 1
alarm_if_terminated: 1
method_name: upload
j2ee_parameter: s3.Endpoint=https\://your_endpoint_url.com
j2ee_parameter: s3.AccessKey=$$sec_profile^s3@imanage_dev@<k>accesskey</k>
j2ee_parameter: s3.AccessKeySecret=$$sec_profile^s3@your_security_profile@<k>accesskeysecret</k>
j2ee_parameter: s3.Region=ca-central-1
j2ee_parameter: s3.SourceFilePath=/mnt/path/to/your/files/.*\.pdf
j2ee_parameter: s3.UseRegex=true
j2ee_parameter: s3.DestinationBucketName=your-destination-bucket-name
j2ee_parameter: s3.DestinationFilePath=your-destination-file-path
j2ee_parameter: s3.ProxyHostname=""
j2ee_parameter: s3.ProxyPort=""
j2ee_parameter: s3.ProxyUser=""
j2ee_parameter: s3.ProxyPassword=""
j2ee_parameter: s3.FailureInterval=3
j2ee_parameter: s3.SleepInterval=2
j2ee_parameter: s3.LogLevel=8
class_name: com.broadcom.pojo.s3.S3AWS

Key Parameter Details:

  • s3.UseRegex=true: This instructs the plugin to interpret the source file path as a Regular Expression.
  • s3.SourceFilePath: Ensure the pattern correctly matches the desired files.Example for all PDFs: .*/.*\.pdf or the full path followed by .*\.pdf.

Notes:

  • Use .* for any character match (equivalent to OS *).
  • The S3 POJO plugin currently does not support recursive directory uploads. Only files within the specified directory matching the pattern will be processed.