Skip to content

Commit

Permalink
Merge pull request #200 from Esri/f/ImproveJDBCErrorMessage
Browse files Browse the repository at this point in the history
2.7.0 and Exception Message improvement
  • Loading branch information
mhogeweg committed May 20, 2023
2 parents 746feda + 1432436 commit d10e066
Show file tree
Hide file tree
Showing 64 changed files with 148 additions and 130 deletions.
2 changes: 1 addition & 1 deletion geoportal-SDK/geoportal-harvester-api-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-SDK</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>harvester-api-base</artifactId>
<name>Esri :: Geoportal Server :: Harvester :: Api Base</name>
Expand Down
4 changes: 2 additions & 2 deletions geoportal-SDK/geoportal-harvester-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<parent>
<artifactId>geoportal-SDK</artifactId>
<groupId>com.esri.geoportal</groupId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>harvester-api</artifactId>
<name>Esri :: Geoportal Server :: Harvester :: Api</name>
<description>Definitions of all basic elements of the Harvester (interfaces, final classes, etc.).</description>
<version>2.6.5</version>
<version>2.7.0</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-SDK/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>geoportal-harvester</artifactId>
<groupId>com.esri.geoportal</groupId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-SDK</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-application/geoportal-harvester-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-application</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-harvester-cli</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-application/geoportal-harvester-engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>geoportal-application</artifactId>
<groupId>com.esri.geoportal</groupId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-harvester-engine</artifactId>
<name>Esri :: Geoportal Server :: Harvester :: Application :: Engine</name>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-application/geoportal-harvester-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>geoportal-application</artifactId>
<groupId>com.esri.geoportal</groupId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-harvester-war</artifactId>
<packaging>war</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<div class="h-header-container">
<div data-dojo-type="hrv/ui/main/Header"></div>
<div data-dojo-type="hrv/ui/main/Nav"></div>
<div class="h-version">Ver. 2.6.5</div>
<div class="h-version">Ver. 2.7.0</div>
</div>
</div>
<div class="h-stage-layout">
<div data-dojo-type="hrv/ui/main/Status"></div>
<div data-dojo-type="hrv/ui/main/Stage"></div>
</div>
<div class="h-stage-footer">© Harvester 2020</div>
<div class="h-stage-footer">© Harvester 2023</div>
</div>
</div>
2 changes: 1 addition & 1 deletion geoportal-application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>geoportal-harvester</artifactId>
<groupId>com.esri.geoportal</groupId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-application</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-agp-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-commons</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-commons-agp-client</artifactId>
<name>Esri :: Geoportal Server :: Commons :: ArcGIS Portal Client</name>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-ags-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-commons</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-commons-ags-client</artifactId>
<name>Esri :: Geoportal Server :: Commons :: ArcGIS Server Client</name>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-ckan-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-commons</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-commons-ckan-client</artifactId>
<name>Esri :: Geoportal Server :: Commons :: CKAN Lightweight Client</name>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-constants/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-commons</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-commons-constants</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-csw-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-commons</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-commons-csw-client</artifactId>
<name>Esri :: Geoportal Server :: Commons :: Csw Client</name>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-dcat-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-commons</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-commons-dcat-client</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-doc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>geoportal-commons</artifactId>
<groupId>com.esri.geoportal</groupId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-commons-doc</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-geometry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-commons</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-commons-geometry</artifactId>
<name>Esri :: Geoportal Server :: Commons :: Geometry Utils</name>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-gpt-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-commons</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-commons-gpt-client</artifactId>
<name>Esri :: Geoportal Server :: Commons :: Geoportal Rest Client</name>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-meta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-commons</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-commons-meta</artifactId>
<name>Esri :: Geoportal Server :: Commons :: Meta</name>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-oai-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-commons</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-commons-oai-client</artifactId>
<name>Esri :: Geoportal Server :: Commons :: OAI-PMH Client</name>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-pdf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>geoportal-commons</artifactId>
<groupId>com.esri.geoportal</groupId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-commons-pdf</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-robots/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-commons</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>commons-robots</artifactId>
<name>Esri :: Geoportal Server :: Commons :: Robots</name>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-stac-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-commons</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-commons-stac-client</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-thredds-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-commons</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-commons-thredds-client</artifactId>
<name>Esri :: Geoportal Server :: Commons :: THREDDS Client</name>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/geoportal-commons-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-commons</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>commons-utils</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>geoportal-harvester</artifactId>
<groupId>com.esri.geoportal</groupId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-commons</artifactId>
<packaging>pom</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-connectors</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-harvester-agp-publisher</artifactId>
<name>Esri :: Geoportal Server :: Harvester :: Data Publisher :: ArcGIS Portal</name>
Expand All @@ -14,7 +14,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>geoportal-commons-agp-client</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
<type>jar</type>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ public PublishingStatus publish(DataReference ref) throws DataOutputException {
}

} catch (MetaException | IOException | ParserConfigurationException | SAXException | URISyntaxException ex) {
throw new DataOutputException(this, ref, String.format("Error publishing data: %s", ref), ex);
throw new DataOutputException(this, ref, String.format("Error publishing data: %s Exception: "+ex, ref), ex);
} finally {
if (fileToUpload!=null && deleteTempFile) {
fileToUpload.delete();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-connectors</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-harvester-agp-source</artifactId>
<name>Esri :: Geoportal Server :: Harvester :: Data Source :: ArcGIS Portal</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public void initialize(InitContext context) throws DataProcessorException {
definition.setGroupId(null);
}
} catch (IOException|URISyntaxException ex) {
throw new DataProcessorException(String.format("Error listing folders for user: %s", definition.getCredentials().getUserName()), ex);
throw new DataProcessorException(String.format("Error listing folders for user: %s Exception: "+ex, definition.getCredentials().getUserName()), ex);
}
}

