Fixes #24235
This commit is contained in:
parent
de8ed2a811
commit
e3960d3d7e
|
@ -21,7 +21,9 @@ import org.gcube.application.geoportal.common.model.document.filesets.sdi.GeoSer
|
||||||
import org.gcube.application.geoportal.common.model.document.filesets.sdi.PlatformInfo;
|
import org.gcube.application.geoportal.common.model.document.filesets.sdi.PlatformInfo;
|
||||||
import org.gcube.application.geoportal.common.model.rest.DatabaseConnection;
|
import org.gcube.application.geoportal.common.model.rest.DatabaseConnection;
|
||||||
import org.gcube.application.geoportal.common.utils.Files;
|
import org.gcube.application.geoportal.common.utils.Files;
|
||||||
|
import org.gcube.data.transfer.library.DataTransferClient;
|
||||||
import org.gcube.data.transfer.library.TransferResult;
|
import org.gcube.data.transfer.library.TransferResult;
|
||||||
|
import org.gcube.data.transfer.library.client.Client;
|
||||||
import org.gcube.data.transfer.library.faults.*;
|
import org.gcube.data.transfer.library.faults.*;
|
||||||
import org.gcube.data.transfer.model.Destination;
|
import org.gcube.data.transfer.model.Destination;
|
||||||
import org.gcube.data.transfer.model.DestinationClashPolicy;
|
import org.gcube.data.transfer.model.DestinationClashPolicy;
|
||||||
|
@ -259,9 +261,15 @@ public class SDIManagerWrapper extends SDIManager{
|
||||||
|
|
||||||
// remove actual files data
|
// remove actual files data
|
||||||
// TODO REMOVE HARDCODED PATCH
|
// TODO REMOVE HARDCODED PATCH
|
||||||
String path=gsInfo.getPersistencePath().replace("/srv/geoserver_data","geoserver");
|
String path="geoserver/"+gsInfo.getPersistencePath();
|
||||||
log.info("Deleting files at {} [{}]",path,gsInfo.getPersistencePath());
|
log.info("Deleting files at {}@{}",path,getGeoserverHostName());
|
||||||
getDtGeoServer().getWebClient().delete(path);
|
try{
|
||||||
|
Client dtClient = new Client("https://"+getGeoserverHostName());
|
||||||
|
dtClient.delete(path);
|
||||||
|
// getDtGeoServer().getWebClient().delete("geoserver/"+path);
|
||||||
|
}catch(Exception e){
|
||||||
|
throw new Exception("Data Transfer ERROR. Unable to delete files at "+getGeoserverHostName()+" PATH "+path,e);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -273,7 +281,7 @@ public class SDIManagerWrapper extends SDIManager{
|
||||||
}catch(SDIInteractionException e){
|
}catch(SDIInteractionException e){
|
||||||
throw e;
|
throw e;
|
||||||
}catch (Throwable t){
|
}catch (Throwable t){
|
||||||
throw new SDIInteractionException("Unexpected exception while trying to materialize File Set "+t.getMessage(),t);
|
throw new SDIInteractionException("Unexpected exception while trying to delete Layer : "+t.getMessage(),t);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,7 +196,7 @@ public class SDIMaterializerPlugin extends AbstractPlugin implements Materializa
|
||||||
|
|
||||||
}
|
}
|
||||||
// Resetting Document
|
// Resetting Document
|
||||||
report.setResultingDocument(Serialization.asDocument(wrapper.getValueCTX().jsonString()));
|
report.setResultingDocument(Document.parse(wrapper.getValueCTX().jsonString()));
|
||||||
}catch (SDIInteractionException e){
|
}catch (SDIInteractionException e){
|
||||||
log.error("Unable to materialize "+request,e);
|
log.error("Unable to materialize "+request,e);
|
||||||
report.setStatus(Report.Status.ERROR);
|
report.setStatus(Report.Status.ERROR);
|
||||||
|
|
Loading…
Reference in New Issue