diff --git a/src/org/gcube/informationsystem/collector/impl/xmlstorage/exist/State.java b/src/org/gcube/informationsystem/collector/impl/xmlstorage/exist/State.java index b649fe3..97fcecc 100755 --- a/src/org/gcube/informationsystem/collector/impl/xmlstorage/exist/State.java +++ b/src/org/gcube/informationsystem/collector/impl/xmlstorage/exist/State.java @@ -3,6 +3,7 @@ package org.gcube.informationsystem.collector.impl.xmlstorage.exist; import org.gcube.common.core.utils.logging.GCUBELog; import org.gcube.informationsystem.collector.impl.contexts.ICServiceContext; import org.gcube.informationsystem.collector.impl.xmlstorage.exist.XMLStorage.STATUS; +import org.gcube.informationsystem.collector.impl.xmlstorage.exist.XMLStorage.XMLStorageNotAvailableException; import org.gcube.informationsystem.collector.impl.resources.GCUBEInstanceStateResource; import org.gcube.informationsystem.collector.impl.resources.GCUBEXMLResource; @@ -59,7 +60,11 @@ public class State { if (Boolean.valueOf((String) ICServiceContext.getContext().getProperty("deleteRPsOnStartup", true))) { // cleanup the RPs collection logger.info("Deleting all RPs..."); - State.dataManager.deleteCollection(new GCUBEInstanceStateResource().getCollectionName()); + try { + State.dataManager.deleteCollection(new GCUBEInstanceStateResource().getCollectionName()); + } catch (XMLStorageNotAvailableException e) { + logger.warn("Unable to delete the properties's collection"); + } } else { logger.info("All RPs previously stored are kept in the storage"); } diff --git a/src/org/gcube/informationsystem/collector/stubs/testsuite/wsdaix/AddDocumentsTester.java b/src/org/gcube/informationsystem/collector/stubs/testsuite/wsdaix/AddDocumentsTester.java index 7217254..d25b9e0 100644 --- a/src/org/gcube/informationsystem/collector/stubs/testsuite/wsdaix/AddDocumentsTester.java +++ b/src/org/gcube/informationsystem/collector/stubs/testsuite/wsdaix/AddDocumentsTester.java @@ -54,7 +54,7 @@ public class AddDocumentsTester { try { AddDocumentsResponse r = addDocuments(portTypeURI,GCUBEScope.getScope(args[2]), new org.apache.axis.types.URI ("gcube://testResourceName"), - new org.apache.axis.types.URI(args[6]), args[5], + new org.apache.axis.types.URI("gcube://InstanceState"), args[5], new String[] { args[3] }, new Document[] {TestDocuments.loadDocument(args[4])} ); logger.info("Number of response wrappers "+ r.getAddDocumentResponseWrapper().length ); @@ -66,7 +66,7 @@ public class AddDocumentsTester { } } } catch (Exception e ) { - logger.error(e.toString()); + logger.error("",e); } }