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

mn CLI tool generates unbuildable project #11212

Open
nedelva opened this issue Sep 28, 2024 · 0 comments
Open

mn CLI tool generates unbuildable project #11212

nedelva opened this issue Sep 28, 2024 · 0 comments

Comments

@nedelva
Copy link

nedelva commented Sep 28, 2024

Expected Behavior

MN should generate a buildable project (no matter the combination of features chosen)

Actual Behaviour

When you generate a Lambda application with the following comand:

mn create-function-app --build=maven --jdk=21 --lang=java --test=junit --features=aws-lambda,yaml,http-client,jackson-databind,email-mailjet,security-jwt com.example.lambdademo

The mvn verify fails with

[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.example.FunctionRequestHandlerTest
10:45:02.112 [main] INFO i.m.c.DefaultApplicationContext$RuntimeConfiguredEnvironment - Established active environments: [function, lambda]
10:45:02.164 [main] ERROR i.m.f.aws.MicronautRequestHandler - Exception initializing handler
io.micronaut.context.exceptions.BeanInstantiationException: Bean definition [io.micronaut.security.endpoints.$LoginController$Definition$Intercepted] could not be loaded: Failed to initialize the bean [class io.micronaut.security.endpoints.$LoginController$Definition$Intercepted]: io/micronaut/http/server/util/HttpHostResolver
at io.micronaut.context.DefaultBeanContext.initializeContext(DefaultBeanContext.java:1983)
at io.micronaut.context.DefaultApplicationContext.initializeContext(DefaultApplicationContext.java:307)
at io.micronaut.context.DefaultBeanContext.configureAndStartContext(DefaultBeanContext.java:3314)
at io.micronaut.context.DefaultBeanContext.start(DefaultBeanContext.java:345)
at io.micronaut.context.DefaultApplicationContext.start(DefaultApplicationContext.java:215)
at io.micronaut.function.executor.AbstractExecutor.startEnvironment(AbstractExecutor.java:123)
at io.micronaut.function.aws.MicronautRequestHandler.buildApplicationContext(MicronautRequestHandler.java:140)
at io.micronaut.function.aws.MicronautRequestHandler.(MicronautRequestHandler.java:67)
at com.example.FunctionRequestHandler.(FunctionRequestHandler.java:10)
at com.example.FunctionRequestHandlerTest.setupServer(FunctionRequestHandlerTest.java:16)

Steps To Reproduce

No response

Environment Information

  • macOS
  • JDK 21 Temurin

Example Application

No response

Version

4.6.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant