Hi All,
We are using ojdbc8.jar and Oracle 12.1.0.2.0 Database.
We have stored procedure which returns SYS_REFCURSOR. we are calling this stored procedure from java using hibernate s below
sp.registerStoredProcedureParameter(1, Class.class, ParameterMode.REF_CURSOR);
sp.execute();
resultList = sp.getResultList();
we get the below error when we run the above code.
<Jun 4, 2018 11:45:00,289 PM UTC> <Warning> <org.hibernate.engine.jdbc.spi.SqlExceptionHelper> <BEA-000000> <SQL Error: 17004, SQLState: 99999>
<Jun 4, 2018 11:45:00,289 PM UTC> <Error> <org.hibernate.engine.jdbc.spi.SqlExceptionHelper> <BEA-000000> <Invalid column type: 2012>
I see that hibernate is registering the out parameter as cstmt.registerOutParameter(1, Types.REF_CURSOR) when we use ojdbc8.
hibernate registers the out parameter as -10 when we use ojdbc7.
This code worked with ojdbc7.jar
We upgraded weblogic to 12.2.1.3 and it comes with ojdbc8 so we have to use ojdbc8 and make the above code work.
Do we need to upgrade database server to 12.2 to make the above code work with ojdbc8.
Thanks,
Archana.