我创建了一个非常简单的 micronaut-data 项目,当我尝试发布一个非常简单的 json 时,我得到了这个问题主题中提到的错误。
我发现很少有类似的问题总是指向添加@Transaction。好吧,就我而言,它已经存在了。
当我与周围的其他案例进行比较时,关于我的案例的一个可能相关细节是我根本没有使用 Spring,并且我没有创建扩展 CrudRepository 的存储库。我知道我不需要它,因为它是如此简单的 entityManager.persist。
curl --location --request POST 'localhost:8080/accountholders' --header 'Content-Type: application/json' --data-raw '{"name":"Jimis"}'
控制器:
import com.mybank.model.AccountHolder
import com.mybank.service.AccountHolderService
import io.micronaut.http.annotation.Controller
import io.micronaut.http.annotation.Post
@Controller("/accountholders")
class AccountHolderController(private val accountHolderService: AccountHolderService) {
@Post
fun addAccountHolder(accountHolder: AccountHolder): AccountHolder {
return accountHolderService.addAccountHolder(accountHolder)
}
}
服务:
import com.mybank.model.AccountHolder
import io.micronaut.aop.Around
import javax.inject.Singleton
import javax.persistence.EntityManager
import javax.persistence.PersistenceContext
import javax.transaction.Transactional
@Singleton
@Around
class AccountHolderService (@PersistenceContext val entityManager: EntityManager) {
@Transactional
fun addAccountHolder(ah: AccountHolder) : AccountHolder {
entityManager.persist(ah)
return ah
}
}
应用程序.yml
micronaut:
application:
name: demo
endpoints:
info:
enabled: true
sensitive: false
datasources:
default:
url: jdbc:h2:mem:jugdemo_database;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
driverClassName: org.h2.Driver
username: sa
password: ''
jpa:
default:
packages-to-scan:
- 'com.mybank.model'
properties:
hibernate:
hbm2ddl:
auto: update
show_sql: true
构建.gradle:
plugins {
id "org.jetbrains.kotlin.jvm" version "1.4.10"
id "org.jetbrains.kotlin.kapt" version "1.4.10"
id "org.jetbrains.kotlin.plugin.allopen" version "1.4.10"
id "com.github.johnrengelman.shadow" version "6.1.0"
id "io.micronaut.application" version '1.0.5'
id "com.gorylenko.gradle-git-properties" version "2.2.2"
}
version "0.1"
group "com.mybank"
repositories {
mavenCentral()
jcenter()
}
micronaut {
runtime "netty"
testRuntime "junit5"
processing {
incremental true
annotations "com.mybank.*"
}
}
dependencies {
implementation("io.micronaut:micronaut-validation")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
implementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
implementation("io.micronaut.kotlin:micronaut-kotlin-runtime")
implementation("io.micronaut:micronaut-runtime")
implementation("javax.annotation:javax.annotation-api")
implementation("io.micronaut:micronaut-http-client")
implementation("io.micronaut:micronaut-management")
implementation("io.micronaut.sql:micronaut-jdbc-hikari")
implementation("io.micronaut.sql:micronaut-hibernate-jpa")
runtimeOnly("com.h2database:h2")
runtimeOnly("ch.qos.logback:logback-classic")
runtimeOnly("com.fasterxml.jackson.module:jackson-module-kotlin")
}
mainClassName = "com.mybank.ApplicationKt"
java {
sourceCompatibility = JavaVersion.toVersion('11')
}
compileKotlin {
kotlinOptions {
jvmTarget = '11'
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = '11'
}
}
github中的整个项目。
整个日志是。
C:\JDKs\jdk-11.0.6\bin\java.exe -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:59835,suspend=y,server=n -javaagent:C:\Users\Cast\AppData\Local\JetBrains\IdeaIC2020.2\groovyHotSwap\gragent.jar -javaagent:C:\Users\Cast\AppData\Local\JetBrains\IdeaIC2020.2\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\_d\ZUP\WSs\demo\build\classes\kotlin\main;C:\_d\ZUP\WSs\demo\build\tmp\kapt3\classes\main;C:\_d\ZUP\WSs\demo\build\resources\main;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut.sql\micronaut-hibernate-jpa\3.1.1\fadbcbb16f62d31f29d4703fde11f06ecfaa494\micronaut-hibernate-jpa-3.1.1.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut\micronaut-validation\2.1.3\a9c9a65515166a54c69c2e149173b043b0a9587\micronaut-validation-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jdk8\1.4.10\998caa30623f73223194a8b657abd2baec4880ea\kotlin-stdlib-jdk8-1.4.10.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-reflect\1.4.10\e2b3c6695eee6085e606d96d685396dce23a3a06\kotlin-reflect-1.4.10.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut.kotlin\micronaut-kotlin-runtime\2.1.1\126f9ebc2fffaf6aea0520510141b2a3e244ea0e\micronaut-kotlin-runtime-2.1.1.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut\micronaut-http-client\2.1.3\345fb71a1bae80e181f23bcbe0774a29e43a516e\micronaut-http-client-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut\micronaut-management\2.1.3\29a0ab52ffc2f2b16e9414ec9c91d78183f4c171\micronaut-management-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut\micronaut-http-server-netty\2.1.3\551a62b0b2aa15209c5e4704cfc33147b77e5ee1\micronaut-http-server-netty-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut\micronaut-runtime\2.1.3\bc7dfb05dd0570ad4c23ea2f3ebd5241cefe0091\micronaut-runtime-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut.sql\micronaut-jdbc-hikari\3.1.1\2fe2d624384d9a2f1ee2891906618358969a3222\micronaut-jdbc-hikari-3.1.1.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut\micronaut-inject\2.1.3\ab588f5d7d6fd42e341e3741495d1c2c2135e51e\micronaut-inject-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\javax.annotation\javax.annotation-api\1.3.2\934c04d3cfef185a8008e7bf34331b79730a9d43\javax.annotation-api-1.3.2.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut\micronaut-aop\2.1.3\cdd7c896ccd5b7056642901596368ecedaf09f59\micronaut-aop-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut.sql\micronaut-jdbc\3.1.1\c42cab75e9fd7dea01a3be953111b51c57d48acb\micronaut-jdbc-3.1.1.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut.data\micronaut-data-tx-hibernate\2.1.1\e1e009726457d69200796446d0b327c8036d384d\micronaut-data-tx-hibernate-2.1.1.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.hibernate\hibernate-core\5.4.22.Final\3171ee075e69d4be3a39cbadcad9db3c2c0f2681\hibernate-core-5.4.22.Final.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\jakarta.transaction\jakarta.transaction-api\1.3.3\c4179d48720a1e87202115fbed6089bdc4195405\jakarta.transaction-api-1.3.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut\micronaut-http\2.1.3\f603fce31199533f5453eb1f7b1f9db36088f2ac\micronaut-http-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\1.7.26\77100a62c2e6f04b53977b9f541044d7d722693d\slf4j-api-1.7.26.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\javax.validation\validation-api\2.0.1.Final\cb855558e6271b1b32e716d24cb85c7f583ce09e\validation-api-2.0.1.Final.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jdk7\1.4.10\30e46450b0bb3dbf43898d2f461be4a942784780\kotlin-stdlib-jdk7-1.4.10.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib\1.4.10\ea29e063d2bbe695be13e9d044dcfb0c7add398e\kotlin-stdlib-1.4.10.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut\micronaut-http-client-core\2.1.3\a8e3b44c8171bfb5fe034d54eb4b0231f06fa9c\micronaut-http-client-core-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut\micronaut-http-netty\2.1.3\a2e7ec804eff61c1f2194d6770a839388ec3ad3d\micronaut-http-netty-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut\micronaut-websocket\2.1.3\c9eb121a86ece2568dbc3ea9840cd775981074c3\micronaut-websocket-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.reactivex.rxjava2\rxjava\2.2.10\18e9edc67e0abaa03713eeb9ca2cb0e30c859de4\rxjava-2.2.10.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.netty\netty-handler-proxy\4.1.53.Final\24007d9b48de8694e62c0796e5e7bc51c1b0f369\netty-handler-proxy-4.1.53.Final.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut\micronaut-router\2.1.3\ec6e57d1f04f0bb31d98a7edf921e6a2728bc9b\micronaut-router-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut\micronaut-http-server\2.1.3\804d8aedf98895826126e30ce4ab97bae462404a\micronaut-http-server-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut\micronaut-core\2.1.3\dd1bfa7a7bd4b4c875e6a0046690c98a4560a2f7\micronaut-core-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec-http\4.1.53.Final\9f62cacb250ec65bdb368a178d2453535c365947\netty-codec-http-4.1.53.Final.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jdk8\2.11.2\d4c1933a8d62db65c3d5a5cd809511e021a189c0\jackson-datatype-jdk8-2.11.2.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jsr310\2.11.2\e6235e5eb3cf3edd2a95cd0dc96bc48aeb309e8a\jackson-datatype-jsr310-2.11.2.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.11.2\ee08bbd8975dde844307fe8309dfcd5ec7ee129d\jackson-databind-2.11.2.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\com.zaxxer\HikariCP\3.4.5\aa1a2c00aae8e4ba8308e19940711bb9525b103d\HikariCP-3.4.5.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.yaml\snakeyaml\1.26\a78a8747147d2c5807683e76ec2b633e95c14fe9\snakeyaml-1.26.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\javax.inject\javax.inject\1\6975da39a7040257bd51d21a231b76c915872d38\javax.inject-1.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut.data\micronaut-data-tx\2.1.1\11f56278f9c412d86e21e6ac512644efa15b5b7b\micronaut-data-tx-2.1.1.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.hibernate.common\hibernate-commons-annotations\5.1.0.Final\700aeedc4a2089816621948f0379e17cbd17d5db\hibernate-commons-annotations-5.1.0.Final.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.jboss.logging\jboss-logging\3.3.2.Final\3789d00e859632e6c6206adc0c71625559e6e3b0\jboss-logging-3.3.2.Final.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\javax.persistence\javax.persistence-api\2.2\25665ac8c0b62f50e6488173233239120fc52c96\javax.persistence-api-2.2.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\net.bytebuddy\byte-buddy\1.10.10\602a3da70f603752d3ce20a9997817d8dec39b51\byte-buddy-1.10.10.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\antlr\antlr\2.7.7\83cd2cd674a217ade95a4bb83a8a14f351f48bd0\antlr-2.7.7.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.jboss\jandex\2.1.3.Final\cd56603e39eb1421560b71daa584348ecfd9e0b8\jandex-2.1.3.Final.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\com.fasterxml\classmate\1.5.1\3fe0bed568c62df5e89f4f174c101eab25345b6c\classmate-1.5.1.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-runtime\2.3.1\dd6dda9da676a54c5b36ca2806ff95ee017d8738\jaxb-runtime-2.3.1.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\javax.xml.bind\jaxb-api\2.3.1\8531ad5ac454cc2deb9d4d32c40c4d7451939b5d\jaxb-api-2.3.1.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\javax.activation\javax.activation-api\1.2.0\85262acf3ca9816f9537ca47d5adeabaead7cb16\javax.activation-api-1.2.0.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.dom4j\dom4j\2.1.3\a75914155a9f5808963170ec20653668a2ffd2fd\dom4j-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-common\1.4.10\6229be3465805c99db1142ad75e6c6ddeac0b04c\kotlin-stdlib-common-1.4.10.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.jetbrains\annotations\13.0\919f0dfe192fb4e063e7dacadee7f8bb9a2672a9\annotations-13.0.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.micronaut\micronaut-buffer-netty\2.1.3\45947cbadff401250f170ec1757f2a5efca2c60c\micronaut-buffer-netty-2.1.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec-http2\4.1.53.Final\97612c9c5b07cd7c7822542fa373b3263ccb8da0\netty-codec-http2-4.1.53.Final.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.netty\netty-handler\4.1.53.Final\106846090e4bab23537d52da281616a001611e0c\netty-handler-4.1.53.Final.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.reactivestreams\reactive-streams\1.0.3\d9fb7a7926ffa635b3dcaa5049fb2bfa25b3e7d0\reactive-streams-1.0.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec-socks\4.1.53.Final\669ea5cd9137c57d5b2dd71b11ed59adf1d70f85\netty-codec-socks-4.1.53.Final.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec\4.1.53.Final\47aca7eb6f3a4ea623195906dd9caf3a1863e187\netty-codec-4.1.53.Final.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.netty\netty-transport\4.1.53.Final\856f737f7c512f2e2b970df254f15fc558e991c\netty-transport-4.1.53.Final.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.netty\netty-buffer\4.1.53.Final\a28d2694ff1bc95c627108b01949de3697b4c232\netty-buffer-4.1.53.Final.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.netty\netty-common\4.1.53.Final\f5aac2cd268483ded1f76dacc5c9eb27899dee72\netty-common-4.1.53.Final.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.11.2\bc022ab0f0c83c07f9c52c5ab9a6a4932b15cc35\jackson-core-2.11.2.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.11.2\e0a7f61fce3e3eac38a079c11831868269de2ea\jackson-annotations-2.11.2.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\txw2\2.3.1\a09d2c48d3285f206fafbffe0e50619284e92126\txw2-2.3.1.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\com.sun.istack\istack-commons-runtime\3.0.7\c197c86ceec7318b1284bffb49b54226ca774003\istack-commons-runtime-3.0.7.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\org.jvnet.staxex\stax-ex\1.8\8cc35f73da321c29973191f2cf143d29d26a1df7\stax-ex-1.8.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\com.sun.xml.fastinfoset\FastInfoset\1.2.15\bb7b7ec0379982b97c62cd17465cb6d9155f68e8\FastInfoset-1.2.15.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\io.netty\netty-resolver\4.1.53.Final\fe243ee1fddf47e3d54ec83d9f42ef35bcb5ac3e\netty-resolver-4.1.53.Final.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\3.0.2\25ea2e8b0c338a877313bd4672d3fe056ea78f0d\jsr305-3.0.2.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.module\jackson-module-kotlin\2.11.2\470e6cb1482e883ed006817bae7bb143ad75b8c0\jackson-module-kotlin-2.11.2.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\com.h2database\h2\1.4.199\7bf08152984ed8859740ae3f97fae6c72771ae45\h2-1.4.199.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-classic\1.2.3\7c4f3c474fb2c041d8028740440937705ebb473a\logback-classic-1.2.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\com.typesafe\config\1.4.0\a8b341fe81552834edc231193afd6f56a96f0eff\config-1.4.0.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-core\1.2.3\864344400c3d4d92dfeb0a305dc87d953677c03c\logback-core-1.2.3.jar;C:\Users\Cast\.gradle\caches\modules-2\files-2.1\com.github.spotbugs\spotbugs-annotations\4.1.4\aa25ac7a3dab199133b1b49a8e79b152eeddd3a2\spotbugs-annotations-4.1.4.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1\lib\idea_rt.jar" com.mybank.ApplicationKt
Connected to the target VM, address: '127.0.0.1:59835', transport: 'socket'
12:20:58.290 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
12:20:58.557 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
12:20:58.570 [main] INFO org.hibernate.Version - HHH000412: Hibernate ORM core version 5.4.22.Final
12:20:58.877 [main] INFO o.h.annotations.common.Version - HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
12:20:59.925 [main] INFO org.hibernate.dialect.Dialect - HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
Hibernate: create table AccountHolder (id bigint not null, name varchar(255), primary key (id))
Hibernate: create table accounts (id bigint not null, name varchar(255), primary key (id))
Hibernate: create sequence account_seq start with 1 increment by 50
12:21:03.089 [main] INFO io.micronaut.runtime.Micronaut - Startup completed in 6541ms. Server Running: http://localhost:8080
12:21:28.263 [default-nioEventLoopGroup-1-3] ERROR i.m.h.s.netty.RoutingInBoundHandler - Unexpected error occurred: Could not obtain transaction-synchronized Session for current thread
org.hibernate.HibernateException: Could not obtain transaction-synchronized Session for current thread
at io.micronaut.transaction.hibernate5.MicronautSessionContext.currentSession(MicronautSessionContext.java:100)
at org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:475)
at io.micronaut.configuration.hibernate.jpa.TransactionalSessionInterceptor.intercept(TransactionalSessionInterceptor.java:56)
at io.micronaut.aop.chain.MethodInterceptorChain.proceed(MethodInterceptorChain.java:82)
...
at io.micronaut.http.netty.reactive.HandlerPublisher.requestDemand(HandlerPublisher.java:163)
at io.micronaut.http.netty.stream.HttpStreamsHandler$2.requestDemand(HttpStreamsHandler.java:248)
at io.micronaut.http.netty.reactive.HandlerPublisher$ChannelSubscription.receivedDemand(HandlerPublisher.java:547)
at io.micronaut.http.netty.reactive.HandlerPublisher$ChannelSubscription.lambda$request$0(HandlerPublisher.java:474)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:497)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)