Native image support AmazonDynamoDBClientBuilder
To help us debug your issue fill in the basic information below using the options provided
Serverless Java Container version: 2.0.1
Implementations: / Spring Boot3 /
Framework version: eg SpringBoot 3.3.4
Frontend service: ServerlessHttpApi
Deployment method: SAM
Scenario
Run native image using samples/springboot3/pet-store-native I add dependency and update controller
Expected behavior
respond to get request
Actual behavior
internal server error
Steps to reproduce
add dependency
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-dynamodb</artifactId>
<version>1.12.744</version>
</dependency>
update controller
@RestController
@RequestMapping("/orders")
public class HelloController {
private final AmazonDynamoDB client;
public HelloController(){
client = AmazonDynamoDBClientBuilder.standard()
.withRegion(Regions.US_EAST_1)
.build();
}
@GetMapping
public List<DeliveryOrder> getOrders() {
return getOrdersList();
}
public List<DeliveryOrder> getOrdersList(){
ScanRequest scanRequest2 = new ScanRequest().withTableName("WeatherData");
ScanResult scan = client.scan(scanRequest2);
return scan.getItems().stream().map(this::toDeliveryOrder).toList();
}
private DeliveryOrder toDeliveryOrder(Map<String, AttributeValue> item) {
return new DeliveryOrder(item.get("Location").getS(),item.get("Date").getS(), parseInt(item.get("Precipitation").getS()));
}
}
update template
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Serverless Java Container GraalVM
Resources:
WeatherData:
Type: AWS::DynamoDB::Table
DeletionPolicy: Delete
Properties:
TableName: WeatherData
AttributeDefinitions:
- AttributeName: Location
AttributeType: S
KeySchema:
- AttributeName: Location
KeyType: HASH
BillingMode: PAY_PER_REQUEST
ServerlessWebNativeFunction:
Type: AWS::Serverless::Function
Properties:
MemorySize: 512
FunctionName: pet-store-native
Timeout: 15
CodeUri: ./target/pet-store-native-0.0.1-SNAPSHOT-native-zip.zip
Handler: NOP
Runtime: provided.al2023
Policies:
- DynamoDBCrudPolicy:
TableName: !Ref WeatherData
Events:
HttpApiEvent:
Type: HttpApi
Properties:
TimeoutInMillis: 20000
PayloadFormatVersion: '1.0'
Globals:
Api:
EndpointConfiguration: REGIONAL
Outputs:
ServerlessWebNativeApi:
Description: URL for application
Value: !Sub 'https://${ServerlessHttpApi}.execute-api.${AWS::Region}.amazonaws.com/orders'
Export:
Name: ServerlessWebNativeApi
**
Full log output
Paste the full log output from the Lambda function's CloudWatch logs
2024-10-21T09:39:40.554Z
:: Spring Boot :: (v3.3.4)
2024-10-21T09:39:40.614Z
2024-10-21T09:39:40.614Z INFO 9 --- [ main] c.a.s.p.s.AwsSpringWebRuntimeInitializer : AWS Environment: {_AWS_XRAY_DAEMON_PORT=2000, SHLVL=1, _HANDLER=NOP, TZ=:UTC, AWS_LAMBDA_FUNCTION_NAME=ln, AWS_REGION=us-east-1, AWS_LAMBDA_FUNCTION_MEMORY_SIZE=512, AWS_XRAY_DAEMON_ADDRESS=169.254.79.129:2000, AWS_DEFAULT_REGION=us-east-1, AWS_LAMBDA_LOG_GROUP_NAME=/aws/lambda/ln, PATH=/usr/local/bin:/usr/bin/:/bin:/opt/bin, AWS_LAMBDA_LOG_STREAM_NAME=2024/10/21/[$LATEST]331de34f6f5a4c2096f698f360bcf690, AWS_LAMBDA_INITIALIZATION_TYPE=on-demand, LANG=en_US.UTF-8, LAMBDA_RUNTIME_DIR=/var/runtime, AWS_LAMBDA_RUNTIME_API=127.0.0.1:9001, AWS_LAMBDA_FUNCTION_VERSION=$LATEST, AWS_XRAY_CONTEXT_MISSING=LOG_ERROR, _AWS_XRAY_DAEMON_ADDRESS=169.254.79.129, OLDPWD=/var/task, LAMBDA_TASK_ROOT=/var/task, LD_LIBRARY_PATH=/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib, PWD=/var/task, _=./ln}
2024-10-21T09:39:40.615Z
2024-10-21T09:39:40.615Z INFO 9 --- [ main] c.a.s.p.s.AwsSpringWebRuntimeInitializer : AWS Handler: NOP
2024-10-21T09:39:40.632Z
2024-10-21T09:39:40.632Z INFO 9 --- [ main] c.a.s.s.springboot3.DemoApplication : Starting AOT-processed DemoApplication using Java 21.0.2 with PID 9 (/var/task/ln started by sbx_user1051 in /var/task)
2024-10-21T09:39:40.632Z
2024-10-21T09:39:40.632Z INFO 9 --- [ main] c.a.s.s.springboot3.DemoApplication : No active profile set, falling back to 1 default profile: "default"
2024-10-21T09:39:40.670Z
2024-10-21T09:39:40.670Z INFO 9 --- [ main] o.s.c.f.s.w.ServerlessAutoConfiguration : Configuring Serverless Web Container
2024-10-21T09:39:40.693Z
2024-10-21T09:39:40.693Z INFO 9 --- [ main] o.s.c.f.s.w.ServerlessAutoConfiguration : Initializing DispatcherServlet
2024-10-21T09:39:40.693Z
2024-10-21T09:39:40.693Z INFO 9 --- [ main] o.s.c.f.s.web.ServerlessServletContext : Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-10-21T09:39:40.693Z
2024-10-21T09:39:40.693Z INFO 9 --- [ main] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2024-10-21T09:39:40.875Z
2024-10-21T09:39:40.875Z INFO 9 --- [ main] o.s.web.servlet.DispatcherServlet : Completed initialization in 182 ms
2024-10-21T09:39:40.875Z
2024-10-21T09:39:40.875Z INFO 9 --- [ main] o.s.c.f.s.w.ServerlessAutoConfiguration : Initalized DispatcherServlet
2024-10-21T09:39:40.892Z
2024-10-21T09:39:40.892Z WARN 9 --- [ main] w.s.c.ServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helloController': Instantiation of supplied bean failed
2024-10-21T09:39:40.892Z
Application run failed
2024-10-21T09:39:40.892Z
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helloController': Instantiation of supplied bean failed
2024-10-21T09:39:40.893Z
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1243)
2024-10-21T09:39:40.893Z
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1180)
2024-10-21T09:39:40.893Z
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
2024-10-21T09:39:40.893Z
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
2024-10-21T09:39:40.893Z
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337)
2024-10-21T09:39:40.893Z
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
2024-10-21T09:39:40.893Z
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335)
2024-10-21T09:39:40.893Z
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
2024-10-21T09:39:40.893Z
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:975)
2024-10-21T09:39:40.893Z
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:971)
2024-10-21T09:39:40.893Z
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:625)
2024-10-21T09:39:40.893Z
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
2024-10-21T09:39:40.893Z
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
2024-10-21T09:39:40.893Z
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
2024-10-21T09:39:40.893Z
at org.springframework.boot.SpringApplication.run(SpringApplication.java:335)
2024-10-21T09:39:40.893Z
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363)
2024-10-21T09:39:40.893Z
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352)
2024-10-21T09:39:40.893Z
at com.amazonaws.serverless.sample.springboot3.DemoApplication.main(DemoApplication.java:10)
2024-10-21T09:39:40.893Z
at [email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
2024-10-21T09:39:40.893Z
Caused by: com.amazonaws.SdkClientException: Unable to load partition metadata from com/amazonaws/partitions/endpoints.json
2024-10-21T09:39:40.893Z
at com.amazonaws.partitions.PartitionsLoader.build(PartitionsLoader.java:82)
2024-10-21T09:39:40.893Z
at com.amazonaws.regions.RegionMetadataFactory.create(RegionMetadataFactory.java:30)
2024-10-21T09:39:40.893Z
at com.amazonaws.regions.RegionUtils.initialize(RegionUtils.java:64)
2024-10-21T09:39:40.893Z
at com.amazonaws.regions.RegionUtils.getRegionMetadata(RegionUtils.java:52)
2024-10-21T09:39:40.893Z
at com.amazonaws.regions.RegionUtils.getRegion(RegionUtils.java:106)
2024-10-21T09:39:40.893Z
at com.amazonaws.client.builder.AwsClientBuilder.getRegionObject(AwsClientBuilder.java:256)
2024-10-21T09:39:40.893Z
at com.amazonaws.client.builder.AwsClientBuilder.withRegion(AwsClientBuilder.java:245)
2024-10-21T09:39:40.893Z
at com.amazonaws.client.builder.AwsClientBuilder.withRegion(AwsClientBuilder.java:232)
2024-10-21T09:39:40.893Z
at com.amazonaws.serverless.sample.springboot3.HelloController.<init>(HelloController.java:30)
2024-10-21T09:39:40.893Z
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainInstanceFromSupplier(AbstractAutowireCapableBeanFactory.java:1277)
2024-10-21T09:39:40.893Z
at org.springframework.beans.factory.support.DefaultListableBeanFactory.obtainInstanceFromSupplier(DefaultListableBeanFactory.java:951)
2024-10-21T09:39:40.893Z
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1237)
2024-10-21T09:39:40.893Z
... 18 more
2024-10-21T09:39:40.912Z
INIT_REPORT Init Duration: 1503.18 ms Phase: invoke Status: error Error Type: Runtime.ExitError
2024-10-21T09:39:40.912Z
START RequestId: 54bcdaa3-b650-4606-9944-ff76e910a26b Version: $LATEST
2024-10-21T09:39:40.913Z
RequestId: 54bcdaa3-b650-4606-9944-ff76e910a26b Error: Runtime exited with error: exit status 1 Runtime.ExitError
2024-10-21T09:39:40.913Z
END RequestId: 54bcdaa3-b650-4606-9944-ff76e910a26b
2024-10-21T09:39:40.913Z
REPORT RequestId: 54bcdaa3-b650-4606-9944-ff76e910a26b Duration: 1504.53 ms Billed Duration: 1505 ms Memory Size: 512 MB Max Memory Used: 80 MB
2024-10-21T09:39:40.943Z
INIT_START Runtime Version: provided:al2023.v30 Runtime Version ARN: arn:aws:lambda:us-east-1::runtime:30773c51f62ce897f99bf1867de
Can you please try AWS SDK v2 software.amazon.awssdk:dynamodb:2.28.26 instead of the v1 client?
By the way your log output accidentally exposed certain secrets. While I've edited and remove them, please rotate the credentials.
Hello! Thank you about credentials and never version dependencies. When I updated POST and GET methods work. When I use get with path parameter, put and delete methods I get error here is controller methods
@GetMapping(value = "/{email}", produces = "application/json")
public ResponseEntity<DeliveryOrder> getOrderByEmail(@PathVariable String email) {
LOG.info("The email to find is: " + email);
DeliveryOrder order = findOrder(email);
LOG.info("The found order's email is: " + order.getEmail());
return new ResponseEntity<>(order, HttpStatus.OK);
}
@PutMapping(value = "/{email}", produces = "application/json", consumes = "application/json")
public ResponseEntity<String> updateOrder(@PathVariable String email, @RequestBody DeliveryOrder order) {
LOG.info("The email to update is: " + email);
DeliveryOrder existingOrder = findOrder(email);
updateDeliveryNotNullAttributes(existingOrder, order);
putOrder(existingOrder);
LOG.info("The updated order's email is: " + existingOrder.getEmail());
return new ResponseEntity<>(order.toString(), HttpStatus.OK);
}
@DeleteMapping(value = "/{email}", produces = "application/json")
public ResponseEntity<String> deleteCourse(@PathVariable String email) {
LOG.info("The email to delete is: " + email);
String deleted = deleteOrder(email);
if (deleted.equals("not found")) {
return new ResponseEntity<>(deleted, HttpStatus.NOT_FOUND);
} else {
return new ResponseEntity<>(deleted, HttpStatus.NO_CONTENT);
}
}
here is error
2024-10-23T11:14:00.112Z ERROR 9 --- [pool-5-thread-1] o.s.c.f.serverless.web.ServerlessMVC : Failed processing the request to: /error
2024-10-23T11:14:00.114Z
jakarta.servlet.ServletException: Request processing failed: java.lang.NullPointerException
2024-10-23T11:14:00.114Z
I logged all dynamoDB responses and I strongly believe this is not DB or code problem and full log
2024-10-23T11:14:00.106Z
START RequestId: 10080c66-7cbe-4394-aa98-f8c1e84d83c4 Version: $LATEST
2024-10-23T11:14:00.107Z
2024-10-23T11:14:00.106Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : The email to find is: [email protected]
2024-10-23T11:14:00.107Z
2024-10-23T11:14:00.107Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : searching: [email protected]
2024-10-23T11:14:00.112Z
2024-10-23T11:14:00.112Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : found keys: quantity, notes, address, city, phone, name, deliveryDate, email, status
2024-10-23T11:14:00.112Z
2024-10-23T11:14:00.112Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : found values: AttributeValue(S=7), AttributeValue(S=aa), AttributeValue(S=Bankova Sr. 1/3), AttributeValue(S=Kiev), AttributeValue(S=+380977777777), AttributeValue(S=Saam Best), AttributeValue(S=09/09/2024), AttributeValue([email protected]), AttributeValue(S=UNPROCESSED)
2024-10-23T11:14:00.112Z
2024-10-23T11:14:00.112Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : The found order's email is: [email protected]
2024-10-23T11:14:00.114Z
2024-10-23T11:14:00.112Z ERROR 9 --- [pool-5-thread-1] o.s.c.f.serverless.web.ServerlessMVC : Failed processing the request to: /error
2024-10-23T11:14:00.114Z
jakarta.servlet.ServletException: Request processing failed: java.lang.NullPointerException
2024-10-23T11:14:00.114Z
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1022) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:527) ~[native:6.0.0]
2024-10-23T11:14:00.114Z
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614) ~[native:6.0.0]
2024-10-23T11:14:00.114Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain$ServletFilterProxy.doFilter(ServerlessMVC.java:303) ~[na:na]
2024-10-23T11:14:00.114Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-10-23T11:14:00.114Z
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-10-23T11:14:00.114Z
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-10-23T11:14:00.114Z
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-10-23T11:14:00.114Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC.service(ServerlessMVC.java:167) ~[na:na]
2024-10-23T11:14:00.114Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC.service(ServerlessMVC.java:162) ~[na:na]
2024-10-23T11:14:00.114Z
at com.amazonaws.serverless.proxy.spring.AwsSpringHttpProcessingUtils.processRequest(AwsSpringHttpProcessingUtils.java:51) ~[na:na]
2024-10-23T11:14:00.114Z
at com.amazonaws.serverless.proxy.spring.AwsSpringWebCustomRuntimeEventLoop.eventLoop(AwsSpringWebCustomRuntimeEventLoop.java:131) ~[na:na]
2024-10-23T11:14:00.114Z
at com.amazonaws.serverless.proxy.spring.AwsSpringWebCustomRuntimeEventLoop.lambda$run$0(AwsSpringWebCustomRuntimeEventLoop.java:75) ~[na:na]
2024-10-23T11:14:00.114Z
at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[native:na]
2024-10-23T11:14:00.114Z
at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
2024-10-23T11:14:00.114Z
at [email protected]/java.lang.Thread.runWith(Thread.java:1596) ~[native:na]
2024-10-23T11:14:00.114Z
at [email protected]/java.lang.Thread.run(Thread.java:1583) ~[native:na]
2024-10-23T11:14:00.114Z
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:833) ~[native:na]
2024-10-23T11:14:00.114Z
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211) ~[na:na]
2024-10-23T11:14:00.114Z
Caused by: java.lang.NullPointerException: null
2024-10-23T11:14:00.114Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.resolveMediaType(AbstractMessageConverterMethodProcessor.java:505) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.safeExtension(AbstractMessageConverterMethodProcessor.java:498) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.addContentDispositionHeader(AbstractMessageConverterMethodProcessor.java:473) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:295) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor.handleReturnValue(HttpEntityMethodProcessor.java:245) ~[na:na]
2024-10-23T11:14:00.114Z
at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:78) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:136) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[native:6.1.13]
2024-10-23T11:14:00.114Z
... 26 common frames omitted
2024-10-23T11:14:00.118Z
2024-10-23T11:14:00.118Z INFO 9 --- [pool-5-thread-1] s.p.s.AwsSpringWebCustomRuntimeEventLoop : Result POST status: <202 ACCEPTED Accepted,[B@55480a7d,[Content-Type:"application/json", Date:"Wed, 23 Oct 2024 11:14:00 GMT", Content-Length:"16"]>
2024-10-23T11:14:00.118Z
END RequestId: 10080c66-7cbe-4394-aa98-f8c1e84d83c4
2024-10-23T11:14:00.118Z
REPORT RequestId: 10080c66-7cbe-4394-aa98-f8c1e84d83c4 Duration: 12.71 ms Billed Duration: 13 ms Memory Size: 512 MB Max Memory Used: 136 MB
2024-10-23T11:14:12.896Z
START RequestId: a11de94a-f17d-4004-90f3-e6ab37cba88a Version: $LATEST
2024-10-23T11:14:12.897Z
2024-10-23T11:14:12.896Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : The email to update is: [email protected]
2024-10-23T11:14:12.897Z
2024-10-23T11:14:12.897Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : searching: [email protected]
2024-10-23T11:14:12.902Z
2024-10-23T11:14:12.902Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : found keys: quantity, notes, address, city, phone, name, deliveryDate, email, status
2024-10-23T11:14:12.902Z
2024-10-23T11:14:12.902Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : found values: AttributeValue(S=7), AttributeValue(S=aa), AttributeValue(S=Bankova Sr. 1/3), AttributeValue(S=Kiev), AttributeValue(S=+380977777777), AttributeValue(S=Saam Best), AttributeValue(S=09/09/2024), AttributeValue([email protected]), AttributeValue(S=UNPROCESSED)
2024-10-23T11:14:12.902Z
2024-10-23T11:14:12.902Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : putting order: [email protected]
2024-10-23T11:14:12.907Z
2024-10-23T11:14:12.906Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : The updated order's email is: [email protected]
2024-10-23T11:14:12.907Z
2024-10-23T11:14:12.907Z ERROR 9 --- [pool-5-thread-1] o.s.c.f.serverless.web.ServerlessMVC : Failed processing the request to: /error
2024-10-23T11:14:12.907Z
jakarta.servlet.ServletException: Request processing failed: java.lang.NullPointerException
2024-10-23T11:14:12.907Z
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1022) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:925) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:550) ~[native:6.0.0]
2024-10-23T11:14:12.907Z
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614) ~[native:6.0.0]
2024-10-23T11:14:12.907Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain$ServletFilterProxy.doFilter(ServerlessMVC.java:303) ~[na:na]
2024-10-23T11:14:12.907Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-10-23T11:14:12.907Z
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-10-23T11:14:12.907Z
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-10-23T11:14:12.907Z
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-10-23T11:14:12.907Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC.service(ServerlessMVC.java:167) ~[na:na]
2024-10-23T11:14:12.907Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC.service(ServerlessMVC.java:162) ~[na:na]
2024-10-23T11:14:12.907Z
at com.amazonaws.serverless.proxy.spring.AwsSpringHttpProcessingUtils.processRequest(AwsSpringHttpProcessingUtils.java:51) ~[na:na]
2024-10-23T11:14:12.907Z
at com.amazonaws.serverless.proxy.spring.AwsSpringWebCustomRuntimeEventLoop.eventLoop(AwsSpringWebCustomRuntimeEventLoop.java:131) ~[na:na]
2024-10-23T11:14:12.907Z
at com.amazonaws.serverless.proxy.spring.AwsSpringWebCustomRuntimeEventLoop.lambda$run$0(AwsSpringWebCustomRuntimeEventLoop.java:75) ~[na:na]
2024-10-23T11:14:12.907Z
at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[native:na]
2024-10-23T11:14:12.907Z
at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
2024-10-23T11:14:12.907Z
at [email protected]/java.lang.Thread.runWith(Thread.java:1596) ~[native:na]
2024-10-23T11:14:12.907Z
at [email protected]/java.lang.Thread.run(Thread.java:1583) ~[native:na]
2024-10-23T11:14:12.907Z
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:833) ~[native:na]
2024-10-23T11:14:12.907Z
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211) ~[na:na]
2024-10-23T11:14:12.907Z
Caused by: java.lang.NullPointerException: null
2024-10-23T11:14:12.907Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.resolveMediaType(AbstractMessageConverterMethodProcessor.java:505) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.safeExtension(AbstractMessageConverterMethodProcessor.java:498) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.addContentDispositionHeader(AbstractMessageConverterMethodProcessor.java:473) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:295) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor.handleReturnValue(HttpEntityMethodProcessor.java:245) ~[na:na]
2024-10-23T11:14:12.907Z
at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:78) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:136) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[native:6.1.13]
2024-10-23T11:14:12.907Z
... 26 common frames omitted
2024-10-23T11:14:12.910Z
2024-10-23T11:14:12.909Z INFO 9 --- [pool-5-thread-1] s.p.s.AwsSpringWebCustomRuntimeEventLoop : Result POST status: <202 ACCEPTED Accepted,[B@12a19f5f,[Content-Type:"application/json", Date:"Wed, 23 Oct 2024 11:14:12 GMT", Content-Length:"16"]>
2024-10-23T11:14:12.910Z
END RequestId: a11de94a-f17d-4004-90f3-e6ab37cba88a
2024-10-23T11:14:12.910Z
REPORT RequestId: a11de94a-f17d-4004-90f3-e6ab37cba88a Duration: 14.54 ms Billed Duration: 15 ms Memory Size: 512 MB Max Memory Used: 137 MB
2024-10-23T11:14:21.322Z
START RequestId: e429cc92-5af8-4dc2-a520-114de044d10b Version: $LATEST
2024-10-23T11:14:21.322Z
2024-10-23T11:14:21.322Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : The email to delete is: [email protected]
2024-10-23T11:14:21.323Z
2024-10-23T11:14:21.322Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : deleting email: [email protected]
2024-10-23T11:14:21.329Z
2024-10-23T11:14:21.329Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : deleting status: 200
2024-10-23T11:14:21.330Z
2024-10-23T11:14:21.329Z ERROR 9 --- [pool-5-thread-1] o.s.c.f.serverless.web.ServerlessMVC : Failed processing the request to: /error
2024-10-23T11:14:21.330Z
jakarta.servlet.ServletException: Request processing failed: java.lang.NullPointerException
2024-10-23T11:14:21.330Z
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1022) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.web.servlet.FrameworkServlet.doDelete(FrameworkServlet.java:936) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:553) ~[native:6.0.0]
2024-10-23T11:14:21.330Z
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614) ~[native:6.0.0]
2024-10-23T11:14:21.330Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain$ServletFilterProxy.doFilter(ServerlessMVC.java:303) ~[na:na]
2024-10-23T11:14:21.330Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-10-23T11:14:21.330Z
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-10-23T11:14:21.330Z
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-10-23T11:14:21.330Z
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-10-23T11:14:21.330Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC.service(ServerlessMVC.java:167) ~[na:na]
2024-10-23T11:14:21.330Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC.service(ServerlessMVC.java:162) ~[na:na]
2024-10-23T11:14:21.330Z
at com.amazonaws.serverless.proxy.spring.AwsSpringHttpProcessingUtils.processRequest(AwsSpringHttpProcessingUtils.java:51) ~[na:na]
2024-10-23T11:14:21.330Z
at com.amazonaws.serverless.proxy.spring.AwsSpringWebCustomRuntimeEventLoop.eventLoop(AwsSpringWebCustomRuntimeEventLoop.java:131) ~[na:na]
2024-10-23T11:14:21.330Z
at com.amazonaws.serverless.proxy.spring.AwsSpringWebCustomRuntimeEventLoop.lambda$run$0(AwsSpringWebCustomRuntimeEventLoop.java:75) ~[na:na]
2024-10-23T11:14:21.330Z
at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[native:na]
2024-10-23T11:14:21.330Z
at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
2024-10-23T11:14:21.330Z
at [email protected]/java.lang.Thread.runWith(Thread.java:1596) ~[native:na]
2024-10-23T11:14:21.330Z
at [email protected]/java.lang.Thread.run(Thread.java:1583) ~[native:na]
2024-10-23T11:14:21.330Z
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:833) ~[native:na]
2024-10-23T11:14:21.330Z
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211) ~[na:na]
2024-10-23T11:14:21.330Z
Caused by: java.lang.NullPointerException: null
2024-10-23T11:14:21.330Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.resolveMediaType(AbstractMessageConverterMethodProcessor.java:505) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.safeExtension(AbstractMessageConverterMethodProcessor.java:498) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.addContentDispositionHeader(AbstractMessageConverterMethodProcessor.java:473) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:295) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor.handleReturnValue(HttpEntityMethodProcessor.java:245) ~[na:na]
2024-10-23T11:14:21.330Z
at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:78) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:136) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[native:6.1.13]
2024-10-23T11:14:21.330Z
... 26 common frames omitted
2024-10-23T11:14:21.333Z
2024-10-23T11:14:21.333Z INFO 9 --- [pool-5-thread-1] s.p.s.AwsSpringWebCustomRuntimeEventLoop : Result POST status: <202 ACCEPTED Accepted,[B@24a6c30b,[Content-Type:"application/json", Date:"Wed, 23 Oct 2024 11:14:21 GMT", Content-Length:"16"]>
2024-10-23T11:14:21.334Z
END RequestId: e429cc92-5af8-4dc2-a520-114de044d10b
@olegz would you mind taking a look? It looks like the ServletContext might be missing when entering via AwsSpringWebCustomRuntimeEventLoop.
@deki I am suspecting that the issue is with this code:
public HelloController(){
client = AmazonDynamoDBClientBuilder.standard()
.withRegion(Regions.US_EAST_1)
.build();
}
If you look at the logs you see this:
2024-10-21T09:39:40.875Z INFO 9 --- [ main] o.s.web.servlet.DispatcherServlet : Completed initialization in 182 ms
2024-10-21T09:39:40.875Z
2024-10-21T09:39:40.875Z INFO 9 --- [ main] o.s.c.f.s.w.ServerlessAutoConfiguration : Initalized DispatcherServlet
2024-10-21T09:39:40.892Z
2024-10-21T09:39:40.892Z WARN 9 --- [ main] w.s.c.ServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helloController': Instantiation of supplied bean failed
2024-10-21T09:39:40.892Z
Application run failed
2024-10-21T09:39:40.892Z
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helloController': Instantiation of supplied bean failed
2024-10-21T09:39:40.893Z
In other words exception happens during initialization of ApplicationContext and everything else propagates after.
Does this make sense?
@olegz this error is from the first log output but was already fixed by the reporter by using latest SDK. @VSVDEv would you be able to share a repo with a small project to reproduce the issue?
@olegz , @deki Here is an example https://github.com/VSVDEv/native Just to remind all dynamoDb operations work but return status getByID, update, delete where I use @PathVariable String email
{
"timestamp": "2024-11-01T10:10:19.312+00:00",
"status": 500,
"error": "Internal Server Error",
"path": "/orders/[email protected]"
}
here fresh log
024-11-01T10:09:57.758Z
INIT_START Runtime Version: provided:al2023.v40 Runtime Version ARN: arn:aws:lambda:us-east-1::runtime:487d61ebf0ff2f6cbe0e03a3f8b640a29904a77edd8eafc6fce1ce532c5ac313
2024-11-01T10:09:58.214Z
. ____ _ __ _ _
2024-11-01T10:09:58.214Z
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
2024-11-01T10:09:58.214Z
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
2024-11-01T10:09:58.214Z
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
2024-11-01T10:09:58.214Z
' |____| .__|_| |_|_| |_\__, | / / / /
2024-11-01T10:09:58.214Z
=========|_|==============|___/=/_/_/_/
2024-11-01T10:09:58.218Z
:: Spring Boot :: (v3.3.4)
2024-11-01T10:09:58.244Z
2024-11-01T10:09:58.242Z INFO 9 --- [ main] c.a.s.p.s.AwsSpringWebRuntimeInitializer : AWS Environment: {_AWS_XRAY_DAEMON_PORT=2000, SHLVL=1, _HANDLER=NOP, TZ=:UTC, AWS_LAMBDA_FUNCTION_NAME=native, AWS_REGION=us-east-1, AWS_LAMBDA_FUNCTION_MEMORY_SIZE=512, AWS_XRAY_DAEMON_ADDRESS=169.254.79.129:2000, AWS_DEFAULT_REGION=us-east-1, AWS_LAMBDA_LOG_GROUP_NAME=/aws/lambda/native, PATH=/usr/local/bin:/usr/bin/:/bin:/opt/bin, AWS_LAMBDA_LOG_STREAM_NAME=2024/11/01/[$LATEST]5f767, AWS_LAMBDA_INITIALIZATION_TYPE=on-demand, LANG=en_US.UTF-8, LAMBDA_RUNTIME_DIR=/var/runtime, AWS_LAMBDA_RUNTIME_API=127.0.0.1:9001, AWS_LAMBDA_FUNCTION_VERSION=$LATEST, AWS_XRAY_CONTEXT_MISSING=LOG_ERROR, _, OLDPWD=/var/task, LAMBDA_TASK_ROOT=/var/task, LD_LIBRARY_PATH=/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib, PWD=/var/task, _=./native, ORDERS_TABLE=DeliveryOrder}
2024-11-01T10:09:58.245Z
2024-11-01T10:09:58.245Z INFO 9 --- [ main] c.a.s.p.s.AwsSpringWebRuntimeInitializer : AWS Handler: NOP
2024-11-01T10:09:58.249Z
2024-11-01T10:09:58.249Z INFO 9 --- [ main] vsvdev.co.ua.Application : Starting AOT-processed Application using Java 21.0.2 with PID 9 (/var/task/native started by sbx_user1051 in /var/task)
2024-11-01T10:09:58.249Z
2024-11-01T10:09:58.249Z INFO 9 --- [ main] vsvdev.co.ua.Application : No active profile set, falling back to 1 default profile: "default"
2024-11-01T10:09:58.260Z
2024-11-01T10:09:58.260Z INFO 9 --- [ main] o.s.c.f.s.w.ServerlessAutoConfiguration : Configuring Serverless Web Container
2024-11-01T10:09:58.274Z
2024-11-01T10:09:58.273Z INFO 9 --- [ main] o.s.c.f.s.w.ServerlessAutoConfiguration : Initializing DispatcherServlet
2024-11-01T10:09:58.274Z
2024-11-01T10:09:58.274Z INFO 9 --- [ main] o.s.c.f.s.web.ServerlessServletContext : Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-11-01T10:09:58.274Z
2024-11-01T10:09:58.274Z INFO 9 --- [ main] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2024-11-01T10:09:58.344Z
2024-11-01T10:09:58.344Z INFO 9 --- [ main] o.s.web.servlet.DispatcherServlet : Completed initialization in 70 ms
2024-11-01T10:09:58.344Z
2024-11-01T10:09:58.344Z INFO 9 --- [ main] o.s.c.f.s.w.ServerlessAutoConfiguration : Initalized DispatcherServlet
2024-11-01T10:09:58.501Z
2024-11-01T10:09:58.501Z INFO 9 --- [pool-5-thread-1] s.p.s.AwsSpringWebCustomRuntimeEventLoop : Starting AWSWebRuntimeEventLoop
2024-11-01T10:09:58.501Z
2024-11-01T10:09:58.501Z INFO 9 --- [ main] vsvdev.co.ua.Application : Started Application in 0.357 seconds (process running for 0.693)
2024-11-01T10:09:58.501Z
2024-11-01T10:09:58.501Z INFO 9 --- [pool-5-thread-1] s.p.s.AwsSpringWebCustomRuntimeEventLoop : Entering event loop
2024-11-01T10:09:58.510Z
START RequestId: 6913046c-15b2-4956-8409-22788a7e5704 Version: $LATEST
2024-11-01T10:09:58.714Z
2024-11-01T10:09:58.714Z INFO 9 --- [pool-5-thread-1] s.p.s.AwsSpringWebCustomRuntimeEventLoop : Result POST status: <202 ACCEPTED Accepted,[B@512fd5bb,[Content-Type:"application/json", Date:"Fri, 01 Nov 2024 10:09:58 GMT", Content-Length:"16"]>
2024-11-01T10:09:58.716Z
END RequestId: 6913046c-15b2-4956-8409-22788a7e5704
2024-11-01T10:09:58.716Z
REPORT RequestId: 6913046c-15b2-4956-8409-22788a7e5704 Duration: 205.13 ms Billed Duration: 957 ms Memory Size: 512 MB Max Memory Used: 134 MB Init Duration: 751.82 ms
2024-11-01T10:10:05.054Z
START RequestId: 55280a1b-906c-4016-bb81-b6300961de99 Version: $LATEST
2024-11-01T10:10:05.055Z
2024-11-01T10:10:05.055Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : putting order: [email protected]
2024-11-01T10:10:05.066Z
2024-11-01T10:10:05.066Z INFO 9 --- [pool-5-thread-1] s.p.s.AwsSpringWebCustomRuntimeEventLoop : Result POST status: <202 ACCEPTED Accepted,[B@51e405c1,[Content-Type:"application/json", Date:"Fri, 01 Nov 2024 10:10:05 GMT", Content-Length:"16"]>
2024-11-01T10:10:05.067Z
END RequestId: 55280a1b-906c-4016-bb81-b6300961de99
2024-11-01T10:10:05.067Z
REPORT RequestId: 55280a1b-906c-4016-bb81-b6300961de99 Duration: 12.96 ms Billed Duration: 13 ms Memory Size: 512 MB Max Memory Used: 135 MB
2024-11-01T10:10:19.305Z
START RequestId: 1f783af0-9469-4458-9493-c36c8735ce6b Version: $LATEST
2024-11-01T10:10:19.306Z
2024-11-01T10:10:19.306Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : The email to find is: [email protected]
2024-11-01T10:10:19.306Z
2024-11-01T10:10:19.306Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : searching: [email protected]
2024-11-01T10:10:19.310Z
2024-11-01T10:10:19.310Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : found keys: quantity, notes, address, city, phone, name, deliveryDate, email, status
2024-11-01T10:10:19.310Z
2024-11-01T10:10:19.310Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : found values: AttributeValue(S=7), AttributeValue(S=aa), AttributeValue(S=Bankova Sr. 1/3), AttributeValue(S=Kiev), AttributeValue(S=+380977777777), AttributeValue(S=Saam Best), AttributeValue(S=09/09/2024), AttributeValue([email protected]), AttributeValue(S=UNPROCESSED)
2024-11-01T10:10:19.310Z
2024-11-01T10:10:19.310Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : The found order's email is: [email protected]
2024-11-01T10:10:19.312Z
2024-11-01T10:10:19.310Z ERROR 9 --- [pool-5-thread-1] o.s.c.f.serverless.web.ServerlessMVC : Failed processing the request to: /error
2024-11-01T10:10:19.312Z
jakarta.servlet.ServletException: Request processing failed: java.lang.NullPointerException
2024-11-01T10:10:19.312Z
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1022) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:527) ~[native:6.0.0]
2024-11-01T10:10:19.312Z
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614) ~[native:6.0.0]
2024-11-01T10:10:19.312Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain$ServletFilterProxy.doFilter(ServerlessMVC.java:303) ~[na:na]
2024-11-01T10:10:19.312Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-11-01T10:10:19.312Z
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-11-01T10:10:19.312Z
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-11-01T10:10:19.312Z
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-11-01T10:10:19.312Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC.service(ServerlessMVC.java:167) ~[na:na]
2024-11-01T10:10:19.312Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC.service(ServerlessMVC.java:162) ~[na:na]
2024-11-01T10:10:19.312Z
at com.amazonaws.serverless.proxy.spring.AwsSpringHttpProcessingUtils.processRequest(AwsSpringHttpProcessingUtils.java:51) ~[na:na]
2024-11-01T10:10:19.312Z
at com.amazonaws.serverless.proxy.spring.AwsSpringWebCustomRuntimeEventLoop.eventLoop(AwsSpringWebCustomRuntimeEventLoop.java:131) ~[na:na]
2024-11-01T10:10:19.312Z
at com.amazonaws.serverless.proxy.spring.AwsSpringWebCustomRuntimeEventLoop.lambda$run$0(AwsSpringWebCustomRuntimeEventLoop.java:75) ~[na:na]
2024-11-01T10:10:19.312Z
at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[native:na]
2024-11-01T10:10:19.312Z
at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
2024-11-01T10:10:19.312Z
at [email protected]/java.lang.Thread.runWith(Thread.java:1596) ~[native:na]
2024-11-01T10:10:19.312Z
at [email protected]/java.lang.Thread.run(Thread.java:1583) ~[native:na]
2024-11-01T10:10:19.312Z
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:833) ~[native:na]
2024-11-01T10:10:19.312Z
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211) ~[na:na]
2024-11-01T10:10:19.312Z
Caused by: java.lang.NullPointerException: null
2024-11-01T10:10:19.312Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.resolveMediaType(AbstractMessageConverterMethodProcessor.java:505) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.safeExtension(AbstractMessageConverterMethodProcessor.java:498) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.addContentDispositionHeader(AbstractMessageConverterMethodProcessor.java:473) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:295) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor.handleReturnValue(HttpEntityMethodProcessor.java:245) ~[na:na]
2024-11-01T10:10:19.312Z
at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:78) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:136) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[native:6.1.13]
2024-11-01T10:10:19.312Z
... 26 common frames omitted
2024-11-01T10:10:19.316Z
END RequestId: 1f783af0-9469-4458-9493-c36c8735ce6b
2024-11-01T10:10:19.316Z
REPORT RequestId: 1f783af0-9469-4458-9493-c36c8735ce6b Duration: 11.04 ms Billed Duration: 12 ms Memory Size: 512 MB Max Memory Used: 136 MB
2024-11-01T10:10:19.316Z
2024-11-01T10:10:19.315Z INFO 9 --- [pool-5-thread-1] s.p.s.AwsSpringWebCustomRuntimeEventLoop : Result POST status: <202 ACCEPTED Accepted,[B@66985079,[Content-Type:"application/json", Date:"Fri, 01 Nov 2024 10:10:19 GMT", Content-Length:"16"]>
2024-11-01T10:12:24.365Z
START RequestId: dca0d52f-b7d8-496e-8263-7fa32a2edec9 Version: $LATEST
2024-11-01T10:12:24.366Z
2024-11-01T10:12:24.366Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : The email to find is: [email protected]
2024-11-01T10:12:24.366Z
2024-11-01T10:12:24.366Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : searching: [email protected]
2024-11-01T10:12:24.389Z
2024-11-01T10:12:24.389Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : found keys: quantity, notes, address, city, phone, name, deliveryDate, email, status
2024-11-01T10:12:24.389Z
2024-11-01T10:12:24.389Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : found values: AttributeValue(S=7), AttributeValue(S=aa), AttributeValue(S=Bankova Sr. 1/3), AttributeValue(S=Kiev), AttributeValue(S=+380977777777), AttributeValue(S=Saam Best), AttributeValue(S=09/09/2024), AttributeValue([email protected]), AttributeValue(S=UNPROCESSED)
2024-11-01T10:12:24.389Z
2024-11-01T10:12:24.389Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : The found order's email is: [email protected]
2024-11-01T10:12:24.389Z
2024-11-01T10:12:24.389Z ERROR 9 --- [pool-5-thread-1] o.s.c.f.serverless.web.ServerlessMVC : Failed processing the request to: /error
2024-11-01T10:12:24.389Z
jakarta.servlet.ServletException: Request processing failed: java.lang.NullPointerException
2024-11-01T10:12:24.389Z
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1022) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:527) ~[native:6.0.0]
2024-11-01T10:12:24.389Z
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614) ~[native:6.0.0]
2024-11-01T10:12:24.389Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain$ServletFilterProxy.doFilter(ServerlessMVC.java:303) ~[na:na]
2024-11-01T10:12:24.389Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-11-01T10:12:24.389Z
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-11-01T10:12:24.389Z
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-11-01T10:12:24.389Z
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-11-01T10:12:24.389Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC.service(ServerlessMVC.java:167) ~[na:na]
2024-11-01T10:12:24.389Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC.service(ServerlessMVC.java:162) ~[na:na]
2024-11-01T10:12:24.389Z
at com.amazonaws.serverless.proxy.spring.AwsSpringHttpProcessingUtils.processRequest(AwsSpringHttpProcessingUtils.java:51) ~[na:na]
2024-11-01T10:12:24.389Z
at com.amazonaws.serverless.proxy.spring.AwsSpringWebCustomRuntimeEventLoop.eventLoop(AwsSpringWebCustomRuntimeEventLoop.java:131) ~[na:na]
2024-11-01T10:12:24.389Z
at com.amazonaws.serverless.proxy.spring.AwsSpringWebCustomRuntimeEventLoop.lambda$run$0(AwsSpringWebCustomRuntimeEventLoop.java:75) ~[na:na]
2024-11-01T10:12:24.389Z
at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[native:na]
2024-11-01T10:12:24.389Z
at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
2024-11-01T10:12:24.389Z
at [email protected]/java.lang.Thread.runWith(Thread.java:1596) ~[native:na]
2024-11-01T10:12:24.389Z
at [email protected]/java.lang.Thread.run(Thread.java:1583) ~[native:na]
2024-11-01T10:12:24.389Z
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:833) ~[native:na]
2024-11-01T10:12:24.389Z
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211) ~[na:na]
2024-11-01T10:12:24.389Z
Caused by: java.lang.NullPointerException: null
2024-11-01T10:12:24.389Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.resolveMediaType(AbstractMessageConverterMethodProcessor.java:505) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.safeExtension(AbstractMessageConverterMethodProcessor.java:498) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.addContentDispositionHeader(AbstractMessageConverterMethodProcessor.java:473) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:295) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor.handleReturnValue(HttpEntityMethodProcessor.java:245) ~[na:na]
2024-11-01T10:12:24.389Z
at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:78) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:136) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[native:6.1.13]
2024-11-01T10:12:24.389Z
... 26 common frames omitted
2024-11-01T10:12:24.392Z
2024-11-01T10:12:24.392Z INFO 9 --- [pool-5-thread-1] s.p.s.AwsSpringWebCustomRuntimeEventLoop : Result POST status: <202 ACCEPTED Accepted,[B@5984a741,[Content-Type:"application/json", Date:"Fri, 01 Nov 2024 10:12:24 GMT", Content-Length:"16"]>
2024-11-01T10:12:24.392Z
END RequestId: dca0d52f-b7d8-496e-8263-7fa32a2edec9
2024-11-01T10:12:24.392Z
REPORT RequestId: dca0d52f-b7d8-496e-8263-7fa32a2edec9 Duration: 26.79 ms Billed Duration: 27 ms Memory Size: 512 MB Max Memory Used: 137 MB
2024-11-01T10:12:38.011Z
START RequestId: b8b15b84-8696-497c-bc83-751c82bf6e4b Version: $LATEST
2024-11-01T10:12:38.012Z
2024-11-01T10:12:38.012Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : The email to delete is: [email protected]
2024-11-01T10:12:38.012Z
2024-11-01T10:12:38.012Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : deleting email: [email protected]
2024-11-01T10:12:38.019Z
2024-11-01T10:12:38.019Z INFO 9 --- [pool-5-thread-1] v.co.ua.controller.OrderController : deleting status: 200
2024-11-01T10:12:38.020Z
2024-11-01T10:12:38.019Z ERROR 9 --- [pool-5-thread-1] o.s.c.f.serverless.web.ServerlessMVC : Failed processing the request to: /error
2024-11-01T10:12:38.020Z
jakarta.servlet.ServletException: Request processing failed: java.lang.NullPointerException
2024-11-01T10:12:38.020Z
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1022) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.web.servlet.FrameworkServlet.doDelete(FrameworkServlet.java:936) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:553) ~[native:6.0.0]
2024-11-01T10:12:38.020Z
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614) ~[native:6.0.0]
2024-11-01T10:12:38.020Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain$ServletFilterProxy.doFilter(ServerlessMVC.java:303) ~[na:na]
2024-11-01T10:12:38.020Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-11-01T10:12:38.020Z
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-11-01T10:12:38.020Z
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-11-01T10:12:38.020Z
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC$ProxyFilterChain.doFilter(ServerlessMVC.java:266) ~[na:na]
2024-11-01T10:12:38.020Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC.service(ServerlessMVC.java:167) ~[na:na]
2024-11-01T10:12:38.020Z
at org.springframework.cloud.function.serverless.web.ServerlessMVC.service(ServerlessMVC.java:162) ~[na:na]
2024-11-01T10:12:38.020Z
at com.amazonaws.serverless.proxy.spring.AwsSpringHttpProcessingUtils.processRequest(AwsSpringHttpProcessingUtils.java:51) ~[na:na]
2024-11-01T10:12:38.020Z
at com.amazonaws.serverless.proxy.spring.AwsSpringWebCustomRuntimeEventLoop.eventLoop(AwsSpringWebCustomRuntimeEventLoop.java:131) ~[na:na]
2024-11-01T10:12:38.020Z
at com.amazonaws.serverless.proxy.spring.AwsSpringWebCustomRuntimeEventLoop.lambda$run$0(AwsSpringWebCustomRuntimeEventLoop.java:75) ~[na:na]
2024-11-01T10:12:38.020Z
at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[native:na]
2024-11-01T10:12:38.020Z
at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
2024-11-01T10:12:38.020Z
at [email protected]/java.lang.Thread.runWith(Thread.java:1596) ~[native:na]
2024-11-01T10:12:38.020Z
at [email protected]/java.lang.Thread.run(Thread.java:1583) ~[native:na]
2024-11-01T10:12:38.020Z
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:833) ~[native:na]
2024-11-01T10:12:38.020Z
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211) ~[na:na]
2024-11-01T10:12:38.020Z
Caused by: java.lang.NullPointerException: null
2024-11-01T10:12:38.020Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.resolveMediaType(AbstractMessageConverterMethodProcessor.java:505) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.safeExtension(AbstractMessageConverterMethodProcessor.java:498) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.addContentDispositionHeader(AbstractMessageConverterMethodProcessor.java:473) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:295) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor.handleReturnValue(HttpEntityMethodProcessor.java:245) ~[na:na]
2024-11-01T10:12:38.020Z
at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:78) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:136) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[native:6.1.13]
2024-11-01T10:12:38.020Z
... 26 common frames omitted
2024-11-01T10:12:38.022Z
2024-11-01T10:12:38.022Z INFO 9 --- [pool-5-thread-1] s.p.s.AwsSpringWebCustomRuntimeEventLoop : Result POST status: <202 ACCEPTED Accepted,[B@3eeced0,[Content-Type:"application/json", Date:"Fri, 01 Nov 2024 10:12:38 GMT", Content-Length:"16"]>
2024-11-01T10:12:38.022Z
END RequestId: b8b15b84-8696-497c-bc83-751c82bf6e4b
2024-11-01T10:12:38.022Z
REPORT RequestId: b8b15b84-8696-497c-bc83-751c82bf6e4b Duration: 10.70 ms Billed Duration: 11 ms Memory Size: 512 MB Max Memory Used: 138 MB
2024-11-01T10:12:44.556Z
START RequestId: aecec156-1dc1-4dd4-8ee6-1ed6bae40acc Version: $LATEST
2024-11-01T10:12:44.567Z
2024-11-01T10:12:44.567Z INFO 9 --- [pool-5-thread-1] s.p.s.AwsSpringWebCustomRuntimeEventLoop : Result POST status: <202 ACCEPTED Accepted,[B@4462208e,[Content-Type:"application/json", Date:"Fri, 01 Nov 2024 10:12:44 GMT", Content-Length:"16"]>
2024-11-01T10:12:44.568Z
END RequestId: aecec156-1dc1-4dd4-8ee6-1ed6bae40acc
2024-11-01T10:12:44.568Z
REPORT RequestId: aecec156-1dc1-4dd4-8ee6-1ed6bae40acc Duration: 11.71 ms Billed Duration: 12 ms Memory Size: 512 MB Max Memory Used:
Sorry for the delay. Thanks for the sample, I was able to reproduce the issue. The ServletContext is missing in the processing chain and therefore causing a NPE. Will figure out with @olegz if it's an issue in spring-cloud-function-serverless-web or in Serverless Java Container.
Fixed as part of the 2.1.0 release.
@deki Did you test your changes before closing the issue? They broke the functionality! here is video https://youtu.be/EYMar824DLQ
Hi @VSVDEv, sure tests have been made and we even ran a related workshop at AWS re:Invent with >100 participants using that version.
In your sample project you are overriding the Spring Cloud BOM version to an outdated one without the fix. My suggestion is to remove it so you'll transitively get org.springframework.cloud:spring-cloud-function-serverless-web:jar:4.1.4 which is what we've defined in our pom.
The error shown in your video indicates a different error though. Could it be that ZIP upload was corrupted? I just checked out your sample again and for me it was deploying successfully.
@deki yes after deleting dependency management it works. The source template(I used for project) I believe should be updated too https://github.com/aws/serverless-java-container/blob/main/samples/springboot3/pet-store-native/pom.xml
absolutely, thanks for calling that out. glad to hear it's working now!