IBM Support

AWS SDK v2 Migration Causes ClassNotFoundException and Method Signature Failures in IBM Maximo Applcation Suite Manage COSAPI Automation Scripts

Troubleshooting


Problem

After upgrading to a release that includes the AWS SDK v1 to AWS SDK v2 migration, automation scripts that use the com.ibm.tivoli.maximo.cos.COSApi class may fail to compile or execute correctly. This issue affects scripts that interact with Cloud Object Storage (AWS S3 or IBM COS) through the COSAPI APIs. Scripts that rely on deprecated methods or AWS SDK v1 classes require updates to remain compatible with the new SDK v2 implementation.

Symptom

After the upgrade, users may observe one or more of the following symptoms:

  • Automation scripts fail with ClassNotFoundException or NoClassDefFoundError referencing AWS SDK v1 classes.
  • Script compilation failures due to changes in method signatures, parameter types, or return types.
  • Existing calls to deprecated COSApi methods no longer function as expected.
  • Errors when retrieving file content, MIME types, or S3 objects.
  • Failures while processing results returned by getAllS3ObjectsSortedByTime().
  • Cloud Object Storage connection failures caused by incorrect or missing region configuration.
  • Access issues when connecting to buckets located in a region different from the configured COS region.

Cause

The issue occurs because Maximo Application Suite has migrated from AWS SDK v1 to AWS SDK v2. As part of this migration:

  • Several COSAPI methods have been marked as deprecated and are planned for removal in a future release.
  • Method parameter types and return types have changed.
  • AWS SDK v1 classes have been replaced by AWS SDK v2 equivalents.
  • Additional system properties are required to support SDK v2 configuration and connectivity.

Automation scripts that continue to use SDK v1 APIs or deprecated COSAPI methods must be updated to align with the new SDK v2 implementation.

Environment

This issue applies to:

  • Maximo Manage environments using Cloud Object Storage integrations.
  • Automation scripts that directly use the com.ibm.tivoli.maximo.cos.COSApi class.
  • Environments upgraded to a release containing the AWS SDK v1 to AWS SDK v2 migration.
  • Scripts that reference AWS SDK v1 classes such as S3Object, S3ObjectSummary, AmazonS3Client, or ClientConfiguration.

Diagnosing The Problem

Check for deprecated COSAPI methods

Deprecated MethodImpact
getS3Object(String bucketName, String fileName)Deprecated and scheduled for removal.
getS3ObjectContent(...)Deprecated and scheduled for removal.
getS3ObjectMimeType(...)Deprecated and scheduled for removal.
getClientConfigPooled()Deprecated and scheduled for removal.

Check for AWS SDK v1 references

Search automation scripts for the following imports:

AWS SDK v1 Class
com.amazonaws.services.s3.AmazonS3Client
com.amazonaws.services.s3.model.S3Object
com.amazonaws.services.s3.model.S3ObjectSummary
com.amazonaws.ClientConfiguration

These classes are no longer compatible with SDK v2-based COSApi implementations.

Check getAllS3ObjectsSortedByTime() Usage

SDK v1SDK v2
List<S3ObjectSummary>List<S3Object>
summary.getKey()summary.key()
summary.getLastModified()summary.lastModified()
summary.getSize()summary.size()

Also note:

SDK v1SDK v2
java.util.Datejava.time.Instant

Verify system property configuration

PropertyExpected Value
mxe.cosregionValid AWS region or IBM COS provisioning code
mxe.coscrossregiontrue when cross-region bucket access is required

 

 

Resolving The Problem

Replace deprecated COSAPI methods

Deprecated MethodRecommended Action
getS3Object(String bucketName, String fileName)Use getFile() or streamFile()
getS3ObjectContent()Use getFile()
getS3ObjectMimeType()Use streamFile() and retrieve MIME type from the SDK v2 response object
getClientConfigPooled()Configure mxe.cosconnpoolsize system property

Recommended replacements

MethodPurpose
byte[] getFile(String bucketName, String fileName)Returns complete file contents as a byte array
InputStream streamFile(String bucketName, String fileName)Returns file content as an InputStream

Method signature changes

MethodSDK v1SDK v2
setCOSClient()AmazonS3ClientS3Client
getS3Object() Return TypeS3ObjectResponseInputStream<GetObjectResponse>
getS3ObjectContent() ParameterS3ObjectResponseInputStream<GetObjectResponse>
getS3ObjectMimeType() ParameterS3ObjectResponseInputStream<GetObjectResponse>
getClientConfigPooled() Return TypeClientConfigurationClientOverrideConfiguration

Retrieving MIME type using SDK v2

RequirementResolution
No replacement for getS3ObjectMimeType()Cast the result from streamFile() to ResponseInputStream<GetObjectResponse> and retrieve the content type from the response metadata.
Exception HandlingstreamFile() throws IOException and must be handled by the automation script.

Example:

InputStream stream = cosApi.streamFile(bucketName, fileName);

String mimeType =
((ResponseInputStream<GetObjectResponse>) stream)
        .response()
        .contentType();

 

Configure required system properties

PropertyDefaultDescription
mxe.cosregionus-east-1AWS region or IBM COS provisioning code used when building SDK v2 clients.
mxe.coscrossregionfalseSet to true to allow access to buckets in regions different from the configured region.
mxe.cosconnpoolsizeNot SetControls the maximum number of HTTP connections in the COS connection pool.

 

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSRHPA","label":"IBM Maximo Application Suite"},"ARM Category":[{"code":"a8m3p000000hAeaAAE","label":"Maximo Application Suite-\u003EMAS Applications-\u003EManage"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"and future releases;8.11.0;9.0.0;9.1.0;9.2.0"}]

Document Information

Modified date:
11 September 2026

UID

ibm17286944