`
Kevin12
  • 浏览: 235356 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Invalid character '\n' in value part of property(Oracle)

    博客分类:
  • Java
阅读更多
链接地址:http://kevin12.iteye.com/blog/1955888

最近做项目时候用到spring和oracle了,但是启动项目时候包如下错误:
严重: Error while registering Oracle JDBC Diagnosability MBean.
javax.management.MalformedObjectNameException: Invalid character '\n' in value part of property
	at javax.management.ObjectName.construct(ObjectName.java:618)
	at javax.management.ObjectName.<init>(ObjectName.java:1382)
	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:186)
	at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:101)
	at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:133)
	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)

我使用的oracle是oracle 11g 11.1.0版本的,架包也是里面用的。网上查找说是oracle驱动的bug的问题,此驱动有不能和spring正常结合使用。
解决方法:
将11.1.0的架包ojdbc6.jar换成Oracle 11.1.0.7.0-Production JDBC 4.0 compiled with JDK6的架包ojdbc6.jar即可。
参考博客:http://blog.csdn.net/getdate/article/details/6729706
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics