Q:

Error while registering Oracle JDBC Diagnosability MBean

When I'm using ojdbc6.jar for my application. I'm getting some weird error. Could anyone help me to solve this error ?
Here is complete stack trace of exception raised during my application execution 
Sep 20, 2013 4:05:36 PM oracle.jdbc.driver.OracleDriver registerMBeans
SEVERE: 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:190)
    at conf.dbcon.dbstate(dbcon.java:42)
    at system.ObjectInfo.getObjectType(ObjectInfo.java:100)
    at system.readFile.readContents(readFile.java:36)
    at system.upload.doPost(upload.java:54)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)

A:

I redownloaded pathed drivers ojdbc6.jar from OTN.
To check, whether you have pathed driver or not, follow these steps
> java -jar ojdbc6.jar

The unpatched jar prints
Oracle 11.1.0.6.0-Production JDBC 4.0 complied with JDK6

and the patched jar prints
Oracle 11.1.0.6.0-Production+ JDBC 4.0 complied with JDK6

If you use ojdbc5 it will say 3.0 and 1.5. 

