Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AOT doesn't work with Logstash Logback Encoder #33387

toellrich opened this issue Nov 28, 2022 · 0 comments

AOT doesn't work with Logstash Logback Encoder #33387

toellrich opened this issue Nov 28, 2022 · 0 comments
type: bug A general bug


Copy link

toellrich commented Nov 28, 2022

I'm trying out the new AOT feature in Spring Boot 3.0.0 GA. We're using the 3rd Party LogstashTcpSocketAppender in order to log JSON to a socket. This works fine when doing an old school Maven build. When using the new execution goal process-aot however, the build fails with the following error message:

Exception in thread "main" java.lang.IllegalStateException: Invalid class name '[;'
	at org.springframework.aot.hint.SimpleTypeReference.of(
	at org.springframework.aot.hint.TypeReference.of(
	at org.springframework.boot.logging.logback.SpringBootJoranConfigurator$ModelWriter.lambda$writeTo$0(
	at java.base/java.lang.Iterable.forEach(
	at org.springframework.boot.logging.logback.SpringBootJoranConfigurator$ModelWriter.writeTo(
	at org.springframework.boot.logging.logback.SpringBootJoranConfigurator$LogbackConfigurationAotContribution.applyTo(
	at org.springframework.context.aot.BeanFactoryInitializationAotContributions.applyTo(
	at org.springframework.context.aot.ApplicationContextAotGenerator.lambda$processAheadOfTime$0(
	at org.springframework.context.aot.ApplicationContextAotGenerator.withCglibClassHandler(
	at org.springframework.context.aot.ApplicationContextAotGenerator.processAheadOfTime(
	at org.springframework.context.aot.ContextAotProcessor.performAotProcessing(
	at org.springframework.context.aot.ContextAotProcessor.doProcess(
	at org.springframework.context.aot.ContextAotProcessor.doProcess(
	at org.springframework.context.aot.AbstractAotProcessor.process(
	at org.springframework.boot.SpringApplicationAotProcessor.main(

Our logging config is as follows:

<?xml version="1.0" encoding="UTF-8"?>
  <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
      <pattern>[%d][%-5level] %m%n</pattern>
  <appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
    <encoder class="net.logstash.logback.encoder.LogstashEncoder">
  <logger name="test.Application" level="INFO">
    <appender-ref ref="CONSOLE"/>
  <root level="INFO">
    <appender-ref ref="LOGSTASH"/>

I've attached a small sample application that reproduces the problem.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 28, 2022
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 28, 2022
@wilkinsona wilkinsona self-assigned this Nov 28, 2022
@wilkinsona wilkinsona added this to the 3.0.x milestone Nov 28, 2022
@wilkinsona wilkinsona modified the milestones: 3.0.x, 3.0.1 Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
type: bug A general bug
None yet

No branches or pull requests

3 participants