You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example that reproduces the problem uploaded to Github
Full description of the issue provided (see below)
Expected Behaviour
Is this issue related to configuration?
Actual Behaviour
14:06:15.726 [pool-2-thread-2] ERROR i.m.s.DefaultTaskExceptionHandler - Error invoking scheduled task Error instantiating bean of type [io.micronaut.configuration.graphql.ws.GraphQLWsKeepAlive]: Error serializing object to JSON: No serializer found for class io.micronaut.configuration.graphql.ws.GraphQLWsResponse and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)
io.micronaut.context.exceptions.BeanInstantiationException: Error instantiating bean of type [io.micronaut.configuration.graphql.ws.GraphQLWsKeepAlive]: Error serializing object to JSON: No serializer found for class io.micronaut.configuration.graphql.ws.GraphQLWsResponse and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)
at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1918)
at io.micronaut.context.DefaultBeanContext.createAndRegisterSingletonInternal(DefaultBeanContext.java:2638)
at io.micronaut.context.DefaultBeanContext.createAndRegisterSingleton(DefaultBeanContext.java:2624)
at io.micronaut.context.DefaultBeanContext.getBeanForDefinition(DefaultBeanContext.java:2296)
at io.micronaut.context.DefaultBeanContext.getBeanInternal(DefaultBeanContext.java:2270)
at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:716)
at io.micronaut.scheduling.processor.ScheduledMethodProcessor.lambda$process$5(ScheduledMethodProcessor.java:123)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:834)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
Caused by: java.lang.RuntimeException: Error serializing object to JSON: No serializer found for class io.micronaut.configuration.graphql.ws.GraphQLWsResponse and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)
at io.micronaut.configuration.graphql.JacksonGraphQLJsonSerializer.serialize(JacksonGraphQLJsonSerializer.java:51)
at io.micronaut.configuration.graphql.ws.GraphQLWsKeepAlive.<init>(GraphQLWsKeepAlive.java:55)
at io.micronaut.configuration.graphql.ws.$GraphQLWsKeepAliveDefinition.build(Unknown Source)
at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1889)
... 14 common frames omitted
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class io.micronaut.configuration.graphql.ws.GraphQLWsResponse and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)
at com.fasterxml.jackson.databind.SerializerProvider.reportBadDefinition(SerializerProvider.java:1277)
at com.fasterxml.jackson.databind.DatabindContext.reportBadDefinition(DatabindContext.java:400)
at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:71)
at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:33)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider._serialize(DefaultSerializerProvider.java:480)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:319)
at com.fasterxml.jackson.databind.ObjectMapper._writeValueAndClose(ObjectMapper.java:4407)
at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:3661)
at io.micronaut.configuration.graphql.JacksonGraphQLJsonSerializer.serialize(JacksonGraphQLJsonSerializer.java:49)
... 17 common frames omitted
Environment Information
Operating System: MacOSX 10.15
Micronaut Version: 2.0.3
JDK Version: 11
build.gradle
plugins {
id "com.diffplug.eclipse.apt" version "3.22.0"
id "groovy"
id "com.github.johnrengelman.shadow" version "6.0.0"
id "application"
id "org.sonarqube" version "3.0"
}
version "0.1"
group "io.example"repositories {
mavenCentral()
jcenter()
}
configurations {
// for dependencies that are needed for development only
developmentOnly
}
dependencies {
compileOnly("org.projectlombok:lombok:$lombokVersion")
annotationProcessor("org.projectlombok:lombok:$lombokVersion")
annotationProcessor(platform("io.micronaut:micronaut-bom:$micronautVersion"))
annotationProcessor("io.micronaut:micronaut-inject-java")
annotationProcessor("io.micronaut:micronaut-validation")
annotationProcessor("io.micronaut:micronaut-graal")
compileOnly(platform("io.micronaut:micronaut-bom:$micronautVersion"))
compileOnly("org.graalvm.nativeimage:svm")
implementation(platform("io.micronaut:micronaut-bom:$micronautVersion"))
implementation("io.micronaut:micronaut-inject")
implementation("io.micronaut:micronaut-validation")
implementation("io.micronaut:micronaut-runtime")
implementation("javax.annotation:javax.annotation-api")
implementation("io.micronaut:micronaut-http-server-netty")
implementation("io.micronaut:micronaut-http-client")
implementation("io.micronaut.flyway:micronaut-flyway")
implementation("io.micronaut.sql:micronaut-jdbc-hikari")
implementation("io.micronaut.beanvalidation:micronaut-hibernate-validator")
implementation("io.micronaut.sql:micronaut-hibernate-jpa")
implementation("io.micronaut.graphql:micronaut-graphql")
implementation("io.micronaut.cache:micronaut-cache-caffeine")
runtimeOnly("ch.qos.logback:logback-classic")
runtimeOnly("org.postgresql:postgresql")
implementation("com.graphql-java-kickstart:graphql-java-tools:$graphqlJavaToolsVersion")
testCompileOnly("org.projectlombok:lombok:$lombokVersion")
testAnnotationProcessor("org.projectlombok:lombok:$lombokVersion")
testImplementation(enforcedPlatform("io.micronaut:micronaut-bom:$micronautVersion"))
testImplementation("io.micronaut:micronaut-inject-groovy")
testImplementation("org.spockframework:spock-core") {
exclude group: "org.codehaus.groovy", module: "groovy-all"
}
testImplementation("io.micronaut.test:micronaut-test-spock")
testImplementation(platform("org.testcontainers:testcontainers-bom:1.14.3"))
testRuntimeOnly("org.testcontainers:postgresql")
implementation('com.github.javafaker:javafaker:1.0.2')
}
test.classpath += configurations.developmentOnly
mainClassName ="io.passiontech.Application"// use JUnit 5 platformtest {
useJUnitPlatform()
}
java {
sourceCompatibility =JavaVersion.toVersion('11')
targetCompatibility =JavaVersion.toVersion('11')
}
tasks.withType(JavaCompile) {
options.encoding ="UTF-8"
options.compilerArgs.addAll([
'-parameters',
// enables incremental compilation'-Amicronaut.processing.incremental=true',
'-Amicronaut.processing.annotations=io.passiontech.*',
"-Amicronaut.processing.group=$project.group",
"-Amicronaut.processing.module=$project.name",
])
}
shadowJar {
mergeServiceFiles()
}
tasks.withType(JavaExec) {
classpath += configurations.developmentOnly
jvmArgs('-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote')
if (gradle.startParameter.continuous) {
systemProperties(
'micronaut.io.watch.restart':'true',
'micronaut.io.watch.enabled':'true',
"micronaut.io.watch.paths":"src/main"
)
}
}
The text was updated successfully, but these errors were encountered:
Task List
Expected Behaviour
Is this issue related to configuration?
Actual Behaviour
Environment Information
build.gradle
The text was updated successfully, but these errors were encountered: