Posted by: Chyne on: May 7, 2009
It seems there is a well-known bug for Oracle Database 11g release (Oracle 11.1.0.6.0) and it has been discussed in the Oracle forum post: SEVERE: Error while registering Oracle JDBC Diagnosability MBean
How do you know this error is related to Oracle 11g? If you are using the Oracle 11g Release 1 (11.1.0.6.0) JDBC driver (ojdbc6.jar), you will see the following errors in the log file:-
oracle.jdbc.driver.OracleDriver registerMBeans
SEVERE: 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.(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.(OracleDriver.java:209)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1130)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
...
...
(more)
The biggest probability of this problem happens is when you are using Oracle 11g with the Tomcat application server. There are several suggested workarounds that you can try and check whether it works on you. You can either download the patch from the Oracle site for the Oracle Database 11g, version 11.1.0.6 or switch it to Oracle 10g.
Anyway, the most important thing that I want to mention here is about a blog that discussed the root and cause on how Oracle 11g Release 1 failed to be implemented with the Tomcat. Besides of mentioning on his detailed investigation to figure out the root and cause of this bug, he even mentioned on his workaround to resolve this bug.
I personally feel his workaround is really interesting because the suggested solution is from the code implementation. I admitted that this is the first time I encountered a workaround which requires code implementation to resolve a problem which related to JDBC driver. As usual, what we have in our mind when facing this kind of issue is to do some research through websites and possible solutions (e.g. re-download the driver or patch) and I guess most of us will not spend some time for code digging to know what is the root cause behind the problem. So, if you are interested to know the root cause and how this issue can be resolved with codes, I suggest you to read this blog regarding to the problem of Oracle 11g JDBC Driver:-