diff --git a/docker/pic-sure-hpds/Dockerfile b/docker/pic-sure-hpds/Dockerfile index 0b38a4de..1d1f395f 100644 --- a/docker/pic-sure-hpds/Dockerfile +++ b/docker/pic-sure-hpds/Dockerfile @@ -1,11 +1,2 @@ -FROM docker.io/alpine:3.16 - -RUN apk add --no-cache --purge -uU bash && rm -rf /var/cache/apk/* /tmp/* - -RUN apk add --no-cache --purge -uU curl wget unzip - -RUN apk add --no-cache --purge openjdk11 - -ADD hpds-war-1.0-SNAPSHOT-war-exec.jar /hpds.jar - -EXPOSE 8080 +FROM tomcat:9-jre11-openjdk-slim +ADD hpds-war-1.0-SNAPSHOT.war /usr/local/tomcat/webapps/ROOT.war \ No newline at end of file diff --git a/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/PicSureService.java b/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/PicSureService.java index 58b81399..12287521 100644 --- a/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/PicSureService.java +++ b/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/PicSureService.java @@ -225,8 +225,8 @@ private QueryStatus convertToQueryStatus(AsyncResult entity) { @Path("/query/{resourceQueryId}/result") @Produces(MediaType.TEXT_PLAIN_VALUE) @Override - public Response queryResult(@PathParam("resourceQueryId") String queryId, QueryRequest resultRequest) { - AsyncResult result = queryService.getResultFor(queryId); + public Response queryResult(@PathParam("resourceQueryId") UUID queryId, QueryRequest resultRequest) { + AsyncResult result = queryService.getResultFor(queryId.toString()); if (result == null) { // This happens sometimes when users immediately request the status for a query // before it can be initialized. We wait a bit and try again before throwing an @@ -237,7 +237,7 @@ public Response queryResult(@PathParam("resourceQueryId") String queryId, QueryR return Response.status(500).build(); } - result = queryService.getResultFor(queryId); + result = queryService.getResultFor(queryId.toString()); if (result == null) { return Response.status(404).build(); } @@ -253,8 +253,8 @@ public Response queryResult(@PathParam("resourceQueryId") String queryId, QueryR @POST @Path("/query/{resourceQueryId}/status") @Override - public QueryStatus queryStatus(@PathParam("resourceQueryId") String queryId, QueryRequest request) { - return convertToQueryStatus(queryService.getStatusFor(queryId)); + public QueryStatus queryStatus(@PathParam("resourceQueryId") UUID queryId, QueryRequest request) { + return convertToQueryStatus(queryService.getStatusFor(queryId.toString())); } @POST @@ -328,7 +328,7 @@ private Response _querySync(QueryRequest resultRequest) throws IOException { QueryStatus status = query(resultRequest); while (status.getResourceStatus().equalsIgnoreCase("RUNNING") || status.getResourceStatus().equalsIgnoreCase("PENDING")) { - status = queryStatus(status.getResourceResultId(), null); + status = queryStatus(UUID.fromString(status.getResourceResultId()), null); } log.info(status.toString()); diff --git a/war/pom.xml b/war/pom.xml index e71e6efa..93c90038 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -20,30 +20,6 @@ - - org.apache.tomcat.maven - tomcat7-maven-plugin - 2.0 - - - default-cli - - run - - - 13000 - /jaxrs-service - true - true - - -Xms256m -Xmx512m - - - - - - - org.apache.maven.plugins maven-compiler-plugin @@ -90,22 +66,12 @@ - org.apache.tomcat.maven - tomcat7-maven-plugin - - - tomcat-run - - exec-war-only - - package - - true - ../docker/pic-sure-hpds - / - - - + org.apache.maven.plugins + maven-war-plugin + 3.3.1 + + docker/pic-sure-hpds +