diff --git a/cargo-tracker-data/cargo-tracker-database.mv.db b/cargo-tracker-data/cargo-tracker-database.mv.db new file mode 100644 index 000000000..16b5835d9 Binary files /dev/null and b/cargo-tracker-data/cargo-tracker-database.mv.db differ diff --git a/cargo-tracker-data/cargo-tracker-database.trace.db b/cargo-tracker-data/cargo-tracker-database.trace.db new file mode 100644 index 000000000..6c10c1e6a --- /dev/null +++ b/cargo-tracker-data/cargo-tracker-database.trace.db @@ -0,0 +1,27 @@ +2021-04-12 10:15:23 jdbc[3]: exception +org.h2.jdbc.JdbcSQLNonTransientConnectionException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-200] + at deployment.cargo-tracker.war//org.h2.message.DbException.getJdbcSQLException(DbException.java:622) + at deployment.cargo-tracker.war//org.h2.message.DbException.getJdbcSQLException(DbException.java:429) + at deployment.cargo-tracker.war//org.h2.message.DbException.get(DbException.java:205) + at deployment.cargo-tracker.war//org.h2.message.DbException.get(DbException.java:181) + at deployment.cargo-tracker.war//org.h2.message.DbException.get(DbException.java:170) + at deployment.cargo-tracker.war//org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1514) + at deployment.cargo-tracker.war//org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.checkClosed(JdbcXAConnection.java:472) + at deployment.cargo-tracker.war//org.h2.jdbc.JdbcConnection.checkClosedForWrite(JdbcConnection.java:1500) + at deployment.cargo-tracker.war//org.h2.jdbc.JdbcConnection.rollback(JdbcConnection.java:556) + at deployment.cargo-tracker.war//org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection.close(JdbcXAConnection.java:452) + at org.jboss.ironjacamar.jdbcadapters@1.4.27.Final//org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:494) + at org.jboss.ironjacamar.jdbcadapters@1.4.27.Final//org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.destroy(XAManagedConnection.java:229) + at org.jboss.ironjacamar.impl@1.4.27.Final//org.jboss.jca.core.connectionmanager.listener.AbstractConnectionListener.destroy(AbstractConnectionListener.java:637) + at org.jboss.ironjacamar.impl@1.4.27.Final//org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.shutdown(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1069) + at org.jboss.ironjacamar.impl@1.4.27.Final//org.jboss.jca.core.connectionmanager.pool.AbstractPool.shutdown(AbstractPool.java:945) + at org.jboss.ironjacamar.impl@1.4.27.Final//org.jboss.jca.core.connectionmanager.AbstractConnectionManager.shutdown(AbstractConnectionManager.java:321) + at org.jboss.as.connector@23.0.0.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService.stopService(AbstractDataSourceService.java:236) + at org.jboss.as.connector@23.0.0.Final//org.jboss.as.connector.subsystems.datasources.XaDataSourceService.stopService(XaDataSourceService.java:72) + at org.jboss.as.connector@23.0.0.Final//org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$1.run(AbstractDataSourceService.java:190) + at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) + at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990) + at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) + at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377) + at java.base/java.lang.Thread.run(Thread.java:834) + at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513) diff --git a/pom.xml b/pom.xml index 17f71cb55..701ae06c5 100644 --- a/pom.xml +++ b/pom.xml @@ -92,6 +92,13 @@ jakarta.jakartaee-api + + org.glassfish.jersey.core + jersey-server + 2.33 + provided + + org.glassfish.jaxb diff --git a/src/main/java/org/eclipse/cargotracker/application/util/RestConfiguration.java b/src/main/java/org/eclipse/cargotracker/application/util/RestConfiguration.java index 33290e59e..22e057015 100644 --- a/src/main/java/org/eclipse/cargotracker/application/util/RestConfiguration.java +++ b/src/main/java/org/eclipse/cargotracker/application/util/RestConfiguration.java @@ -1,5 +1,7 @@ package org.eclipse.cargotracker.application.util; +import org.glassfish.jersey.server.ServerProperties; + import javax.ws.rs.ApplicationPath; import javax.ws.rs.core.Application; import java.util.HashMap; @@ -12,11 +14,7 @@ public class RestConfiguration extends Application { @Override public Map getProperties() { Map properties = new HashMap(); - // properties.put(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true); - // for portable in other application servers. - // see: - // https://eclipse-ee4j.github.io/jersey.github.io/apidocs/latest/jersey/org/glassfish/jersey/server/ServerProperties.html#BV_SEND_ERROR_IN_RESPONSE - properties.put("jersey.config.beanValidation.enableOutputValidationErrorEntity.server", true); + properties.put(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true); return properties; } }