com.tangosol.util.Binary Cannot Be Cast To java.lang.String After cache.get() (Doc ID 800266.1)

Last updated on NOVEMBER 03, 2016

Applies to:

Oracle Coherence - Version: 3.4.0 to 3.4.1
This problem can occur on any platform.

Symptoms

Coherence runs into following error intermittently:

java.lang.ClassCastException: com.tangosol.util.Binary cannot be cast to java.lang.String
at ApplicationClass.someMethod(Unknown Source)
[...]

In the ApplicationClass.someMethod() method there is a type cast because the application expects
to get a String from the cache.

The exception is thrown in following line of the application code:

String s = (String) cache.get ("something");

This can be observed with Coherence 3.4.1.
Coherence 3.3.x and previous versions did not show this problem.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms