I am trying to read a "binary" type property value with below code.
resourceToRead.getValueMap().get("allFundsDup", Property.class).getBinary();
Here is the error I am getting.
result = {BinaryImpl@30400} Method threw 'java.lang.IllegalStateException' exception. Cannot evaluate org.apache.jackrabbit.oak.plugins.value.jcr.BinaryImpl.toString()
value = {ValueImpl@30402} Method threw 'java.lang.IllegalStateException' exception. Cannot evaluate org.apache.jackrabbit.oak.plugins.value.jcr.ValueImpl.toString()
If I evaluate below code, it returns original stream.
resourceToRead.getValueMap().get("allFundsDup", Property.class).getBinary().getStream();
what I don't understand is if stream is retrievable , why does first snippet not retrieving Binary object and giving an exception.
also when I try getValueMap().get("allFundsDup", Binary.class) same exception occurs.
Any inputs to understand above code.
Thanks,
Sri