I am trying to deploy a maven-built Java web app to Elastic Beanstalk, which is running an environment under the Amazon Linux Tomcat 7 version. The app works fine on localhost, even with an external mysql database (XEROUND).
My original context.xml has a resource as follows:
<Resource auth="Container"
driverClassName="com.mysql.jdbc.Driver"
logAbandoned="true"
maxActive="100"
maxIdle="30"
maxWait="10000"
name="jdbc/xxxx-01292013"
password="xxxx"
removeAbandoned="true"
removeAbandonedTimeout="60"
type="javax.sql.DataSource"
url="jdbc:mysql://instancexxxx.db.xeround.com:xxxx/xxxx-01292013? autoReconnect=true"
username="xxxx-general"/>
However, when I run this app, I get the following error:
java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory
I tried adding the following lines to my context.xml resource:
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
but that didn't work either. I then tried adding this line:
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
but that gives me the new exception:
javax.naming.NamingException: com.mysql.jdbc.Driver
I am pounding my head against a wall here, does anyone know what I can do to get this thing up and running?