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 '[Ljava.net.InetSocketAddress;'
at org.springframework.aot.hint.SimpleTypeReference.of(SimpleTypeReference.java:47)
at org.springframework.aot.hint.TypeReference.of(TypeReference.java:84)
at org.springframework.boot.logging.logback.SpringBootJoranConfigurator$ModelWriter.lambda$writeTo$0(SpringBootJoranConfigurator.java:175)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.springframework.boot.logging.logback.SpringBootJoranConfigurator$ModelWriter.writeTo(SpringBootJoranConfigurator.java:174)
at org.springframework.boot.logging.logback.SpringBootJoranConfigurator$LogbackConfigurationAotContribution.applyTo(SpringBootJoranConfigurator.java:142)
at org.springframework.context.aot.BeanFactoryInitializationAotContributions.applyTo(BeanFactoryInitializationAotContributions.java:78)
at org.springframework.context.aot.ApplicationContextAotGenerator.lambda$processAheadOfTime$0(ApplicationContextAotGenerator.java:58)
at org.springframework.context.aot.ApplicationContextAotGenerator.withCglibClassHandler(ApplicationContextAotGenerator.java:67)
at org.springframework.context.aot.ApplicationContextAotGenerator.processAheadOfTime(ApplicationContextAotGenerator.java:53)
at org.springframework.context.aot.ContextAotProcessor.performAotProcessing(ContextAotProcessor.java:106)
at org.springframework.context.aot.ContextAotProcessor.doProcess(ContextAotProcessor.java:84)
at org.springframework.context.aot.ContextAotProcessor.doProcess(ContextAotProcessor.java:49)
at org.springframework.context.aot.AbstractAotProcessor.process(AbstractAotProcessor.java:82)
at org.springframework.boot.SpringApplicationAotProcessor.main(SpringApplicationAotProcessor.java:76)
Our logging config is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>[%d][%-5level] %m%n</pattern>
</encoder>
</appender>
<appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>localhost:4445</destination>
<encoder class="net.logstash.logback.encoder.LogstashEncoder">
<includeContext>false</includeContext>
</encoder>
</appender>
<logger name="test.Application" level="INFO">
<appender-ref ref="CONSOLE"/>
</logger>
<root level="INFO">
<appender-ref ref="LOGSTASH"/>
</root>
</configuration>
I've attached a small sample application that reproduces the problem.