diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4e3030c..720ac82 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,8 @@
# Changelog for storage-manager-wrapper
+## [v2.6.1-SNAPSHOT] 2021-08-04
+* bug fix #20505
+
## [v2.6.0-SNAPSHOT] 2020-11-12
* adding new constructor with the backendType as input parameter
diff --git a/pom.xml b/pom.xml
index 95c0ce6..2bb3245 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
org.gcube.contentmanagement
storage-manager-wrapper
- 2.6.0-SNAPSHOT
+ 2.6.1-SNAPSHOT
scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git
scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git
diff --git a/src/main/java/org/gcube/contentmanager/storageclient/wrapper/ISClientConnector.java b/src/main/java/org/gcube/contentmanager/storageclient/wrapper/ISClientConnector.java
index 1625ce2..96395d2 100644
--- a/src/main/java/org/gcube/contentmanager/storageclient/wrapper/ISClientConnector.java
+++ b/src/main/java/org/gcube/contentmanager/storageclient/wrapper/ISClientConnector.java
@@ -63,7 +63,7 @@ public class ISClientConnector {
ScopeProvider.instance.set(scope);
}
SimpleQuery query = queryFor(ServiceEndpoint.class);
- query.addCondition("$resource/Profile/Category/text() eq 'DataStorage' and $resource/Profile/Name eq 'StorageManager' ");
+ query.addCondition("$resource/Profile/Category/text() eq 'Storage' and $resource/Profile/Name eq 'StorageManager' ");
DiscoveryClient client = clientFor(ServiceEndpoint.class);
List resources = client.submit(query);
if(scope!=null){
@@ -85,11 +85,13 @@ public class ISClientConnector {
private String[] fillConnectionFields(ServiceEndpoint resource) {
if(resource!=null){
- String [] server=new String[resource.profile().accessPoints().size()];
+ ArrayList srvs=new ArrayList ();
+// String [] server=new String[resource.profile().accessPoints().size()];
int i=0;
for (AccessPoint ap:resource.profile().accessPoints()) {
if (ap.name().equals("server"+(i+1))) {
- server[i] = ap.address();
+// server[i] = ap.address();
+ srvs.add(ap.address());
// if presents, try to get user and password
setUsername(ap.username());
// set password default value to empty string
@@ -105,6 +107,8 @@ public class ISClientConnector {
i++;
}
}
+ String [] server=new String[srvs.size()];
+ server = srvs.toArray(server);
setBackendType(retrievePropertyValue(resource, "type"));
String [] volatileHost= new String [1];
volatileHost[0]=retrievePropertyValue(resource, "volatile");