From ff357e728ba9dd1f22e9ceea3ef7cd22b5de0ff0 Mon Sep 17 00:00:00 2001 From: Enrico Ottonello Date: Wed, 29 Jan 2020 16:43:25 +0100 Subject: [PATCH] modified context properties name because of update to springboot 2.1.3 --- .../java/eu/dnetlib/ariadneplus/graphdb/GraphDBClient.java | 4 ++++ .../src/main/resources/application.properties | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/graphdb/GraphDBClient.java b/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/graphdb/GraphDBClient.java index 0923ff2..16a83ba 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/graphdb/GraphDBClient.java +++ b/dnet-ariadneplus-graphdb-publisher/src/main/java/eu/dnetlib/ariadneplus/graphdb/GraphDBClient.java @@ -65,6 +65,7 @@ public class GraphDBClient { RemoteRepositoryManager manager = new RemoteRepositoryManager(this.graphDBServerUrl); manager.init(); manager.setUsernameAndPassword(getWriterUser(), getWriterPwd()); + log.debug("get manager for GraphDB Repository " + getRepository()); Repository repository = manager.getRepository(getRepository()); ValueFactory factory = repository.getValueFactory(); String datasourceApi = recordParserHelper.getDatasourceApi(record); @@ -246,6 +247,9 @@ public class GraphDBClient { manager.init(); manager.setUsernameAndPassword(getWriterUser(), getWriterPwd()); Repository repository = manager.getRepository(getRepository()); + if (repository==null) { + throw new AriadnePlusPublisherException("GraphDB repository not found"); + } ValueFactory factory = repository.getValueFactory(); IRI HAS_NUM_PARTITIONS = factory.createIRI("http://www.d-net.research-infrastructures.eu/provenance/num_partitions"); IRI rApi = factory.createIRI(getGraphDBBaseURI(), datasourceApi); diff --git a/dnet-ariadneplus-graphdb-publisher/src/main/resources/application.properties b/dnet-ariadneplus-graphdb-publisher/src/main/resources/application.properties index 43e9c37..e367fe5 100644 --- a/dnet-ariadneplus-graphdb-publisher/src/main/resources/application.properties +++ b/dnet-ariadneplus-graphdb-publisher/src/main/resources/application.properties @@ -1,4 +1,6 @@ -server.contextPath=/ariadneplus-graphdb +#server.contextPath=/ariadneplus-graphdb +#update due to springboot 2.1.3 +server.servlet.context-path=/ariadneplus-graphdb server.port=8281 graphdb.serverUrl=http://localhost:7200/