@@ -1106,12 +1106,22 @@ private static AmazonS3 getClient(String driverId) {
1106
1106
String s3CERegion = System .getProperty ("dataverse.files." + driverId + ".custom-endpoint-region" , "dataverse" );
1107
1107
1108
1108
// if the admin has set a system property (see below) we use this endpoint URL instead of the standard ones.
1109
- if (!s3CEUrl .isEmpty ()) {
1110
- //s3CB.setEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(s3CEUrl, s3CERegion));
1111
- BasicAWSCredentials creds = new BasicAWSCredentials ("14e4f8b986874272894d527a16c06473" , "f7b28fbec4984588b0da7d0288ce67f6" );
1112
- s3CB .withCredentials (new AWSStaticCredentialsProvider (creds ));
1113
- s3CB .setEndpointConfiguration (new AwsClientBuilder .EndpointConfiguration (s3CEUrl .trim (), s3CERegion .trim ()));
1114
- }
1109
+ if (!s3CEUrl .isEmpty ()) {
1110
+ logger .info ("s3CEURL =============== " + s3CEUrl );
1111
+ logger .info ("s3CERegion =============== " + s3CERegion );
1112
+ try {
1113
+ s3CB .setEndpointConfiguration (new AwsClientBuilder .EndpointConfiguration (s3CEUrl , s3CERegion ));
1114
+ logger .info (" ==================== Successfully connected ================== " );
1115
+ }
1116
+ catch (Exception e ) {
1117
+ logger .info (" ==================== Read the exception ================== " );
1118
+ e .printStackTrace ();
1119
+ //BasicAWSCredentials creds = new BasicAWSCredentials("14e4f8b986874272894d527a16c06473", "f7b28fbec4984588b0da7d0288ce67f6");
1120
+ //s3CB.withCredentials(new AWSStaticCredentialsProvider(creds));
1121
+ //s3CB.setEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(s3CEUrl.trim(), s3CERegion.trim()));
1122
+ logger .info (" ==================== Read the exception ================== " );
1123
+ }
1124
+ }
1115
1125
/**
1116
1126
* Pass in a boolean value if path style access should be used within the S3 client.
1117
1127
* Anything but case-insensitive "true" will lead to value of false, which is default value, too.
0 commit comments