aws-samples / serverless-java-frameworks-samples

MIT No Attribution
150 stars 38 forks source link

Error when testing a thin jar file #19

Closed eanabogdan16 closed 1 year ago

eanabogdan16 commented 1 year ago

Hello,

I am using the same versions as you, but when I am trying to run de uploaded thin jar of 15kb, the test is failing with the below error:

{
  "errorMessage": "Error loading class com.ag.aws.lambda.OrderHandler: org/springframework/cloud/function/adapter/aws/SpringBootRequestHandler",
  "errorType": "java.lang.NoClassDefFoundError"
}
Error loading class com.ag.aws.lambda.OrderHandler: org/springframework/cloud/function/adapter/aws/SpringBootRequestHandler: java.lang.NoClassDefFoundError
java.lang.NoClassDefFoundError: org/springframework/cloud/function/adapter/aws/SpringBootRequestHandler
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
    at java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.base/java.net.URLClassLoader.defineClass(Unknown Source)
    at java.base/java.net.URLClassLoader$1.run(Unknown Source)
    at java.base/java.net.URLClassLoader$1.run(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.net.URLClassLoader.findClass(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.springframework.cloud.function.adapter.aws.SpringBootRequestHandler. Current classpath: file:/var/task/

Unknown application error occurred
Runtime.Unknown
dmahapatro commented 1 year ago

What is OrderHandler?