This is my first time deploying to AWS Lambda and am getting a little stuck.
I have a large maven project called Helpers
which has many submodules, many of them dependent on each other. In there I have one Helper called Alerts
. I have a parent directory and everything builds and compiles successfully. So, that's good.
In Alerts there's a class called PaymentAlerts
which has the line
import com.mywebsite.messages.Doers
where messages.Doers is found in the dependencies.
But, when I do a mvn package
on the whole project and I find alerts-1.0.jar
and upload it to AWS Lambda and I set my handler as com.mywebsite.alerts.PaymentAlerts::doAlert
I get the following error:
{
com.mywebsite.alerts.PaymentAlerts: com/mywebsite/messaging/Doers",
"errorType": "java.lang.NoClassDefFoundError"
"errorMessage": "Error loading class }
How do I reconfigure this so that it finds all the necessary files?
Any and all help is appreciated!