I have a stored procedure in Postgres. That procedure has 4 OUT parameters. Using JPA normally I can't get the results. What I'm trying to do is use a SELECT query with that procedure.
For example If I try in pgAdmin the query:
SELECT * FROM get_results (arg0, arg1 etc);
I get one result row containing 4 columns with the results from the 4 OUT parameters.
But When I try to use it in JPA it fails. I'm trying something like:
Query q = em.createNativeQuery("SELECT * FROM get_results (arg0, arg1 etc)");
q.getSingleResult();
But it throws an java.lang.IllegalStateException [com.arjuna.ats.internal.jta.transaction.arjunacore.nosuchtx] [com.arjuna.ats.internal.jta.transaction.arjunacore.nosuchtx] No such transaction!
Any suggestions?