Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JDBC Trace Facility

745268Jan 8 2010 — edited Nov 20 2014
I have problem with starting jdbc trace facility. I have tried to follow instructions on page http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.html#36_00 but it is not working:

CODE:
// create name
javax.management.ObjectName name = new javax.management.ObjectName("com.oracle.jdbc:type=diagnosibility,name=*");
// get the MBean server
javax.management.MBeanServer mbs = java.lang.management.ManagementFactory.getPlatformMBeanServer();
// find out if logging is enabled or not
System.out.println("LoggingEnabled = " + mbs.getAttribute(name, "LoggingEnabled"));
// enable logging
mbs.setAttribute(name, new javax.management.Attribute("LoggingEnabled", true));
// disable logging
mbs.setAttribute(name, new javax.management.Attribute("LoggingEnabled", false));

ERROR:
javax.management.InstanceNotFoundException: com.oracle.jdbc:type=diagnosibility,name=*
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:662)
at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)
at com.onsemi.cim.apps.commoninterface.EventProcessingWorker.main(EventProcessingWorker.java:714)

Can you please help me and advice what am I doing wrong.

BTW: I am trying to start logging due to "ORA-12155: TNS:received bad datatype in NSWMARKER packet". Does any one any experience with it? For example what is causing it?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 1 2012
Added on Jan 8 2010
2 comments
2,674 views