Oracle JDBC (MOSC)

MOSC Banner

Java versus cursor_sharing

in Oracle JDBC (MOSC) 4 commentsAnswered ✓

Hi,

There is this java´s application that have none or very few bind variable usage, mainly because most sql statements are built at runtime

Dev. team does not have a plan to change this in short terms, so we have testing change cursor_sharing parameter to "force" but did not worked well: after a while, application started to thrown exception "java.lang.String cannot be cast to java.lang.Boolean" .

We figure out that we have to code casting explicitly at sql statement, for instance :

from : when column1 <> column2 then '1' else '0' end info1

to: when column1 <> column2 then cast ('1' as char(1)) else cast ('0' as char(1)) end info1

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

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

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center