Description of problem:
on rhbz #1214381 (almost 10 years ago, 2015-04-22 ) is claimed:
Because tomcat-dbcp.jar is missing, if you define a JNDI DataSource in context.xml file (in either $CATALINA_BASE/conf/ or war) [1], tomcat fails to initialize DataSource, leaving the following logs:
Now the /usr/share/java/tomcat/tomcat-dbcp.jar exit and
Now the line [1] on /etc/tomcat/tomcat.conf give me
[2]
[1]
JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory"
Version-Release number of selected component (if applicable):
tomcat-lib-9.0.87-2.el9.noarch
How reproducible:
start tomcat
Actual results:
[2]
WARNING: Failed to register in JMX: [javax.naming.NamingException: Could not create resource factory instance [Root exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourceFactory]]
Expected results:
no error connecting to database
Additional info:
please remove JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory" from /etc/tomcat/tomcat.conf