You are not logged in.
Hi.
I'm suspicious that the tomcat7 packaging for arch may be missing the tomcat-dbcp.jar file due to an error I'm getting. Please correct my ignorance.
I'm attempting to deploy a webapp on tomcat7. It's coming as a warfile which runs fine within the eclipse environment. The app needs connectivity to a postgis database which I'm running on the same machine.
I put the postgresql jdbc jarfile in /usr/share/tomcat7/lib. The warfile is in /usr/share/webapps/feis-spatial. My context fragment is in /etc/tomcat7/Catalina/localhost/FEIS.xml and contains:
<Context
docBase="/usr/share/webapps/feis-spatial/FEIS.war"
path="/FEIS"
crossContext="true"
reloadable="true"
debug="1"
source="org.eclipse.jst.jee.server:FEIS">
<Resource name="jdbc/postgres" auth="Container" type="javax.sql.DataSource"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5432/feis-test"
username="postgres" password="postgres" maxActive="20" maxIdel="10" />
</Context>Browsing to localhost:8080 works just fine until you do something that requires database access. Then you get:
INFO: Could not create resource factory instance
javax.naming.NamingException: Could not create resource factory instance [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory]
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:121)In the /usr/share/tomcat7/lib directory, I did a quick
for i in *.jar ; jar tf $i | grep BasicDataSourceFactory ; doneand the only thing I found was a class with the same name in org.apache.commons.dbcp. This is what leads me to believe that something is missing. (NOTE that the missing class above is named explicitly on the tomcat7 JNDI documentation page.)
Any ideas?
Offline
Checked the binary distribution of tomcat7, and tomcat-dbcp.jar is there. Filed a bug report for the packaging.
Offline