严重: Error while registering Oracle JDBC Diagnosability MBean.

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了严重: Error while registering Oracle JDBC Diagnosability MBean.相关的知识,希望对你有一定的参考价值。

2015-7-8 19:28:53 oracle.jdbc.driver.OracleDriver registerMBeans
严重: Error while registering Oracle JDBC Diagnosability MBean.
javax.management.MalformedObjectNameException: Invalid character '
' in value part of property
at javax.management.ObjectName.construct(ObjectName.java:602)
at javax.management.ObjectName.<init>(ObjectName.java:1403)
at oracle.jdbc.driver.OracleDriver.registerMBeans(OracleDriver.java:303)
at oracle.jdbc.driver.OracleDriver$1.run(OracleDriver.java:213)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.jdbc.driver.OracleDriver.<clinit>(OracleDriver.java:209)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at sun.misc.Service$LazyIterator.next(Service.java:271)
at java.sql.DriverService.run(DriverManager.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at java.sql.DriverManager.loadInitialDrivers(DriverManager.java:506)
at java.sql.DriverManager.initialize(DriverManager.java:612)
at java.sql.DriverManager.registerDriver(DriverManager.java:281)
at com.mysql.jdbc.Driver.<clinit>(Driver.java:62)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:100)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:132)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

参考技术A jdbc和连接池对于你这个场景来说,都足够,既然用spring管理了,建议还是使用连接池,另外,spring自身没有实现连接池,一般都是对第三方连接池的包装,常见的有C3P0,dbcp以及最近比较流行的boneCP等,这几个配置都差不多太多,以boneCP为例:
<bean id="dataSource" class="com.jolbox.bonecp.BoneCPDataSource"
destroy-method="close">
<property name="driverClass" value="$jdbc.driverClass" />
<property name="jdbcUrl" value="$jdbc.url" />
<property name="username" value="$jdbc.user" />
<property name="password" value="$jdbc.password" />
<property name="idleConnectionTestPeriod" value="60" />
<property name="idleMaxAge" value="240" />
<property name="maxConnectionsPerPartition" value="30" />
<property name="minConnectionsPerPartition" value="10" />
<property name="partitionCount" value="2" />
<property name="acquireIncrement" value="5" />
<property name="statementsCacheSize" value="100" />
<property name="releaseHelperThreads" value="3" />
</bean>
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource" />
</bean>本回答被提问者采纳

以上是关于严重: Error while registering Oracle JDBC Diagnosability MBean.的主要内容,如果未能解决你的问题,请参考以下文章

严重: Error starting static Resources java.lang.IllegalArgumentException:

严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis

Tomcat遇到”Error listenerStart”或”Error filterStart”问题且无详细日志时的log配置.

严重: Error loading WebappClassLoader context:异常的解决方法(转)

spring配置问题:严重: Error configuring application listener of class org.springframework.web.context.Conte

Eclipse------用Tomcat运行项目后出现:严重: Error configuring application listener of class org.springframework.