I am building a docker image to deploy on ECS Fargate for a Java application that is deployed on Tomcat10 and jdk17 corretto. When pushing the image and deploying the ECS Fargate I get the below error.
Caused by: java.lang.ClassNotFoundException: Illegal access: this web application instance has been stopped already. Could not load [org.apache.http.pool.AbstractConnPool$4]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
On my local machine I am able to run the application just fine. Has anyone faced this issue before..
Thanks.
I am expecting to able to deploy the same application on ECS fargate using the same image
Below is how my docker image is build.
ENV CATALINA_HOME /usr/local/tomcat
ENV PATH $CATALINA_HOME/bin:$PATH
ENV LOG_DIR /var/log/tomcat
RUN mkdir -p $LOG_DIR/
ADD context.xml $CATALINA_HOME/conf
ADD server.xml $CATALINA_HOME/conf
ADD libs/* $CATALINA_HOME/lib/
RUN rm -rf $CATALINA_HOME/webapps/*
ADD my.war $CATALINA_HOME/webapps/my.war
EXPOSE 80
EXPOSE 8080
EXPOSE 8443
EXPOSE 3306
CMD ["catalina.sh", "run"]