Andrea Abram
Andrea Abram
I think that the issue is in the async initialization logic of the `SpringDelegatingLambdaContainerHandler` ## Here: https://github.com/aws/serverless-java-container/blob/4696691989cfcd5d8957dbdfc280018aa267c8ba/aws-serverless-java-container-springboot3/src/main/java/com/amazonaws/serverless/proxy/spring/SpringDelegatingLambdaContainerHandler.java#L52-L63 ## Also here: https://github.com/aws/serverless-java-container/blob/4696691989cfcd5d8957dbdfc280018aa267c8ba/aws-serverless-java-container-springboot3/src/main/java/com/amazonaws/serverless/proxy/spring/SpringDelegatingLambdaContainerHandler.java#L73-L90 ## Spring Code: The `deduceMainApplicationClass` method use the `StackWalker`...
# Update Creating a custom lambda handler instead of using the `SpringDelegatingLambdaContainerHandler` "bypass" this issue but creates another ## Handler: ```java public class StreamLambdaHandler implements RequestStreamHandler { private static final...
I deep dived a bit and I think that the issue is the missing set of the main class in this builder https://github.com/aws/serverless-java-container/blob/4696691989cfcd5d8957dbdfc280018aa267c8ba/aws-serverless-java-container-springboot3/src/main/java/com/amazonaws/serverless/proxy/spring/SpringBootLambdaContainerHandler.java#L189-L209 I tried to set that in a...
I tried to implement the fixes of the previous comment https://github.com/aws/serverless-java-container/issues/1580#issuecomment-3517115376 It runs: ``` Picked up JAVA_TOOL_OPTIONS: -Dspring.aot.enabled=true 14:15:33.626 [main] INFO com.amazonaws.serverless.proxy.internal.LambdaContainerHandler -- Starting Lambda Container Handler . ____ _...
It seems that it's registering all controllers into the `org.springframework.cloud.function.serverless.web.ServerlessServletWebServerFactory` but the handler search into `com.amazonaws.serverless.proxy.spring.embedded.ServerlessServletEmbeddedServerFactory` So they exists multiple bean of the same interface type. Maybe the problem is...
I tried to force define/override those beans to always using the `com.amazonaws.serverless.proxy.spring.embedded.ServerlessServletEmbeddedServerFactory`: # Bean ```java @Bean public ServletWebServerFactory test() { return new ServerlessServletEmbeddedServerFactory(); } ``` # Log ``` 14:23:50.159 [main]...
> I deep dived a bit and I think that the issue is the missing set of the main class in this builder > Maybe we can edit that cast...
I don't have any idea how to solve the servlet factory bean issue 🤔
> I don't have any idea how to solve the servlet factory bean issue 🤔 This can be "fixed" in a better way, than redefining the bean, with an `@Import`...