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
ClassNotFoundExceptionorNoClassDefFoundErrorreferencing 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.COSApiclass. - 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, orClientConfiguration.
Diagnosing The Problem
Check for deprecated COSAPI methods
| Deprecated Method | Impact |
|---|---|
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 v1 | SDK v2 |
|---|---|
List<S3ObjectSummary> | List<S3Object> |
summary.getKey() | summary.key() |
summary.getLastModified() | summary.lastModified() |
summary.getSize() | summary.size() |
Also note:
| SDK v1 | SDK v2 |
|---|---|
java.util.Date | java.time.Instant |
Verify system property configuration
| Property | Expected Value |
|---|---|
mxe.cosregion | Valid AWS region or IBM COS provisioning code |
mxe.coscrossregion | true when cross-region bucket access is required |
Resolving The Problem
Replace deprecated COSAPI methods
| Deprecated Method | Recommended 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
| Method | Purpose |
|---|---|
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
| Method | SDK v1 | SDK v2 |
|---|---|---|
setCOSClient() | AmazonS3Client | S3Client |
getS3Object() Return Type | S3Object | ResponseInputStream<GetObjectResponse> |
getS3ObjectContent() Parameter | S3Object | ResponseInputStream<GetObjectResponse> |
getS3ObjectMimeType() Parameter | S3Object | ResponseInputStream<GetObjectResponse> |
getClientConfigPooled() Return Type | ClientConfiguration | ClientOverrideConfiguration |
Retrieving MIME type using SDK v2
| Requirement | Resolution |
|---|---|
No replacement for getS3ObjectMimeType() | Cast the result from streamFile() to ResponseInputStream<GetObjectResponse> and retrieve the content type from the response metadata. |
| Exception Handling | streamFile() 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
| Property | Default | Description |
|---|---|---|
mxe.cosregion | us-east-1 | AWS region or IBM COS provisioning code used when building SDK v2 clients. |
mxe.coscrossregion | false | Set to true to allow access to buckets in regions different from the configured region. |
mxe.cosconnpoolsize | Not Set | Controls the maximum number of HTTP connections in the COS connection pool. |
Related Information
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"}]
Was this topic helpful?
Document Information
Modified date:
11 September 2026
UID
ibm17286944