I have a procedure like this :
create or replace PROCEDURE Greeting1 IS sqlstmt varchar2(400);
BEGIN
sqlstmt:= 'select * from Object_set';
EXECUTE immediate sqlstmt;
END;
I want to execute it in java code like this:
List<String> result = null;
Query query = getEm().unwrap(Session.class).createSQLQuery("CALL Greeting1()");
if(query.list() != null) {
result = query.list();
}
return result;
But it gives error while getting query.list(). Actually it returns null in Query Objects. How should I get the proper result list. Please suggest me.