libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 891dba51dde9e49716038ffc54a44e7ec6620f64
parent 06749d5d4e173f9c121c168a987d7dcf4f48148f
Author: Florian Dold <dold@taler.net>
Date:   Thu,  3 Sep 2026 18:54:59 +0200

libeufin: keep runtime reflection and expected cancellations quiet

Diffstat:
Mlibeufin-bank/build.gradle | 7+++++--
Mlibeufin-bank/src/main/kotlin/tech/libeufin/bank/api/PreparedTransferApi.kt | 2--
Mlibeufin-common/src/main/kotlin/log.kt | 8++++++--
Mlibeufin-ebisync/build.gradle | 5+++--
Mlibeufin-nexus/build.gradle | 7+++++--
5 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/libeufin-bank/build.gradle b/libeufin-bank/build.gradle @@ -50,11 +50,15 @@ dependencies { application { mainClass = "tech.libeufin.bank.MainKt" + // junixsocket loads its native library through System.loadLibrary(). + applicationDefaultJvmArgs = ["--enable-native-access=ALL-UNNAMED"] } shadowJar { version = "" minimize { + // The OpenAPI schema generator discovers model properties at runtime. + exclude(dependency("org.jetbrains.kotlin:kotlin-reflect:.*")) // Kotlin serialization exclude(dependency("io.ktor:ktor-serialization-kotlinx-json:.*")) // Postgres unix socket driver @@ -64,4 +68,4 @@ shadowJar { // Crypto exclude(dependency("org.bouncycastle:.*")) } -} -\ No newline at end of file +} diff --git a/libeufin-bank/src/main/kotlin/tech/libeufin/bank/api/PreparedTransferApi.kt b/libeufin-bank/src/main/kotlin/tech/libeufin/bank/api/PreparedTransferApi.kt @@ -116,8 +116,6 @@ fun Routing.preparedTransferApi(db: Database, cfg: BankConfig) { }) { val req = call.receive<Unregistration>(); - logger.error("${req.nbo().joinToString(", ") { (it.toInt() and 0xFF).toString() }}") - val now = Instant.now() if (req.timestamp.instant.isBefore(now.minus(Duration.ofMinutes(15))) || req.timestamp.instant.isAfter(now)) throw conflict( diff --git a/libeufin-common/src/main/kotlin/log.kt b/libeufin-common/src/main/kotlin/log.kt @@ -35,6 +35,7 @@ import org.slf4j.spi.SLF4JServiceProvider; import java.time.LocalDateTime import java.time.format.DateTimeFormatter import java.io.PrintStream +import java.util.concurrent.CancellationException class TalerLogger(private val loggerName: String): LegacyAbstractLogger() { @@ -52,6 +53,10 @@ class TalerLogger(private val loggerName: String): LegacyAbstractLogger() { if ( !isLevelEnabled(level) || (name.startsWith("io.ktor") && level.toInt() < Level.WARN.toInt()) || + // Ktor reports a disconnected client's cancelled request coroutine + // as an unhandled server error. Cancellation is normal control flow, + // in particular when a wire-gateway long poll is stopped. + (name.startsWith("io.ktor") && throwable is CancellationException) || name.startsWith("com.zaxxer.hikari") ) return val callId = org.slf4j.MDC.get("call-id") @@ -106,4 +111,4 @@ class TalerServiceProvider: SLF4JServiceProvider { override fun getLogger(name: String): Logger = loggerMap.computeIfAbsent(name, ::TalerLogger) } -} -\ No newline at end of file +} diff --git a/libeufin-ebisync/build.gradle b/libeufin-ebisync/build.gradle @@ -51,6 +51,8 @@ dependencies { application { mainClass = "tech.libeufin.ebisync.MainKt" + // junixsocket loads its native library through System.loadLibrary(). + applicationDefaultJvmArgs = ["--enable-native-access=ALL-UNNAMED"] } shadowJar { @@ -69,4 +71,4 @@ shadowJar { // PDF exclude(dependency("com.itextpdf:itext-core:.*")) } -} -\ No newline at end of file +} diff --git a/libeufin-nexus/build.gradle b/libeufin-nexus/build.gradle @@ -56,11 +56,15 @@ dependencies { application { mainClass = "tech.libeufin.nexus.MainKt" + // junixsocket loads its native library through System.loadLibrary(). + applicationDefaultJvmArgs = ["--enable-native-access=ALL-UNNAMED"] } shadowJar { version = "" minimize { + // The OpenAPI schema generator discovers model properties at runtime. + exclude(dependency("org.jetbrains.kotlin:kotlin-reflect:.*")) // Kotlin serialization exclude(dependency("io.ktor:ktor-serialization-kotlinx-json:.*")) // Postgres unix socket driver @@ -74,4 +78,4 @@ shadowJar { // PDF exclude(dependency("com.itextpdf:itext-core:.*")) } -} -\ No newline at end of file +}