java - JPA2.1 - Calling a stored procedure which returns CLOB -


I am using JPA 2.1 with Hibernate as the Deployment Seller.

I am trying to call a stored procedure that gives a CLOB.

  StoredProcedureQuery storedProcScripts = entityManager.createStoredProcedureQuery ("pkg_test.get_clob"); Archived ProcQuery Registry Certified Processor System (1, String Class, Parameter Mod.IN); Archived ProcQuery RegistryStreamProceaderPamator (2, String Class, ParameterMod.IN); Archived ProcQuery Registrystroder ProcessorPamator (3, oracle.sql.CLOB.class, ParameterMode.OUT); Archived ProcQuery .setParameter (1, "ABCD"); Stored ProcQuery .setParameter (2, "XYZ"); StoredProcQuery.execute (); // Here I get the following exception. * Done by: org.hibernate.exception.SQLGrammarException: Calling CallableStatement.getMore error. Org.hibernate.exception.internal.SQLStateConversionDelegate.convert at org.hibernate.exception.internal.StandardSQLxceptionConverter.convert (StandardSQLExceptionConverter Java: 49) org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert at (SQLStateConversionDelegate.java:123) (SqlExceptionHelper.java:126) on org.hibernate.result.internal.OutputsImpl.convert (OutputsImpl.java:96) on org.hibernate. Org.hibernate.procedure.internal.ProcedureOutputsImpl at org.hibernate.procedure.internal.ProcedureCallImpl And lieutenant; Init & gt; (ProcedureOutputsImpl.java:49) result.internal.OutputsImpl. And lieutenant; Init & gt; (OutputsImpl.java:73). buildOutputs (ProcedureCallImpl.java:426) on ORG.hibernate.procedure.internal.ProcedureCallImpl.getOutputs (ProcedureCallImpl.java378) on Org.hibernate.jpa.internal ORG. Hibernate.jpa.internal.StoredProcedureQueryImpl.outputs (StoredProcedureQueryImpl.java:251) ORG on java.sql.SQLException :: hibernate.jpa.internal.StoredProcedureQueryImpl.execute (StoredProcedureQueryImpl.java:234) ... 33 more because of ORA -06,550: line 1, column 7: PLS-00,306: type the wrong number or logic line 1, column: 7: PL / SQL: Statement oracle.jdbc.driver.T4CTTIoer.processError (T4CTTIoer.java:440) oracle.jdbc on .driver.T4CTTIoer.processError (call for less ignored 'GET_CLOB' to ORA-06,550 T4CTTIoer.java:396)*  

here I java.sql.CLOB There is an implementation which is passing type as oracle.sql.CLOB.class.

I tested the pure PDL / SQL process with a clean JDBC implementation and its functioning.

but want to use the features of JPA2.1.

Can you please suggest what I am doing wrong?

Thanks

This is not a hibernate or jpa or java issue.

ORA-06550 : line string, Oracle DB error code manually:

column string: String

Reason: A PL / SQL compilation error has occurred. The number given for the line and column is the location in the PL / SQL block where the error occurred.

Action: See the following PL / SQL messages for more information about error.

ORA-06,550 PL / SQL where error is the error point for the position with the syntax error and this compilation time is followed by another descriptive message of error:


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -