0

We updated OJDBC driver in our application from OJDBC6 to OJDBC7. And got strange ClassCastException. Inside logs shows that at: oracle.jdbc.driver.BlockSource$ThreadedCachingBlockSource$BlockReleaserListener.(BlockSource.java:348) we got: java.lang.ClassCastException: sun.management.MemoryImpl cannot be cast to javax.management.NotificationEmitter

And we have no idea why this exception is appeared, because according the http://www.docjar.com/docs/api/sun/management/MemoryImpl.html MemoryImpl implements NotificationEmitter.

If we change JVM from Hotspot to the IBM (both JDK7), we got the same: java.lang.ClassCastException: com.ibm.lang.management.MemoryMXBeanImpl incompatible with javax.management.NotificationEmitter

And again MemoryMXBeanImpl implements NotificationEmitter.

So if anybody have the workaround or any idea why does it happens I'll be very grateful!

4

0 回答 0