Expand All @@ -200,7 +200,7 @@ public DataContent readContent(String id) throws DataInputException {
ref.addContext(MimeType.APPLICATION_JSON, mapper.writeValueAsString(itemEntry).getBytes("UTF-8"));
return ref;
} catch (IOException|URISyntaxException ex) {
throw new DataInputException(this, String.format("Error reading data from: %s", id), ex);
throw new DataInputException(this, String.format("Error reading data from: %s Exception: "+ex, id), ex);
}
}

Expand Down Expand Up @@ -286,7 +286,7 @@ public boolean hasNext() throws DataInputException {
iter = list.iterator();
} catch (IOException|URISyntaxException ex) {
done = true;
throw new DataInputException(AgpInputBroker.this, String.format("Error reading content."), ex);
throw new DataInputException(AgpInputBroker.this, String.format("Error reading content. Exception: "+ex), ex);
}
}
if (iter!=null && !iter.hasNext()) {
Expand All @@ -311,7 +311,7 @@ public DataReference next() throws DataInputException {
}
return createReference(nextEntry);
} catch (MetaException|TransformerException|URISyntaxException|IOException ex) {
throw new DataInputException(AgpInputBroker.this, String.format("Error reading next data reference."), ex);
throw new DataInputException(AgpInputBroker.this, String.format("Error reading next data reference. Exception: "+ex), ex);
}
}

Expand Down
2 changes: 1 addition & 1 deletion geoportal-connectors/geoportal-harvester-ags/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-connectors</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-harvester-ags</artifactId>
<name>Esri :: Geoportal Server :: Harvester :: Data Source :: ArcGIS Server</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.gson.JsonObject;
import java.net.URL;
import java.util.Arrays;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -160,7 +159,7 @@ public Iterator iterator(IteratorContext iteratorContext) throws DataInputExcept
List<ServerResponse> responses = listResponses(null);
return new AgsIterator(responses.iterator());
} catch (URISyntaxException | IOException ex) {
throw new DataInputException(this, String.format("Error listing server content."), ex);
throw new DataInputException(this, String.format("Error listing server content. Exception: "+ex), ex);
}
}

Expand Down Expand Up @@ -224,7 +223,7 @@ public DataContent readContent(String id) throws DataInputException {
ref.addContext(MimeType.APPLICATION_JSON, serverResponse.json.getBytes("UTF-8"));
return ref;
} catch (IOException | URISyntaxException ex) {
throw new DataInputException(this, String.format("Error reading data %s", id), ex);
throw new DataInputException(this, String.format("Error reading data %s Exception: "+ex, id), ex);
}
}

Expand Down Expand Up @@ -391,7 +390,7 @@ public DataReference next() throws DataInputException {
ServerResponse serverResponse = iterator.next();
return createReference(serverResponse);
} catch (TransformerException | TransformerFactoryConfigurationError | IOException | URISyntaxException | MetaException ex) {
throw new DataInputException(AgsBroker.this, String.format("Error creating data reference for ArcGIS Server service"), ex);
throw new DataInputException(AgsBroker.this, String.format("Error creating data reference for ArcGIS Server service Exception: "+ex), ex);
}
}

Expand Down
2 changes: 1 addition & 1 deletion geoportal-connectors/geoportal-harvester-ckan/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-connectors</artifactId>
<version>2.6.5</version>
<version>2.7.0</version>
</parent>
<artifactId>geoportal-harvester-ckan</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ protected Content createContent(Dataset dataSet) throws DataInputException {

return new Content(XmlUtils.toString(document), MimeType.APPLICATION_XML, new MapAttribute(attrs));
} catch (MetaException | TransformerException ex) {
throw new DataInputException(CkanBroker.this, String.format("Error reading data from: %s", this), ex);
throw new DataInputException(CkanBroker.this, String.format("Error reading data from: %s Exception: "+ex, this), ex);
}
}

Expand Down Expand Up @@ -243,7 +243,7 @@ public DataContent readContent(String id) throws DataInputException {

return ref;
} catch (IOException | URISyntaxException ex) {
throw new DataInputException(this, String.format("Error reading data from: %s", id), ex);
throw new DataInputException(this, String.format("Error reading data from: %s Exception: "+ex, id), ex);
}
}

Expand Down Expand Up @@ -393,7 +393,7 @@ public boolean hasNext() throws DataInputException {

return hasNext();
} catch (IOException | URISyntaxException ex) {
throw new DataInputException(CkanBroker.this, String.format("Error reading data from: %s", this), ex);
throw new DataInputException(CkanBroker.this, String.format("Error reading data from: %s Exception: "+ex, this), ex);
}
}

Expand All @@ -405,7 +405,7 @@ public DataReference next() throws DataInputException {
return createReference(dataSet);

} catch (URISyntaxException | UnsupportedEncodingException | IllegalArgumentException | JsonProcessingException ex) {
throw new DataInputException(CkanBroker.this, String.format("Error reading data from: %s", this), ex);
throw new DataInputException(CkanBroker.this, String.format("Error reading data from: %s Exception: "+ex, this), ex);
}
}
}
Expand Down
Loading

0 comments on commit d10e066

Please sign in to comment.