Title: Provide Spring Boot 3 support · Issue #487 · aws/serverless-java-container · GitHub
Open Graph Title: Provide Spring Boot 3 support · Issue #487 · aws/serverless-java-container
X Title: Provide Spring Boot 3 support · Issue #487 · aws/serverless-java-container
Description: To help us debug your issue fill in the basic information below using the options provided Serverless Java Container version: 1.9 Framework version: SpringBoot 3.0.0 Scenario We would like to be able to use Spring Boot 3 in our Lambda de...
Open Graph Description: To help us debug your issue fill in the basic information below using the options provided Serverless Java Container version: 1.9 Framework version: SpringBoot 3.0.0 Scenario We would like to be ab...
X Description: To help us debug your issue fill in the basic information below using the options provided Serverless Java Container version: 1.9 Framework version: SpringBoot 3.0.0 Scenario We would like to be ab...
Opengraph URL: https://github.com/aws/serverless-java-container/issues/487
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Provide Spring Boot 3 support","articleBody":"*To help us debug your issue fill in the basic information below using the options provided*\r\n\r\n*Serverless Java Container version*: 1.9\r\n\r\n*Framework version:* SpringBoot 3.0.0\r\n\r\n## Scenario\r\nWe would like to be able to use Spring Boot 3 in our Lambda development.\r\n\r\n## Expected behavior\r\nTo fully support Spring Boot 3\r\n\r\n## Actual behavior\r\nDue to the `javax` to `jakarta` namespace/package change in JakartaEE and associated Spring Boot 3 use, the current aws-serverless-java-container does not startup.\r\n\r\n## Steps to reproduce\r\nDeploy a Spring Boot 3 Lambda using the `com.amazonaws.serverless:aws-serverless-java-container-springboot2:1.9` into AWS SAM local\r\n\r\n## Full log output\r\n*Paste the full log output from the Lambda function's CloudWatch logs*\r\n\r\n```\r\n***************************\r\nAPPLICATION FAILED TO START\r\n***************************\r\n\r\nDescription:\r\n\r\nAn attempt was made to call a method that does not exist. The attempt was made from the following location:\r\n\r\n com.amazonaws.serverless.proxy.spring.embedded.ServerlessServletEmbeddedServerFactory.getWebServer(ServerlessServletEmbeddedServerFactory.java:44)\r\n\r\nThe following method did not exist:\r\n\r\n 'void org.springframework.boot.web.servlet.ServletContextInitializer.onStartup(javax.servlet.ServletContext)'\r\n\r\nThe calling method's class, com.amazonaws.serverless.proxy.spring.embedded.ServerlessServletEmbeddedServerFactory, was loaded from the following location:\r\n\r\n jar:file:/var/task/lib/aws-serverless-java-container-springboot2-1.9.jar!/com/amazonaws/serverless/proxy/spring/embedded/ServerlessServletEmbeddedServerFactory.class\r\n\r\nThe called method's class, org.springframework.boot.web.servlet.ServletContextInitializer, is available from the following locations:\r\n\r\n jar:file:/var/task/lib/spring-boot-3.0.0.jar!/org/springframework/boot/web/servlet/ServletContextInitializer.class\r\n\r\nThe called method's class hierarchy was loaded from the following locations:\r\n\r\n org.springframework.boot.web.servlet.ServletContextInitializer: file:/var/task/lib/spring-boot-3.0.0.jar\r\n\r\n\r\nAction:\r\n\r\nCorrect the classpath of your application so that it contains compatible versions of the classes com.amazonaws.serverless.proxy.spring.embedded.ServerlessServletEmbeddedServerFactory and org.springframework.boot.web.servlet.ServletContextInitializer\r\n\r\nUnable to start web server: org.springframework.context.ApplicationContextException\r\norg.springframework.context.ApplicationContextException: Unable to start web server\r\n at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:164)\r\n at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:578)\r\n at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)\r\n at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730)\r\n at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432)\r\n at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)\r\n at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:150)\r\n at com.amazonaws.serverless.proxy.spring.SpringBootLambdaContainerHandler.initialize(SpringBootLambdaContainerHandler.java:195)\r\n at com.amazonaws.serverless.proxy.InitializationWrapper.start(InitializationWrapper.java:35)\r\n at com.amazonaws.serverless.proxy.spring.SpringBootProxyHandlerBuilder.buildAndInitialize(SpringBootProxyHandlerBuilder.java:81)\r\n at com.amazonaws.serverless.proxy.spring.SpringBootLambdaContainerHandler.getHttpApiV2ProxyHandler(SpringBootLambdaContainerHandler.java:110)\r\n at uk.co.mosaicisland.apihub.LambdaHandler.\u003cinit>(LambdaHandler.kt:24)\r\n at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)\r\n at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)\r\n at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:484)\r\nCaused by: java.lang.NoSuchMethodError: 'void org.springframework.boot.web.servlet.ServletContextInitializer.onStartup(javax.servlet.ServletContext)'\r\n at com.amazonaws.serverless.proxy.spring.embedded.ServerlessServletEmbeddedServerFactory.getWebServer(ServerlessServletEmbeddedServerFactory.java:44)\r\n at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:183)\r\n at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:161)\r\n ... 14 more\r\n```\r\n\r\nPlease note that in the short term, I've forked this project and migrated the code to support Spring Boot 3. It's far from optimal and some functionality is disabled or left unimplemented. It serves our needs for the moment, but we switch to an official Spring Boot 3 version when you have it ready.","author":{"url":"https://github.com/garethpowell","@type":"Person","name":"garethpowell"},"datePublished":"2022-12-01T16:29:48Z","url":"https://github.com/aws/serverless-java-container/issues/487"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4b2cde04-c069-8636-a1ba-39ba4fa614a4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E9DA:24FA46:92DB62:C77BB7:6AFE5ED7 |
| html-safe-nonce | 7fb18a7886c88dd6e98b4c82e3cb6cbda3849500f1b30dc0e9cc5ee444ba4588 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOURBOjI0RkE0Njo5MkRCNjI6Qzc3QkI3OjZBRkU1RUQ3IiwidmlzaXRvcl9pZCI6IjY3MzUxMTM1OTgzMjI4NDg4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 431d81820cd7e0495a5df3e168d5124c59b6592e29b30987b015d4c5a104e33f |
| hovercard-subject-tag | issue:1471607593 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/aws/serverless-java-container/487/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a7129000e98231e57c66710893f633fe0e312c32930b699e01d33ad2e1683120/aws/serverless-java-container/issues/487 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a7129000e98231e57c66710893f633fe0e312c32930b699e01d33ad2e1683120/aws/serverless-java-container/issues/487 |
| og:image:alt | To help us debug your issue fill in the basic information below using the options provided Serverless Java Container version: 1.9 Framework version: SpringBoot 3.0.0 Scenario We would like to be ab... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | garethpowell |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| go-import | github.com/aws/serverless-java-container git https://github.com/aws/serverless-java-container.git |
| octolytics-dimension-user_id | 2232217 |
| octolytics-dimension-user_login | aws |
| octolytics-dimension-repository_id | 75661534 |
| octolytics-dimension-repository_nwo | aws/serverless-java-container |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 75661534 |
| octolytics-dimension-repository_network_root_nwo | aws/serverless-java-container |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width