diff --git a/cellbase-core/pom.xml b/cellbase-core/pom.xml index 30a4d6ec63..4fd3620761 100644 --- a/cellbase-core/pom.xml +++ b/cellbase-core/pom.xml @@ -66,6 +66,18 @@ hamcrest-all test + + jakarta.ws.rs + jakarta.ws.rs-api + 2.1.6 + compile + + + jakarta.ws.rs + jakarta.ws.rs-api + 2.1.6 + compile + diff --git a/cellbase-core/src/main/java/org/opencb/cellbase/core/exception/CellBaseException.java b/cellbase-core/src/main/java/org/opencb/cellbase/core/exception/CellBaseException.java index 884c63f2ae..44e9880eae 100644 --- a/cellbase-core/src/main/java/org/opencb/cellbase/core/exception/CellBaseException.java +++ b/cellbase-core/src/main/java/org/opencb/cellbase/core/exception/CellBaseException.java @@ -16,7 +16,9 @@ package org.opencb.cellbase.core.exception; -public class CellBaseException extends Exception { +import javax.ws.rs.WebApplicationException; + +public class CellBaseException extends WebApplicationException { public CellBaseException(String msg) { super(msg); diff --git a/cellbase-server/src/main/java/org/opencb/cellbase/server/exception/CellBaseExceptionMapper.java b/cellbase-server/src/main/java/org/opencb/cellbase/server/rest/CellBaseExceptionMapper.java similarity index 91% rename from cellbase-server/src/main/java/org/opencb/cellbase/server/exception/CellBaseExceptionMapper.java rename to cellbase-server/src/main/java/org/opencb/cellbase/server/rest/CellBaseExceptionMapper.java index 7c75c3284a..1467148063 100644 --- a/cellbase-server/src/main/java/org/opencb/cellbase/server/exception/CellBaseExceptionMapper.java +++ b/cellbase-server/src/main/java/org/opencb/cellbase/server/rest/CellBaseExceptionMapper.java @@ -14,17 +14,15 @@ * limitations under the License. */ -package org.opencb.cellbase.server.exception; +package org.opencb.cellbase.server.rest; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; -import org.opencb.cellbase.core.exception.CellBaseException; import org.opencb.cellbase.core.result.CellBaseDataResponse; import org.opencb.cellbase.core.result.CellBaseDataResult; -import org.opencb.cellbase.server.rest.GenericRestWSServer; import org.opencb.commons.datastore.core.Event; import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.commons.datastore.core.QueryOptions; @@ -45,7 +43,7 @@ * Created by imedina on 02/03/16. */ @Provider -public class CellBaseExceptionMapper implements ExceptionMapper { +public class CellBaseExceptionMapper implements ExceptionMapper { @Context private UriInfo uriInfo; @@ -66,7 +64,7 @@ public class CellBaseExceptionMapper implements ExceptionMapper