警告无法在JMX中注册:javax.naming.NamingException - tomcat dbcp2

时间:2015-10-29 06:33:07

标签: java tomcat jdbc jmx apache-commons-dbcp

我正在使用apache-tomcat-6.0.35并将DB Pooling Jar升级为 commons-dbcp2-2.1.1.jar commons-pool2-2.4.2.jar 我在apache-tomcat-6.0.35 / conf / context.xml文件中进行了以下更改

<Resource auth="Container"
description="ebook DB Connection"
driverClassName="oracle.jdbc.OracleDriver"
name="jdbc/ebookDS"
username="username"
password="password"
factory="org.apache.commons.dbcp2.BasicDataSourceFactory"
type="javax.sql.DataSource"
url="jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = cluster-b3-10)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = eb11dc) ))"
maxTotal="100"
maxIdle="20"
maxWaitMillis="30000"
accessToUnderlyingConnectionAllowed="true" />

当我添加factory =&#34; org.apache.commons时,我注意到tomcat catalina.out文件中有以下警告和信息消息。 dbcp2 .BasicDataSourceFactory&#34;在context.xml中

WARNING: Failed to register in JMX: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp2.BasicDataSourceFactory]
Oct 28, 2015 10:48:38 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOTRENAME
Oct 28, 2015 10:48:38 AM org.apache.catalina.core.NamingContextListener addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp2.BasicDataSourceFactory]
Oct 28, 2015 10:48:38 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory hudson
Oct 28, 2015 10:48:39 AM org.apache.catalina.core.NamingContextListener addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp2.BasicDataSourceFactory]
 Oct 28, 2015 10:48:39 AM hudson.WebAppMain contextInitialized
 INFO: Home directory: /export/home/apps/ebookplus/.hudson
Oct 28, 2015 10:48:39 AM hudson.util.CharacterEncodingFilter init
INFO: CharacterEncodingFilter initialized. DISABLE_FILTER: false FORCE_ENCODING: false
Oct 28, 2015 10:48:39 AM org.apache.catalina.startup.HostConfig deployDirectory
 INFO: Deploying web application directory docs
Oct 28, 2015 10:48:39 AM org.apache.catalina.core.NamingContextListener addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp2.BasicDataSourceFactory]

非常感谢有关此处发生的事情的任何信息。

0 个答案:

没有答案