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

FunctionCatalog bean missing in aws with 4.x sc function #1037

Closed
solidline opened this issue May 19, 2023 · 2 comments
Closed

FunctionCatalog bean missing in aws with 4.x sc function #1037

solidline opened this issue May 19, 2023 · 2 comments
Milestone

Comments

@solidline
Copy link

solidline commented May 19, 2023

Ran into the same issue (#996) when using spring-boot 3.x and 4.x function in aws. I was able to confirm 3.2.10 works as expected. Using gradle to build, test project used: solidline@bbb303b

error response in aws:

{
  "errorMessage": "No qualifying bean of type 'org.springframework.cloud.function.context.FunctionCatalog' available",
  "errorType": "org.springframework.beans.factory.NoSuchBeanDefinitionException"
}

as of now no known solution.

Originally posted by @solidline in #996 (comment)

@olegz olegz closed this as completed in 3f8b7f1 May 24, 2023
@olegz olegz added this to the 4.0.3 milestone May 24, 2023
@birbirsbirbirs
Copy link

solved above issue changing the shadorJar configuration, addition of append 'META-INF/spring.tooling'
append 'META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports'
append 'META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports',
I am using shadow plugin version 8.1.1
following is the shadowJar configuration:

shadowJar {
archiveClassifier = 'aws'
dependencies {
exclude(
dependency("org.springframework.cloud:spring-cloud-function-web:4.0.5"))
}
// Required for Spring
mergeServiceFiles()
append 'META-INF/spring.handlers'
append 'META-INF/spring.schemas'
append 'META-INF/spring.tooling'
append 'META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports'
append 'META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports'
transform(PropertiesFileTransformer) {
paths = ['META-INF/spring.factories']
mergeStrategy = "append"
}
}

@sryze
Copy link
Contributor

sryze commented Nov 23, 2023

@birbirsbirbirs Thanks for the info! For me, this solved a problem with Spring Boot being unable to find repositories. It seems that the sample code in the AWS adapter docs needs an update.

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

No branches or pull requests

4 participants