-
1. Re: java.lang.ClassCastException: org.teiid.common.buffer.FileStore$1 cannot be cast to java.io.SequenceInputStream
rareddy Nov 27, 2017 10:24 AM (in response to aliimtiaz)Ali,
How did you model your return as blob? The above code, unless you are working with embedded Teiid it will not work. Embedded Teiid, the translator, server and client code are in *same* JVM where you can pass the object references and typecast at later stage, but in the full server mode, where client is assumed to be remote and marshaling of the results will occur where the object reference is lost.
From your exception message, I see occurring in the server itself, but I would need to see the whole code for your translator not just fragment above to suggest what is going wrong.
Ramesh..
-
2. Re: java.lang.ClassCastException: org.teiid.common.buffer.FileStore$1 cannot be cast to java.io.SequenceInputStream
shawkins Nov 28, 2017 9:44 AM (in response to rareddy)> Please help me get this SequenceInputStream object again at target end
You can't guarantee that BlobType will return your SequenceInputStream. As Ramesh is indicating due to remoting, inlining, or other lob copying effects you may get a different stream. There are two thoughts here - do you need to cast to SequenceInputStream when reading? Can you just use InputStream. And the other thought is are you looking for some specific handling - for example that the stream is only read once?