I’ve thought that perhaps the module prefix needs to be swapped from app to ROOT, so I tried that, but it didn’t work.
I tried to set appHome to /var/lib/tomcat8/webapps (without /ROOT), but the error stayed the same.
When I SSHed in to look around, I found that the PostgreSQL JAR does exist in /var/lib/tomcat8/webapps/ROOT/WEB-INF/lib/.
Where am I going wrong?
I am using platform-6.10.7.
EDIT:
Elastic Beanstalk’s configuration is as follows:
Tomcat 8.5 with Java 8 running on 64bit Amazon Linux/3.1.0
Thanks @subbotin. Verified the things that you mentioned. All there.
Also, I am able to connect to AWS mysql instance from my local tomcat deployment with the same war that I am trying to deploy using AWS EBS.
But no luck on AWS EC2 instance tomcat. Anything else that I could be missing. Do I need a different mysql-java-connector for AWS EC2 instance than I am using locally?
I’ve found an error in the log file: Failed to register in JMX: [javax.naming.NamingException: Could not create resource factory instance [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory]]
Could you try to add factory attribute to prod-context.xml, rebuild WAR and deploy again.
Turns out that this was the same problem for me. Adding the factory attribute allowed me to move on to solving other issues with my deploy.
Thanks a lot @subbotin!